Fixed return in modbus callback
This commit is contained in:
parent
23b144eeb2
commit
b5b031e593
@ -123,6 +123,7 @@ int8_t modbus_slave_callback(modbus_transaction_t *transaction)
|
||||
// readout of all measured variables
|
||||
if (transaction->register_number == 30010) { // register number 30010 (randomly selected)
|
||||
transaction->input_registers[0] = CO2;
|
||||
return MODBUS_OK;
|
||||
}
|
||||
}
|
||||
return MODBUS_ERROR_FUNCTION_NOT_IMPLEMENTED; /* nothing implemented yet! TODO */
|
||||
|
Loading…
Reference in New Issue
Block a user