Fix invalid C++ in eModbus (0xff in a char[])

This commit is contained in:
Jonny 2025-08-06 20:23:31 +01:00
parent 15ddc87afa
commit b2e9515d44
2 changed files with 2 additions and 2 deletions

View file

@ -440,7 +440,7 @@ ModbusMessage RTUutils::receive(uint8_t caller, Stream& serial, uint32_t timeout
}
// Lower 7 bit ASCII characters - all invalid are set to 0xFF
const char RTUutils::ASCIIread[] = {
const uint8_t RTUutils::ASCIIread[] = {
/* 00-07 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
/* 08-0F */ 0xFF, 0xFF, 0xF2, 0xFF, 0xFF, 0xF1, 0xFF, 0xFF, // LF + CR
/* 10-17 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,

View file

@ -60,7 +60,7 @@ static void prepareHardwareSerial(HardwareSerial& s, uint16_t bufferSize = 260)
protected:
// Printable characters for ASCII protocol: 012345678ABCDEF
static const char ASCIIwrite[];
static const char ASCIIread[];
static const uint8_t ASCIIread[];
RTUutils() = delete;