diff options
author | jon-stumpf <jon.stumpf@gmail.com> | 2017-03-05 00:45:41 -0500 |
---|---|---|
committer | jon-stumpf <jon.stumpf@gmail.com> | 2017-03-05 00:45:41 -0500 |
commit | 0ba3f3ba0fc3ab04cfbbc860afcb736d838a7057 (patch) | |
tree | 02f23f93fcbbebfbea187d95363956166b9945c1 /src/org/traccar/protocol/TotemProtocolDecoder.java | |
parent | c62fa33fb0748f44d9584970924c90c70f4f976a (diff) | |
download | trackermap-server-0ba3f3ba0fc3ab04cfbbc860afcb736d838a7057.tar.gz trackermap-server-0ba3f3ba0fc3ab04cfbbc860afcb736d838a7057.tar.bz2 trackermap-server-0ba3f3ba0fc3ab04cfbbc860afcb736d838a7057.zip |
Performed all KEY_POWER and KEY_BATTERY conversions using multiplication versus division;
Diffstat (limited to 'src/org/traccar/protocol/TotemProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/TotemProtocolDecoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/TotemProtocolDecoder.java b/src/org/traccar/protocol/TotemProtocolDecoder.java index 67a1d1213..c7dc9e6c1 100644 --- a/src/org/traccar/protocol/TotemProtocolDecoder.java +++ b/src/org/traccar/protocol/TotemProtocolDecoder.java @@ -275,7 +275,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { position.setTime(dateBuilder.getDate()); position.set(Position.PREFIX_IO + 1, parser.next()); - position.set(Position.KEY_BATTERY, parser.nextDouble() / 10); + position.set(Position.KEY_BATTERY, parser.nextDouble() * 0.1); position.set(Position.KEY_POWER, parser.nextDouble()); position.set(Position.PREFIX_ADC + 1, parser.next()); position.set(Position.PREFIX_ADC + 2, parser.next()); @@ -303,7 +303,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt()); position.setTime(dateBuilder.getDate()); - position.set(Position.KEY_BATTERY, parser.nextDouble() / 10); + position.set(Position.KEY_BATTERY, parser.nextDouble() * 0.1); position.set(Position.KEY_POWER, parser.nextDouble()); position.set(Position.PREFIX_ADC + 1, parser.next()); |