diff options
author | Sanjeewa Vithanage <vithanagevms@gmail.com> | 2024-01-26 17:03:02 +0200 |
---|---|---|
committer | Sanjeewa Vithanage <vithanagevms@gmail.com> | 2024-01-26 17:03:02 +0200 |
commit | e5c21c80df6310ea29209dc037ba82be5fbf441e (patch) | |
tree | 24d9c941f5dfd19d5c95e2015b2b828cb233bbd8 /src/main | |
parent | 29b8caa047b3b1468eb8b21e76f5df8b5c2f6ddb (diff) | |
download | trackermap-server-e5c21c80df6310ea29209dc037ba82be5fbf441e.tar.gz trackermap-server-e5c21c80df6310ea29209dc037ba82be5fbf441e.tar.bz2 trackermap-server-e5c21c80df6310ea29209dc037ba82be5fbf441e.zip |
analog input voltage decode
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/protocol/UproProtocolDecoder.java | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |