OpenWB: improve error handling

This commit is contained in:
andig 2022-08-18 18:16:11 +02:00
parent a84e93fc6a
commit c165a0949e

View file

@ -173,9 +173,12 @@ func (m *OpenWB) Enable(enable bool) error {
current = m.current
}
m.enabled = current > 0
err := m.currentS(current)
if err == nil {
m.enabled = enable
}
return m.currentS(current)
return err
}
func (m *OpenWB) Enabled() (bool, error) {