From e5c21c80df6310ea29209dc037ba82be5fbf441e Mon Sep 17 00:00:00 2001 From: Sanjeewa Vithanage Date: Fri, 26 Jan 2024 17:03:02 +0200 Subject: analog input voltage decode --- src/main/java/org/traccar/protocol/UproProtocolDecoder.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/org') diff --git a/src/main/java/org/traccar/protocol/UproProtocolDecoder.java b/src/main/java/org/traccar/protocol/UproProtocolDecoder.java index ed714e464..debb85365 100644 --- a/src/main/java/org/traccar/protocol/UproProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/UproProtocolDecoder.java @@ -310,6 +310,11 @@ public class UproProtocolDecoder extends BaseProtocolDecoder { position.set("serial", data.toString(StandardCharsets.US_ASCII).substring(3)); } break; + case 'd': + if (data.readableBytes() > 3) { + position.set(Position.PREFIX_ADC + 1, Integer.parseInt(data.readSlice(5).toString(StandardCharsets.US_ASCII)) * 0.01); + } + break; default: break; } -- cgit v1.2.3