Error during compile
Closed this issue · 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
this is just a warning, not an error.