feat(modbus): Add supply voltage register and display in tool
This commit introduces a new Modbus input register for the system's supply voltage. - The `modbus-registers.de.md` documentation is updated to include the `SUPPLY_VOLTAGE_MV` register at address `0x00F5` within the system block. - The `modbus_server.h` header defines the new register. - The `modbus_server.c` implementation provides a fixed value (12300 mV) for this register. - The `modbus_tool.py` script is updated to read and display this new supply voltage value in the UI. This lays the groundwork for integrating actual voltage measurements in the future.
This commit is contained in:
@@ -128,6 +128,9 @@ static int input_reg_rd(uint16_t addr, uint16_t *reg)
|
||||
case REG_INPUT_UPTIME_SECONDS_HIGH:
|
||||
*reg = (uint16_t)(uptime_s >> 16);
|
||||
break;
|
||||
case REG_INPUT_SUPPLY_VOLTAGE_MV:
|
||||
*reg = 12300;
|
||||
break;
|
||||
case REG_INPUT_FWU_LAST_CHUNK_CRC:
|
||||
*reg = fwu_get_last_chunk_crc();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user