Skip to content

Commit

Permalink
fix: logging with canboatjs writes binary data (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbender9 authored and tkurki committed Apr 7, 2018
1 parent c2db93a commit 47b0092
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions providers/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function Simple (options) {
: dataType

const pipeline = [].concat(
pipeStartByType[options.type](options.subOptions),
pipeStartByType[options.type](options.subOptions, options.logging),
getLogger(options.app, options.logging, discriminatorByDataType[dataType]),
dataTypeMapping[mappingType](options)
)
Expand Down Expand Up @@ -130,13 +130,14 @@ const pipeStartByType = {
SignalK: signalKInput
}

function nmea2000input (subOptions) {
function nmea2000input (subOptions, logging) {
if (subOptions.type === 'ngt-1-canboatjs') {
return [
new require('./actisense-serial')({
device: subOptions.device,
app: subOptions.app,
outEvent: 'nmea2000out'
outEvent: 'nmea2000out',
plainText: logging
})
]
} else if (subOptions.type === 'canbus-canboatjs') {
Expand Down

0 comments on commit 47b0092

Please sign in to comment.