Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PGN127507 test data #165

Closed
nmbath opened this issue Aug 26, 2021 · 0 comments
Closed

PGN127507 test data #165

nmbath opened this issue Aug 26, 2021 · 0 comments

Comments

@nmbath
Copy link
Contributor

nmbath commented Aug 26, 2021

PGN127507 is in canboat, with recent modification from single packet to fast packet definition (canboat/canboat#243). There is an issue in SignalK to add support for the PGN (SignalK/n2k-signalk#219).

I have noticed that there is no test PGN definition in canboatjs. The following I hope supplies a test module for the PGN.

module.exports = [{
"expected": {"timestamp":"2016-02-28T19:57:02.829Z","prio":6,"src":129,"dst":255,"pgn":127507,"description":"Charger Status","fields":{"Instance":114,"Battery Instance":6,"Operating State":"Disabled","Charge Mode":"Standalone","Charger Enable/Disable":"Off"}},
"input": "2016-02-28T19:57:02.829Z,6,127507,129,255,6,72,06,08,fc,ff,ff"
}]

When run in the test harness it passes..

✓ to pgn 127507 (Charger Status) converts

Please however note, the can message used in both the above test and the Actisense screen shot does not deliver a correct output when parsed through candumpanalyzerjs.

cat PGN127507-single.txt
can0 19F21381 [8] A0 06 71 00 08 FC FF FF

cat PGN127507-single.txt | ./canboat/canboatjs/bin/candumpanalyzerjs
{"canId":435295105,"prio":6,"src":129,"dst":255,"pgn":127507,"timestamp":"2021-08-26T18:10:07.989Z","fields":{"Instance":160,"Battery Instance":6,"Operating State":"Bulk","Charge Mode":7,"Charger Enable/Disable":"Off","Equalization Pending":"Off","Reserved1":"0","Equalization Time Remaining":64520},"description":"Charger Status"}

Note the incorrect INSTANCE and values on all subsequent fields. This reflects the issue reported here SignalK/n2k-signalk#219 and #161. As noted in issue 161, I can get correct behaviour by changing the pgns.json file and defining the length as 9. The problem of parsing fast packets with 6 or less fields seems to be a canboatjs issues and not n2k-signalk.

image

nmbath added a commit to nmbath/canboatjs that referenced this issue Jan 12, 2022
Requires latest PGN definition from canboat

Addresses issue: PGN127507 test data canboat#165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants