aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/OigoProtocolDecoder.java
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2017-03-05 00:44:48 -0500
committerjon-stumpf <jon.stumpf@gmail.com>2017-03-05 00:44:48 -0500
commitc62fa33fb0748f44d9584970924c90c70f4f976a (patch)
tree66381a8c1c72eff1c1133be4f8defbc5a07bade5 /src/org/traccar/protocol/OigoProtocolDecoder.java
parent7eb264775a5415260443db91cd5f1c1e7548324d (diff)
downloadtrackermap-server-c62fa33fb0748f44d9584970924c90c70f4f976a.tar.gz
trackermap-server-c62fa33fb0748f44d9584970924c90c70f4f976a.tar.bz2
trackermap-server-c62fa33fb0748f44d9584970924c90c70f4f976a.zip
Converted all KEY_POWER and KEY_BATTERY to volts; Removed string "mV";
Diffstat (limited to 'src/org/traccar/protocol/OigoProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/OigoProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/OigoProtocolDecoder.java b/src/org/traccar/protocol/OigoProtocolDecoder.java
index 9538053b6..54360c932 100644
--- a/src/org/traccar/protocol/OigoProtocolDecoder.java
+++ b/src/org/traccar/protocol/OigoProtocolDecoder.java
@@ -121,11 +121,11 @@ public class OigoProtocolDecoder extends BaseProtocolDecoder {
}
if (BitUtil.check(mask, 9)) {
- position.set(Position.KEY_POWER, buf.readUnsignedShort() + "mV");
+ position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.001);
}
if (BitUtil.check(mask, 10)) {
- position.set(Position.KEY_BATTERY, buf.readUnsignedShort() + "mV");
+ position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.001);
}
if (BitUtil.check(mask, 11)) {
@@ -198,7 +198,7 @@ public class OigoProtocolDecoder extends BaseProtocolDecoder {
position.setCourse(buf.readUnsignedShort());
position.setSpeed(UnitsConverter.knotsFromMph(buf.readUnsignedByte()));
- position.set(Position.KEY_POWER, buf.readUnsignedByte() * 100 + "mV");
+ position.set(Position.KEY_POWER, buf.readUnsignedByte() * 0.1);
position.set(Position.PREFIX_IO + 1, buf.readUnsignedByte());
dateBuilder.setSecond(buf.readUnsignedByte());