diff options
-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); |