Merge pull request #27 from Sani7/Modbus_TCP_Obe

modbus_tcp
This commit is contained in:
2023-11-28 18:55:30 +01:00

View File

@@ -62,7 +62,7 @@ static err_t modbus_incoming_data(void* arg, struct tcp_pcb* pcb, struct pbuf* p
// Putting the buffer in the register array
for (uint16_t i = 0; i < p->tot_len && i < MAX_REG; i++) {
registers[i] = ((uint*)p->payload)[i];
registers[i] = ((uint8_t*)p->payload)[i];
}
if (registers[MODBUS_MODE] == MULTIPLE_REG) {