Weidmüller: fix phases and current (#15127)

This commit is contained in:
premultiply 2024-07-29 16:57:12 +02:00 • committed by GitHub
parent 1515a67fc0
commit c4b5f871ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,7 +38,7 @@ type Weidmüller struct {
const (
wmRegCarStatus = 301 // GD_ID_EVCC_CAR_STATE CHAR
wmRegEvccStatus = 302 // GD_ID_EVCC_EVSE_STATE UINT16
wmRegPhases = 317 // GD_ID_EVCC_PHASES UINT16
wmRegPhases = 318 // GD_ID_EVCC_PHASES_LLM UINT16
wmRegVoltages = 400 // GD_ID_CM_VOLTAGE_PHASE UINT32
wmRegCurrents = 406 // GD_ID_CM_CURRENT_PHASE UINT32
wmRegActivePower = 418 // GD_ID_CM_ACTIVE_POWER UINT32
@ -167,7 +167,7 @@ func (wb *Weidmüller) MaxCurrent(current int64) error {
return fmt.Errorf("invalid current %d", current)
}
wb.curr = uint16(current * 10)
wb.curr = uint16(current)
return wb.setCurrent(wb.curr)
}