antipole2 / JavaScript_pi

JavaScript plugin for OpenCPN
GNU General Public License v3.0
2 stars 4 forks source link

NMEA2000 object - occasional error 'Data for uniqueNumber is 12469576 exceeds maximum' #108

Open antipole2 opened 3 months ago

antipole2 commented 3 months ago

NMEA2000 address claim messages sometimes result in this error message being displayed.

I will look at this over winter.

It is possibly an error in the Canboat descriptor for this PGN. I might just suppress the message in this case.

TwoCanPlugIn commented 3 months ago

There is a bug somewhere. Unique number is 21 bits.

Eg. If I was parsing the bytes from PGN 60928 (ISO Address Claim), I would derive the unique id using: uniqueId = (payload[0] | (payload[1] << 8) | (payload[2] << 16) | (payload[3] << 24)) & 0x1FFFFF;

antipole2 commented 3 months ago

@TwoCanPlugIn Thanks - useful input for when I look at it - but not while I am sailing.