chore: error handling in checkStation method (#33066)
This commit is contained in:
parent
bbb7d704f6
commit
6e121c778f
1 changed files with 4 additions and 0 deletions
|
|
@ -361,6 +361,10 @@ func (wb *DaheimLaden) getPhases() (int, error) {
|
|||
}
|
||||
|
||||
func (wb *DaheimLaden) checkStation() error {
|
||||
// first call for fw init
|
||||
if _, err := wb.conn.ReadHoldingRegisters(dlRegEvseMaxCurrent, 22); err != nil {
|
||||
return err
|
||||
}
|
||||
b, err := wb.conn.ReadHoldingRegisters(dlRegEvseMaxCurrent, 22)
|
||||
if err != nil {
|
||||
return api.ErrSponsorRequired
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue