From bebd082b08e3f0aa5f5fb5e0b0b9ec697d9815f8 Mon Sep 17 00:00:00 2001 From: KalenXI Date: Tue, 12 May 2020 20:46:01 -0400 Subject: Update Freematics API (#4532) * Update Freematics API * Update Freematics API Co-authored-by: KalenXI --- .../traccar/protocol/FreematicsProtocolDecoder.java | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/main/java/org') 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; } } -- cgit v1.2.3