ESPHome-LD2410 icon indicating copy to clipboard operation
ESPHome-LD2410 copied to clipboard

Error during compile

Open Korte68 opened this issue 2 years ago • 1 comments

Hi, got this error:

In file included from src/main.cpp:83: src/ld2410_uart.h: In member function 'void LD2410::setConfigMode(bool)': src/ld2410_uart.h:217:27: warning: narrowing conversion of '(enable ? 255 : 254)' from 'int' to 'char' inside { } [-Wnarrowing] char cmd[2] = {enable ? 0xFF : 0xFE, 0x00}; ~~~~~~~^~~~~~~~~~~~~ src/ld2410_uart.h: In member function 'void LD2410::setEngineeringMode(bool)': src/ld2410_uart.h:245:27: warning: narrowing conversion of '(enable ? 98 : 99)' from 'int' to 'char' inside { } [-Wnarrowing] char cmd[2] = {enable ? 0x62 : 0x63, 0x00}; ~~~~~~~^~~~~~~~~~~~~ In file included from src/main.cpp:83: src/ld2410_uart.h: In member function 'void LD2410::setBaudrate(int)': src/ld2410_uart.h:273:33: warning: narrowing conversion of 'index' from 'int' to 'char' inside { } [-Wnarrowing] char value[2] = {index, 0x00};

Can you solve it?

Thank you

Korte68 avatar Nov 02 '22 23:11 Korte68

this is just a warning, not an error.

lienbacher avatar Nov 03 '22 07:11 lienbacher