diff options
author | Anton Tananaev <anton@traccar.org> | 2024-03-08 06:52:02 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-03-08 06:52:02 -0800 |
commit | 04e482bd22029710fd512bfd7916781cd5c79495 (patch) | |
tree | 3a7a2a39651f2237691ea231d64d650febef96f7 | |
parent | 75b404db5c790bf37c05fabf1cbbd2027ad1db25 (diff) | |
download | trackermap-server-04e482bd22029710fd512bfd7916781cd5c79495.tar.gz trackermap-server-04e482bd22029710fd512bfd7916781cd5c79495.tar.bz2 trackermap-server-04e482bd22029710fd512bfd7916781cd5c79495.zip |
Fix Esky ES840 decoding
-rw-r--r-- | src/main/java/org/traccar/protocol/EskyProtocolDecoder.java | 2 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/EskyProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/EskyProtocolDecoder.java b/src/main/java/org/traccar/protocol/EskyProtocolDecoder.java index 4239022d0..14b6aaa5a 100644 --- a/src/main/java/org/traccar/protocol/EskyProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/EskyProtocolDecoder.java @@ -49,7 +49,7 @@ public class EskyProtocolDecoder extends BaseProtocolDecoder { .number("(d+.d+)[+;]") // speed .number("(d+)[+;]") // course .groupBegin() - .text("0x").number("(d+)[+;]") // input + .text("0x").number("(x+)[+;]") // input .number("(d+)[+;]") // message type .number("(d+)[+;]") // odometer .groupEnd("?") diff --git a/src/test/java/org/traccar/protocol/EskyProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/EskyProtocolDecoderTest.java index feec3ebfb..26132eb4e 100644 --- a/src/test/java/org/traccar/protocol/EskyProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/EskyProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class EskyProtocolDecoderTest extends ProtocolTest { var decoder = inject(new EskyProtocolDecoder(null)); + verifyPosition(decoder, text( + "ET;1;864431045310325;R;0+240303180628+-33.40958+149.56797+0.00+63+0xb+0+17814846+1168+0+0+WVWZZZ6RZFY242201+135+DTCNULL")); + verifyAttribute(decoder, text( "ET;0;860337031066546;R;9+200717114059+41.32053+19.80761+0.30+0+0x2+8+40381744+0+1409+11"), Position.KEY_BATTERY, 14.09); |