smarmengol/Modbus-Master-Slave-for-Arduino

unsigned data type but negative value

stuartpittaway opened this issue · 0 comments

In your example https://github.com/smarmengol/Modbus-Master-Slave-for-Arduino/blob/master/examples/RS485_slave/RS485_slave.ino

The array is defined as uint16 but you have a negative entry at the end of the array, throws a compiler error/warning.

uint16_t au16data[16] = { 3, 1415, 9265, 4, 2, 7182, 28182, 8, 0, 0, 0, 0, 0, 0, 1, -1 };