Skip to content

Commit

Permalink
Merge pull request #5478 from jcardus/master
Browse files Browse the repository at this point in the history
Fix GTCAN in GV355CEU
  • Loading branch information
tananaev authored Dec 14, 2024
2 parents 7cb95f4 + 899902b commit 70d76e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ private Object decodeCan(Channel channel, SocketAddress remoteAddress, String[]
reportMaskExt = Long.parseLong(v[index - 1], 16);
}
if (BitUtil.check(reportMaskExt, 0) && !v[index++].isEmpty()) {
position.set("adBlueLevel", Integer.parseInt(v[index - 1]));
position.set("adBlueLevel", Double.parseDouble(v[index - 1].substring(1)));
}
if (BitUtil.check(reportMaskExt, 1) && !v[index++].isEmpty()) {
position.set("axleWeight1", Integer.parseInt(v[index - 1]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ public void testDecode() throws Exception {

var decoder = inject(new Gl200TextProtocolDecoder(null));

verifyAttribute(decoder, buffer(
"+BUFF:GTCAN,8020050402,867488060267845,,00,1,E00FFFFF,YS2K4X20001928588,1,H149381,4236.08,0,0,58,,P94.80,,0,529.00,0.03,0.33,0.77,8688,0008,0042,00,00,001FFFFF,P100.00,5571,,,0,0,,,20,7,0,0.36,0.00,0.00,0,E E05653940B000003,,C*********,,4054MTX,0000,,,1,0.0,101,698.5,-3.647673,40.481997,20241213113715,0214,0003,04D2,B801,00,20241213113715,1A47$"),
"adBlueLevel", 100.0);

verifyAttribute(decoder, buffer(
"+RESP:GTINF,C20113,869653060997976,,1A,89464278206103756482,19,0,11,12295,13985,4.25,0,0,,,20241104220934,0,0,,00,00,,,20241104162009,06D6$"),
"power2", 13.985);
Expand Down

0 comments on commit 70d76e1

Please sign in to comment.