Scott Bender - If you are a author of a plugin ...
If you are a author of a plugin that sends NMEA 2000 data via
nmea2000JsonOut
or gets it via the N2KAnalyzerOut
events. Please pipe in here. I would like to get input on the canboatjs 3.x changes and get you moving there.3 Replies
On the sending part, there is a new package
https://github.com/canboat/ts-pgns
GitHub
GitHub - canboat/ts-pgns: TypeScript Canboat PGN Definitions
TypeScript Canboat PGN Definitions. Contribute to canboat/ts-pgns development by creating an account on GitHub.
It makes creating PGN data typesafe and way easier.
I have converted many plugins to use this. Probably the best and most complex one is signalk-to-nmea2000. I good example is this:
https://github.com/SignalK/signalk-to-nmea2000/blob/f52cc1bff6569ec90db706a2c4818fef4ff681c7/src/conversions/heading.ts#L15
GitHub
signalk-to-nmea2000/src/conversions/heading.ts at f52cc1bff6569ec90...
Plugin to convert Signal K to NMEA2000. Contribute to SignalK/signalk-to-nmea2000 development by creating an account on GitHub.
And data types and keys are checked at compile time.