diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-11-11 21:09:01 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-11-11 21:09:01 -0800 |
commit | 01b7edfdb45fc77b760b441627971d29af9ea60f (patch) | |
tree | 9b66c3d90010fd4853eeca94056ebe569f595181 | |
parent | a681b0608a18416ad58bfeedacda0b036a856da4 (diff) | |
download | traccar-server-01b7edfdb45fc77b760b441627971d29af9ea60f.tar.gz traccar-server-01b7edfdb45fc77b760b441627971d29af9ea60f.tar.bz2 traccar-server-01b7edfdb45fc77b760b441627971d29af9ea60f.zip |
Use correct decoder
-rw-r--r-- | src/main/java/org/traccar/protocol/OutsafeProtocol.java | 2 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/OutsafeProtocol.java b/src/main/java/org/traccar/protocol/OutsafeProtocol.java index ece433e3f..c728a404d 100644 --- a/src/main/java/org/traccar/protocol/OutsafeProtocol.java +++ b/src/main/java/org/traccar/protocol/OutsafeProtocol.java @@ -31,7 +31,7 @@ public class OutsafeProtocol extends BaseProtocol { pipeline.addLast(new HttpResponseEncoder()); pipeline.addLast(new HttpRequestDecoder()); pipeline.addLast(new HttpObjectAggregator(65535)); - pipeline.addLast(new SigfoxProtocolDecoder(OutsafeProtocol.this)); + pipeline.addLast(new OutsafeProtocolDecoder(OutsafeProtocol.this)); } }); } diff --git a/src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java index 82bc7dec7..12f0106f9 100644 --- a/src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java @@ -12,6 +12,9 @@ public class OutsafeProtocolDecoderTest extends ProtocolTest { OutsafeProtocolDecoder decoder = new OutsafeProtocolDecoder(null); verifyPosition(decoder, request(HttpMethod.POST, "/", + buffer("{\"device\":\"862061044762093\",\"owner\":\"\",\"data\":{\"cmd\":\"GEO\",\"ms1\":82,\"ms2\":80,\"ms3\":5266,\"ms4\":-68,\"observation\":\"$NMEA 323455\",\"content\":null},\"time\":null,\"origin\":\"TCP\",\"latitude\":19.334734,\"longitude\":-99.307236,\"altitude\":2000,\"heading\":0,\"rssi\":123}"))); + + verifyPosition(decoder, request(HttpMethod.POST, "/", buffer("{\"device\":\"1e09d88a-fe8e-4dee-90b9-6297088ff3de\",\"owner\":\"\",\"data\":{\"cmd\":\"GEO\",\"ms1\":82,\"ms2\":80,\"ms3\":5266,\"ms4\":-68,\"observation\":\"$NMEA 323455\",\"content\":null},\"time\":null,\"origin\":\"TCP\",\"latitude\":19.334734,\"longitude\":-99.307236,\"altitude\":2000,\"heading\":0,\"rssi\":123}"))); } |