Skip to content

Commit

Permalink
fix: call setProviderXX methods (#262)
Browse files Browse the repository at this point in the history
Canbus connections are handled as providers in the server, because
here we were calling setPluginXX methods instead of setProviderXX.
  • Loading branch information
tkurki authored Mar 4, 2024
1 parent b5b8626 commit 3b73e62
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/canbus.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@ function CanbusStream (options) {
this.options = options
this.start()

console.trace()
console.log(options.app.ssetProviderStatus)
this.setProviderStatus = options.app && options.app.setProviderStatus
? (msg) => {
options.app.setPluginStatus(options.providerId, msg)
options.app.setProviderStatus(options.providerId, msg)
}
: () => {}
this.setProviderError = options.app && options.app.setProviderError
? (msg) => {
options.app.setPluginError(options.providerId, msg)
options.app.setProviderError(options.providerId, msg)
}
: () => {}

Expand Down

0 comments on commit 3b73e62

Please sign in to comment.