diff options
Diffstat (limited to 'src/org/traccar/protocol/TeltonikaProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/TeltonikaProtocolDecoder.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java index a9679f764..30a3f4cda 100644 --- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java +++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java @@ -67,7 +67,7 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_TYPE, buf.readUnsignedByte()); - position.set("command", buf.readBytes(buf.readInt()).toString(StandardCharsets.US_ASCII)); + position.set(Position.KEY_COMMAND, buf.readBytes(buf.readInt()).toString(StandardCharsets.US_ASCII)); } @@ -96,10 +96,10 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder { position.set(Position.PREFIX_ADC + 1, readValue(buf, length, false)); break; case 66: - position.set(Position.KEY_POWER, readValue(buf, length, false) + "mV"); + position.set(Position.KEY_POWER, readValue(buf, length, false) * 0.001); break; case 67: - position.set(Position.KEY_BATTERY, readValue(buf, length, false) + "mV"); + position.set(Position.KEY_BATTERY, readValue(buf, length, false) * 0.001); break; case 70: position.set(Position.KEY_DEVICE_TEMP, readValue(buf, length, true) * 0.1); @@ -178,7 +178,7 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder { } if (BitUtil.check(locationMask, 7)) { - position.set("operator", buf.readUnsignedInt()); + position.set(Position.KEY_OPERATOR, buf.readUnsignedInt()); } } else { |