EEPROM config functional
This commit is contained in:
parent
d26079f722
commit
a87afdf6fa
@ -257,11 +257,13 @@ int main(void)
|
||||
}
|
||||
/* if config changed (MODBUS write), reflect changes to EEPROM */
|
||||
if (sensor_config_pending_write) {
|
||||
// config_write(&sensor_config);
|
||||
config_write(&sensor_config);
|
||||
sensor_config_pending_write = 0;
|
||||
}
|
||||
if (modbus_address_changed)
|
||||
{
|
||||
modbus_slave_set_address(sensor_config.modbus_addr);
|
||||
modbus_address_changed = 0;
|
||||
}
|
||||
if (baudrate_changed)
|
||||
{
|
||||
@ -739,8 +741,6 @@ int8_t modbus_slave_callback(modbus_transaction_t *transaction)
|
||||
return MODBUS_ERROR_FUNCTION_NOT_IMPLEMENTED;
|
||||
}
|
||||
}
|
||||
/* TODO: Set modbus address on change */
|
||||
/* TODO: Set UART baudrate on change */
|
||||
sensor_config_pending_write = 1;
|
||||
return MODBUS_OK;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user