aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/UproProtocolDecoder.java2
-rw-r--r--src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/UproProtocolDecoder.java b/src/main/java/org/traccar/protocol/UproProtocolDecoder.java
index 8d2e5de0a..d3f9882dd 100644
--- a/src/main/java/org/traccar/protocol/UproProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/UproProtocolDecoder.java
@@ -298,7 +298,7 @@ public class UproProtocolDecoder extends BaseProtocolDecoder {
mcc, mnc,
Integer.parseInt(stringValue.substring(offset, offset + 4), 16),
Long.parseLong(stringValue.substring(offset + 4, offset + 12), 16),
- Integer.parseInt(stringValue.substring(offset + 12, offset + 14))));
+ Integer.parseInt(stringValue.substring(offset + 12, offset + 14), 16)));
}
} else {
position.set(Position.KEY_POWER,
diff --git a/src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java
index f070c6201..ac9c83e01 100644
--- a/src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java
@@ -12,6 +12,9 @@ public class UproProtocolDecoderTest extends ProtocolTest {
var decoder = inject(new UproProtocolDecoder(null));
verifyPosition(decoder, buffer(
+ "*HQ200862406278000161,AB1&A1103312243149711422697470000040724&B0100000000&F0000&R2900&N04&Y3246011F4202C1460D351F4202C146113A1F4204C1460B3C&Q06f4911e6155e127b04e2640509e325091e3cc45ed4e788a20e024a151f81a679be2a45250d4f7e7dff75b&T63&J000300&K00100&X(k89882280666065148193)(10)(J0000)(PMODE,0,10)(20)(5000A)#"));
+
+ verifyPosition(decoder, buffer(
"*HQ201999999,BA&A1656512233362911356523660000230618&B0100060010&C00000<6<&F0000&R2405&V0109&W0000003E&K00100&T65&I54600027A00FCB6227A00FCA5727A00E955327A00E8B5327A00F9748&Y54600027A000000FCB6227A000000FCA5727A000000E955327A000000E8B5327A000000F9748&b00A7E81007607#"));
verifyPosition(decoder, buffer(