aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorKalenXI <chiklit@gmail.com>2020-05-12 20:46:01 -0400
committerGitHub <noreply@github.com>2020-05-12 17:46:01 -0700
commitbebd082b08e3f0aa5f5fb5e0b0b9ec697d9815f8 (patch)
tree6774ec0cb1a785e3b1c889a538309bd31325bfe7 /src/main/java/org/traccar
parent0e51b3cb51a1067cde0aa7ea8a161b9dfe1d3711 (diff)
downloadtrackermap-server-bebd082b08e3f0aa5f5fb5e0b0b9ec697d9815f8.tar.gz
trackermap-server-bebd082b08e3f0aa5f5fb5e0b0b9ec697d9815f8.tar.bz2
trackermap-server-bebd082b08e3f0aa5f5fb5e0b0b9ec697d9815f8.zip
Update Freematics API (#4532)
* Update Freematics API * Update Freematics API Co-authored-by: KalenXI <kevin@lastedit.com>
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/FreematicsProtocolDecoder.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/FreematicsProtocolDecoder.java b/src/main/java/org/traccar/protocol/FreematicsProtocolDecoder.java
index ba47699c3..b6d7f4e45 100644
--- a/src/main/java/org/traccar/protocol/FreematicsProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/FreematicsProtocolDecoder.java
@@ -134,6 +134,9 @@ public class FreematicsProtocolDecoder extends BaseProtocolDecoder {
case 0xF:
position.set(Position.KEY_SATELLITES, Integer.parseInt(value));
break;
+ case 0x12:
+ position.set(Position.KEY_HDOP, Integer.parseInt(value));
+ break;
case 0x20:
position.set(Position.KEY_ACCELERATION, value);
break;
@@ -146,8 +149,23 @@ public class FreematicsProtocolDecoder extends BaseProtocolDecoder {
case 0x82:
position.set(Position.KEY_DEVICE_TEMP, Integer.parseInt(value) * 0.1);
break;
+ case 0x104:
+ position.set(Position.KEY_ENGINE_LOAD, Integer.parseInt(value));
+ break;
+ case 0x105:
+ position.set(Position.KEY_COOLANT_TEMP, Integer.parseInt(value));
+ break;
+ case 0x10c:
+ position.set(Position.KEY_RPM, Integer.parseInt(value));
+ break;
+ case 0x10d:
+ position.set(Position.KEY_OBD_SPEED, UnitsConverter.knotsFromKph(Integer.parseInt(value)));
+ break;
+ case 0x111:
+ position.set(Position.KEY_THROTTLE, Integer.parseInt(value));
+ break;
default:
- position.set(data[0], value);
+ position.set(Position.PREFIX_IO + key, value);
break;
}
}