diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-10-05 14:41:35 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-10-05 14:41:35 -0700 |
commit | d2c24e28111e351f392ac0e579f4f1d443ebcf1d (patch) | |
tree | ff9bd8f5788b0a98d9180a10e52fdb7878deaeee /src/main/java | |
parent | 4ecca566c4faba5f526b92d5920f542a5b03cc95 (diff) | |
download | trackermap-server-d2c24e28111e351f392ac0e579f4f1d443ebcf1d.tar.gz trackermap-server-d2c24e28111e351f392ac0e579f4f1d443ebcf1d.tar.bz2 trackermap-server-d2c24e28111e351f392ac0e579f4f1d443ebcf1d.zip |
Decode ADC values
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/protocol/GatorProtocolDecoder.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/GatorProtocolDecoder.java b/src/main/java/org/traccar/protocol/GatorProtocolDecoder.java index 31500bae6..043839be9 100644 --- a/src/main/java/org/traccar/protocol/GatorProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/GatorProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 - 2018 Anton Tananaev (anton@traccar.org) + * Copyright 2013 - 2019 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -120,8 +120,10 @@ public class GatorProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_STATUS, buf.readUnsignedByte()); position.set("key", buf.readUnsignedByte()); - position.set("oil", buf.readUnsignedShort() / 10.0); - position.set(Position.KEY_POWER, buf.readUnsignedByte() + buf.readUnsignedByte() * 0.01); + + position.set(Position.PREFIX_ADC + 1, buf.readUnsignedByte() + buf.readUnsignedByte() * 0.01); + position.set(Position.PREFIX_ADC + 2, buf.readUnsignedByte() + buf.readUnsignedByte() * 0.01); + position.set(Position.KEY_ODOMETER, buf.readUnsignedInt()); return position; |