Skip to content

Commit

Permalink
fix: to-pgn does not support strings for manufacturer code (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbender9 authored Jun 18, 2024
1 parent af1b006 commit 6bc159b
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions lib/toPgn.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,6 @@ function toPgn(data) {
const pgn_number = data.pgn
var pgnData = pgnList[0]

if ( pgnList.length > 1 && data['Manufacturer Code'] ) {
pgnData = pgnList.find(pgn => {
let mc = pgn.Fields.find(field => (field.Name === 'Manufacturer Code'))
//console.log(`mc ${JSON.stringify(mc)}`)
return mc && mc.Match && mc.Match == data['Manufacturer Code']
})
if ( !pgnData )
{
debug("no pgn found: " + data.pgn)
return undefined
}
}

var bs = new BitStream(Buffer.alloc(500))

if ( data.fields ) {
Expand Down

0 comments on commit 6bc159b

Please sign in to comment.