You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this library to parse a stream of NMEA2k messages from an NGT-1 device. I really like this library - great work btw 👍 But, periodically I get bad values for some PGN's, especially PGN 127489 (Engine Parameters, Dynamic). I've been trying to debug the source of the problem for some time now, and after managing to extract RAW NMEA2k messages and writing Go tests I was able to pinpoint the problem. The 'maxValue' checking that is commented out in the raw_message.go seems to fix the problem:
Hi.
I'm using this library to parse a stream of NMEA2k messages from an NGT-1 device. I really like this library - great work btw 👍 But, periodically I get bad values for some PGN's, especially PGN 127489 (Engine Parameters, Dynamic). I've been trying to debug the source of the problem for some time now, and after managing to extract RAW NMEA2k messages and writing Go tests I was able to pinpoint the problem. The 'maxValue' checking that is commented out in the
raw_message.go
seems to fix the problem:argo/nmea2k/raw_message.go
Line 443 in 11aac9a
I also got some help by comparing the
raw_message.go:extractNumber(..)
with the correspondingextractNumber
function from the canboat project: https://github.com/canboat/canboat/blob/master/analyzer/pgn.c#L253So my question is why this code block is commented out?
Here is my Go tests which can reproduce the problem
raw_message_test.go
:By uncommenting the maxValue validation checking in
raw_message.go:extractNumber(..)
this test case works.The text was updated successfully, but these errors were encountered: