-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Handle broken RFID in Openwb SW2.0 #29352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
8a08060
7d3520e
d960ced
c9a48c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,12 +48,14 @@ func NewOpenWB20FromConfig(ctx context.Context, other map[string]any) (api.Charg | |
| cc := struct { | ||
| Connector uint16 | ||
| Phases1p3p bool | ||
| Identify bool | ||
| modbus.TcpSettings `mapstructure:",squash"` | ||
| }{ | ||
| Connector: 1, | ||
| TcpSettings: modbus.TcpSettings{ | ||
| ID: 1, | ||
| }, | ||
| Identify: false, | ||
| } | ||
|
|
||
| if err := util.DecodeOther(other, &cc); err != nil { | ||
|
|
@@ -71,8 +73,10 @@ func NewOpenWB20FromConfig(ctx context.Context, other map[string]any) (api.Charg | |
| } | ||
|
|
||
| var identify func() (string, error) | ||
| if _, err := wb.identify(); err == nil { | ||
| identify = wb.identify | ||
| if cc.Identify { | ||
| if _, err := wb.identify(); err == nil { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing error check
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. which error check are you expecting here?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. error needs be returned if != nil |
||
| identify = wb.identify | ||
| } | ||
| } | ||
|
|
||
| return decorateOpenWB20(wb, phases1p3p, identify), nil | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.