ChargeX: fix phase state register read length (#27243)

This commit is contained in:
premultiply 2026-02-05 21:14:32 +01:00 • committed by GitHub
parent 14c298c7ad
commit d4d227ef63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -115,7 +115,7 @@ func (wb *ChargeX) moduleReg(offset uint16) uint16 {
// setCurrent writes the current limit in Amperes
func (wb *ChargeX) setCurrent(current float64) error {
// Read module state to determine charging mode (1p or 3p)
b, err := wb.conn.ReadHoldingRegisters(wb.moduleReg(chargexRegModuleState), 1)
b, err := wb.conn.ReadHoldingRegisters(wb.moduleReg(chargexRegModuleState), 2)
if err != nil {
return err
}