diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-05-09 01:20:08 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-05-09 01:20:08 +1200 |
commit | f8fcf51478cb4794208c8a0e0c3b2dee496f02d2 (patch) | |
tree | ba431a272f4b025496a4a0c83da9cc6b0186e72a | |
parent | f35567956593f78f3f9630add815710b9df47634 (diff) | |
download | trackermap-server-f8fcf51478cb4794208c8a0e0c3b2dee496f02d2.tar.gz trackermap-server-f8fcf51478cb4794208c8a0e0c3b2dee496f02d2.tar.bz2 trackermap-server-f8fcf51478cb4794208c8a0e0c3b2dee496f02d2.zip |
Fix MiniFinder GSM signal decoding
-rw-r--r-- | src/org/traccar/protocol/MiniFinderProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java index 9b4372c5b..c3279da43 100644 --- a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java +++ b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java @@ -103,7 +103,7 @@ public class MiniFinderProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_ALARM, Position.ALARM_MOVEMENT); } - position.set(Position.KEY_RSSI, BitUtil.between(flags, 16, 20)); + position.set(Position.KEY_RSSI, BitUtil.between(flags, 16, 21)); position.set(Position.KEY_CHARGE, BitUtil.check(flags, 22)); } diff --git a/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java b/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java index c3b5dd674..fd16df779 100644 --- a/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java +++ b/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java @@ -20,6 +20,9 @@ public class MiniFinderProtocolDecoderTest extends ProtocolTest { "!1,860719027585011")); verifyPosition(decoder, text( + "!D,02/05/17,19:56:17,47.083542,15.482373,0,0,100001,479.3,100,4,9,0")); + + verifyPosition(decoder, text( "!D,15/04/17,13:58:53,51.483067,-0.452548,60,180,140001,28.7,47,4,13,0")); verifyPosition(decoder, text( |