[modbus] [modbus_controller] Fix server role read coil 0x1 crc (#8859)

Co-authored-by: Stanley Pinchak <stanley.pinchak@gmail.com>
This commit is contained in:
gotnone 2025-05-29 00:12:58 -05:00 committed by GitHub
parent 455624105b
commit 0b1c5b825e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -90,7 +90,7 @@ bool Modbus::parse_modbus_byte_(uint8_t byte) {
} else {
// data starts at 2 and length is 4 for read registers commands
if (this->role == ModbusRole::SERVER && (function_code == 0x3 || function_code == 0x4)) {
if (this->role == ModbusRole::SERVER && (function_code == 0x1 || function_code == 0x3 || function_code == 0x4)) {
data_offset = 2;
data_len = 4;
}