aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/TytanProtocolDecoder.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/TytanProtocolDecoder.java b/src/org/traccar/protocol/TytanProtocolDecoder.java
index e6710413e..3cc0d0568 100644
--- a/src/org/traccar/protocol/TytanProtocolDecoder.java
+++ b/src/org/traccar/protocol/TytanProtocolDecoder.java
@@ -115,7 +115,7 @@ public class TytanProtocolDecoder extends BaseProtocolDecoder {
switch (type) {
case 2:
- position.set(Event.KEY_ODOMETER, buf.readUnsignedMedium() * 5);
+ position.set(Event.KEY_ODOMETER, buf.readUnsignedMedium());
break;
case 5:
position.set(Event.KEY_INPUT, buf.readUnsignedByte());
@@ -179,15 +179,15 @@ public class TytanProtocolDecoder extends BaseProtocolDecoder {
case 107:
{
int fuel = buf.readUnsignedShort();
- switch (fuel >> 16) {
+ switch (fuel >> 14) {
case 1:
- position.set(Event.KEY_FUEL, (buf.readUnsignedShort() & 0x3fff) * 0.4 + "%");
+ position.set(Event.KEY_FUEL, (fuel & 0x3fff) * 0.4 + "%");
break;
case 2:
- position.set(Event.KEY_FUEL, (buf.readUnsignedShort() & 0x3fff) * 0.5 + "l");
+ position.set(Event.KEY_FUEL, (fuel & 0x3fff) * 0.5 + " l");
break;
case 3:
- position.set(Event.KEY_FUEL, (buf.readUnsignedShort() & 0x3fff) * -0.5 + "l");
+ position.set(Event.KEY_FUEL, (fuel & 0x3fff) * -0.5 + " l");
break;
}
}