Skip to content

Voltage is reported in milivolts instead of Volts #1

@g0nz4I0

Description

@g0nz4I0

The module reports voltage in 100mV increments, so 1 inc = 100 mV, not one volt.
I dont think throught the decoding this is updated.

            case CMS::ProtocolNumber::ModuleStateResponse:
                module_state = {
                    .general_state{static_cast<CMS::GeneralModuleState>(
                        (static_cast<uint16_t>(packet.data[1]) << 8) |
                        packet.data[0])},
                    .module_voltage{static_cast<CMS::ModuleVoltage>(
                        (static_cast<uint16_t>(packet.data[3]) << 8) |
                        packet.data[2])}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions