From 14b7897b6df25a144da1a329f4a088b52a01571b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 8 May 2013 23:24:22 +1200 Subject: Fix Teltonika negative coordinates (fix #234) --- test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/org/traccar/protocol') diff --git a/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java b/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java index f896c1593..b24cbd471 100644 --- a/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java +++ b/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java @@ -18,6 +18,9 @@ public class TeltonikaProtocolDecoderTest { byte[] buf2 = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,(byte)0xA7,0x08,0x04,0x00,0x00,0x01,0x13,(byte)0xfc,0x20,(byte)0x8d,(byte)0xff,0x00,0x0f,0x14,(byte)0xf6,0x50,0x20,(byte)0x9c,(byte)0xca,(byte)0x80,0x00,0x6f,0x00,(byte)0xd6,0x04,0x00,0x04,0x00,0x04,0x03,0x01,0x01,0x15,0x03,0x16,0x03,0x00,0x01,0x46,0x00,0x00,0x01,0x5d,0x00,0x00,0x00,0x01,0x13,(byte)0xfc,0x17,0x61,0x0b,0x00,0x0f,0x14,(byte)0xff,(byte)0xe0,0x20,(byte)0x9c,(byte)0xc5,(byte)0x80,0x00,0x6e,0x00,(byte)0xc0,0x05,0x00,0x01,0x00,0x04,0x03,0x01,0x01,0x15,0x03,0x16,0x01,0x00,0x01,0x46,0x00,0x00,0x01,0x5e,0x00,0x00,0x00,0x01,0x13,(byte)0xfc,0x28,0x49,0x45,0x00,0x0f,0x15,0x0f,0x00,0x20,(byte)0x9c,(byte)0xd2,0x00,0x00,(byte)0x95,0x01,0x08,0x04,0x00,0x00,0x00,0x04,0x03,0x01,0x01,0x15,0x00,0x16,0x03,0x00,0x01,0x46,0x00,0x00,0x01,0x5d,0x00,0x00,0x00,0x01,0x13,(byte)0xfc,0x26,0x7c,0x5b,0x00,0x0f,0x15,0x0a,0x50,0x20,(byte)0x9c,(byte)0xcc,(byte)0xc0,0x00,(byte)0x93,0x00,0x68,0x04,0x00,0x00,0x00,0x04,0x03,0x01,0x01,0x15,0x00,0x16,0x03,0x00,0x01,0x46,0x00,0x00,0x01,0x5b,0x00,0x04,0x00,0x00}; assertNotNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(buf2))); + + byte[] buf3 = {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x47,0x08,0x06,0x00,0x00,0x01,0x3e,0x5a,0x60,(byte)0xa4,(byte)0xcb,0x00,0x3f,(byte)0xa7,(byte)0xb7,(byte)0x80,(byte)0xfc,0x42,0x45,0x18,0x00,0x42,0x00,0x00,0x0a,0x00,0x00,0x00,0x09,0x05,0x01,0x01,0x02,0x00,(byte)0xb3,0x00,(byte)0xb4,0x00,(byte)0xf0,0x00,0x03,0x42,0x68,(byte)0xa7,0x46,0x01,0x18,0x18,0x00,0x00,0x01,(byte)0xc7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x3e,0x5d,(byte)0xc8,(byte)0xba,0x28,0x00,0x3f,(byte)0xa7,(byte)0xc0,(byte)0x80,(byte)0xfc,0x42,0x46,0x04,0x00,0x01,0x00,0x00,0x05,0x00,0x00,0x00,0x09,0x05,0x01,0x01,0x02,0x00,(byte)0xb3,0x00,(byte)0xb4,0x00,(byte)0xf0,0x01,0x03,0x42,0x68,(byte)0xb4,0x46,0x00,(byte)0xef,0x18,0x00,0x00,0x01,(byte)0xc7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x3e,0x5d,(byte)0xc9,0x04,0x55,0x00,0x3f,(byte)0xa7,(byte)0xb6,0x40,(byte)0xfc,0x42,0x43,(byte)0x88,0x00,0x3a,0x00,0x00,0x07,0x00,0x00,(byte)0xf0,0x09,0x05,0x01,0x01,0x02,0x00,(byte)0xb3,0x00,(byte)0xb4,0x00,(byte)0xf0,0x00,0x03,0x42,0x68,(byte)0xdc,0x46,0x00,(byte)0xf7,0x18,0x00,0x00,0x01,(byte)0xc7,0x00,0x00,0x00,0x1d,0x00,0x00,0x00,0x01,0x3e,0x5d,(byte)0xc9,(byte)0xd3,0x68,0x00,0x3f,(byte)0xa7,(byte)0xb8,0x00,(byte)0xfc,0x42,0x44,0x30,0x00,0x49,0x00,0x00,0x04,0x00,0x00,0x00,0x09,0x05,0x01,0x01,0x02,0x00,(byte)0xb3,0x00,(byte)0xb4,0x00,(byte)0xf0,0x01,0x03,0x42,0x67,(byte)0xde,0x46,0x01,0x07,0x18,0x00,0x00,0x01,(byte)0xc7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x3e,0x5d,(byte)0xca,0x31,0x1d,0x00,0x3f,(byte)0xa7,(byte)0xb6,(byte)0x80,(byte)0xfc,0x42,0x43,(byte)0xcc,0x00,0x42,0x00,0x00,0x07,0x00,0x00,(byte)0xf0,0x09,0x05,0x01,0x01,0x02,0x00,(byte)0xb3,0x00,(byte)0xb4,0x00,(byte)0xf0,0x00,0x03,0x42,0x68,0x53,0x46,0x01,0x0b,0x18,0x00,0x00,0x01,(byte)0xc7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x3e,0x5d,(byte)0xcf,(byte)0xaf,(byte)0xe9,0x00,0x3f,(byte)0xa7,(byte)0xb6,0x00,(byte)0xfc,0x42,0x42,(byte)0xf0,0x00,0x3d,0x00,0x00,0x08,0x00,0x00,0x00,0x09,0x05,0x01,0x01,0x02,0x00,(byte)0xb3,0x00,(byte)0xb4,0x00,(byte)0xf0,0x00,0x03,0x42,0x68,0x52,0x46,0x01,0x19,0x18,0x00,0x00,0x01,(byte)0xc7,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x02,0x75}; + assertNotNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(buf3))); } -- cgit v1.2.3