aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/traccar/protocol/UproProtocolDecoder.java4
-rw-r--r--src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java5
2 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/protocol/UproProtocolDecoder.java b/src/main/java/org/traccar/protocol/UproProtocolDecoder.java
index 0e328c920..873b22006 100644
--- a/src/main/java/org/traccar/protocol/UproProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/UproProtocolDecoder.java
@@ -211,10 +211,6 @@ public class UproProtocolDecoder extends BaseProtocolDecoder {
case 'S':
position.set("obdTraffic", ByteBufUtil.hexDump(data));
break;
- case 'T':
- position.set(Position.KEY_BATTERY_LEVEL,
- Integer.parseInt(data.readSlice(2).toString(StandardCharsets.US_ASCII)));
- break;
case 'V':
position.set(Position.KEY_POWER,
Integer.parseInt(data.readSlice(4).toString(StandardCharsets.US_ASCII)) * 0.1);
diff --git a/src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java
index 856e527c4..e43ff322e 100644
--- a/src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java
@@ -2,6 +2,7 @@ package org.traccar.protocol;
import org.junit.Test;
import org.traccar.ProtocolTest;
+import org.traccar.model.Position;
public class UproProtocolDecoderTest extends ProtocolTest {
@@ -10,6 +11,10 @@ public class UproProtocolDecoderTest extends ProtocolTest {
UproProtocolDecoder decoder = new UproProtocolDecoder(null);
+ verifyAttribute(decoder, buffer(
+ "*VK200867282036729446,BA&A1759265051877702037465660022210819&B0000000000&W00&G000030&M830&N26&O1706&o11&T0783#"),
+ Position.KEY_BATTERY_LEVEL, 83.0);
+
verifyAttributes(decoder, buffer(
"*VK201867282035754650,AH&B0000000000&W00&M990&N31&Z02&b2&T0458#"));