Skip to content

Min & Max Cell Voltages cut off due to variable type #47

@ricjohn

Description

@ricjohn

when consuming min & max cell voltages via dbus you get a int32 value

Interface com.victronenergy.BusItem:
(Int32 retval) SetValue(Variant value)
(Variant value) GetMin()
(Variant value) GetMax()
(Variant value) GetDefault()
(String descr) GetDescription()
(Variant value) GetValue()
(String value) GetText()

Example
dbus -y com.victronenergy.battery.socketcan_can0 /System/MaxCellVoltage GetValue
value = 3.381999969482422

dbus_modbustcp exposes this as unint16 with limiting the field to two digits after the decimal point
com.victronenergy.battery System; minimum cell voltage 1290 uint16 100 0 to 655.35 /System/MinCellVoltage no V DC
com.victronenergy.battery System; maximum cell voltage 1291 uint16 100 0 to 655.35 /System/MaxCellVoltage no V DC

For battery voltages it would make sense to change the data type not to lose the precision

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions