From e938fe96f5edca81551323d37ff8c9f02e28773c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 19 Jun 2024 08:41:17 -0700 Subject: Updated Sucre Lee protocol --- src/test/java/org/traccar/ProtocolTest.java | 3 +++ src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java | 8 ++++++++ 2 files changed, 11 insertions(+) (limited to 'src/test/java/org') diff --git a/src/test/java/org/traccar/ProtocolTest.java b/src/test/java/org/traccar/ProtocolTest.java index 23ba562f8..0726000be 100644 --- a/src/test/java/org/traccar/ProtocolTest.java +++ b/src/test/java/org/traccar/ProtocolTest.java @@ -123,6 +123,9 @@ public class ProtocolTest extends BaseTest { case "course": assertEquals(expected, position.getCourse()); break; + case "altitude": + assertEquals(expected, position.getAltitude()); + break; default: assertEquals(expected, position.getAttributes().get(key)); break; diff --git a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java index 962bcb5c8..32a492df5 100644 --- a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java @@ -17,6 +17,14 @@ public class Gt06ProtocolDecoderTest extends ProtocolTest { verifyNull(decoder, binary( "78780D01086471700328358100093F040D0A")); + verifyAttribute(decoder, binary( + "7878293218061301261ccd0274c4ad050d7c960018000a02d4000ac3c70dbdc40b46f004210202af001784290d0a"), + "altitude", -31703.0); + + verifyAttribute(decoder, binary( + "78782a31180613012b39cc0274c4dc050d7cd000180002d4000ac3c70dbdc4150100000000000002a6000ea40b0d0a"), + "altitude", 678.0); + verifyAttribute(decoder, binary( "7878281718060e021831c6026e8acc0c361b1000140001cc00286d000f4dbf0000012ca7e001000004b2630d0a"), Position.KEY_DRIVER_UNIQUE_ID, "0000012ca7e00100"); -- cgit v1.2.3