Skip to content

Commit

Permalink
heidelberg: remove fw register diag (#5125)
Browse files Browse the repository at this point in the history
  • Loading branch information
premultiply committed Nov 10, 2022
1 parent 9f721e1 commit 9fc017e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions charger/heidelberg-ec.go
Expand Up @@ -36,7 +36,6 @@ type HeidelbergEC struct {
}

const (
hecRegFirmware = 1 // Input
hecRegVehicleStatus = 5 // Input
hecRegTemperature = 9 // Input
hecRegPower = 14 // Input
Expand Down Expand Up @@ -262,9 +261,6 @@ var _ api.Diagnosis = (*HeidelbergEC)(nil)

// Diagnose implements the api.Diagnosis interface
func (wb *HeidelbergEC) Diagnose() {
if b, err := wb.conn.ReadInputRegisters(hecRegFirmware, 2); err == nil {
fmt.Printf("Firmware:\t%d.%d.%d\n", b[1], b[2], b[3])
}
if b, err := wb.conn.ReadInputRegisters(hecRegTemperature, 1); err == nil {
fmt.Printf("Temperature:\t%.1fC\n", float64(int16(binary.BigEndian.Uint16(b)))/10)
}
Expand Down

0 comments on commit 9fc017e

Please sign in to comment.