diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-11-28 20:01:45 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-11-28 20:01:58 +1300 |
commit | 818fff6daf87a9e90a225122d04dc8b93694a8c6 (patch) | |
tree | 8f24ab85903d404023a27c35566efe6320da5dee /test/org | |
parent | 97360131f2f5f53c79e4d41a3e5b3bfebe49d960 (diff) | |
download | traccar-server-818fff6daf87a9e90a225122d04dc8b93694a8c6.tar.gz traccar-server-818fff6daf87a9e90a225122d04dc8b93694a8c6.tar.bz2 traccar-server-818fff6daf87a9e90a225122d04dc8b93694a8c6.zip |
Fix eelink checksum and decode result
Diffstat (limited to 'test/org')
-rw-r--r-- | test/org/traccar/protocol/EelinkProtocolDecoderTest.java | 6 | ||||
-rw-r--r-- | test/org/traccar/protocol/EelinkProtocolEncoderTest.java | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/test/org/traccar/protocol/EelinkProtocolDecoderTest.java b/test/org/traccar/protocol/EelinkProtocolDecoderTest.java index b029795e0..a7477c823 100644 --- a/test/org/traccar/protocol/EelinkProtocolDecoderTest.java +++ b/test/org/traccar/protocol/EelinkProtocolDecoderTest.java @@ -14,11 +14,11 @@ public class EelinkProtocolDecoderTest extends ProtocolTest { "454C0027E753035254407167747167670100180002035254407167747100200205020500010432000086BD")); verifyPosition(decoder, binary( - "454C0050EAE2035254407167747167671200410021590BD93803026B940D0C3952AD0021000000000501CC0001A53F0170F0AB1305890F11000000000000C2D0001C001600000000000000000000000000000000")); - - verifyNull(decoder, binary( "676780005E5788014C754C754C61743A4E32332E3131313734330A4C6F6E3A453131342E3430393233380A436F757273653A302E30300A53706565643A302E31374B4D2F480A446174652054696D653A323031352D30392D31332032303A32313A3230")); + verifyPosition(decoder, binary( + "454C0050EAE2035254407167747167671200410021590BD93803026B940D0C3952AD0021000000000501CC0001A53F0170F0AB1305890F11000000000000C2D0001C001600000000000000000000000000000000")); + verifyNull(decoder, binary( "676701000c007b03525440717505180104")); diff --git a/test/org/traccar/protocol/EelinkProtocolEncoderTest.java b/test/org/traccar/protocol/EelinkProtocolEncoderTest.java index e0843b36d..96be348d1 100644 --- a/test/org/traccar/protocol/EelinkProtocolEncoderTest.java +++ b/test/org/traccar/protocol/EelinkProtocolEncoderTest.java @@ -9,13 +9,13 @@ public class EelinkProtocolEncoderTest extends ProtocolTest { @Test public void testEncode() throws Exception { - EelinkProtocolEncoder encoder = new EelinkProtocolEncoder(false); - Command command = new Command(); command.setDeviceId(1); command.setType(Command.TYPE_ENGINE_STOP); - verifyCommand(encoder, command, binary("676780000f0000010000000052454c41592c3123")); + verifyCommand(new EelinkProtocolEncoder(false), command, binary("676780000f0000010000000052454c41592c3123")); + + verifyCommand(new EelinkProtocolEncoder(true), command, binary("454c0022b41a0123456789012345676780000f0000010000000052454c41592c3123")); } |