From 7374a69f188918cbd247047fcb5fe09dabffa400 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 20 Jan 2024 10:20:51 -0800 Subject: Ruptela FM Pro4 attributes --- .../traccar/protocol/RuptelaProtocolDecoder.java | 42 +++++++++++++++++++--- 1 file changed, 37 insertions(+), 5 deletions(-) (limited to 'src/main/java/org/traccar') diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java index cde626c5f..55b3c900f 100644 --- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 - 2022 Anton Tananaev (anton@traccar.org) + * Copyright 2013 - 2024 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -112,6 +112,10 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { case 5: position.set(Position.PREFIX_IN + (id - 1), readValue(buf, length, false)); break; + case 13: + case 173: + position.set(Position.KEY_MOTION, readValue(buf, length, false) > 0); + break; case 20: position.set(Position.PREFIX_ADC + 3, readValue(buf, length, false)); break; @@ -133,6 +137,9 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { case 32: position.set(Position.KEY_DEVICE_TEMP, readValue(buf, length, true)); break; + case 39: + position.set(Position.KEY_ENGINE_LOAD, readValue(buf, length, true)); + break; case 65: position.set(Position.KEY_ODOMETER, readValue(buf, length, true)); break; @@ -149,9 +156,18 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_ALARM, Position.ALARM_JAMMING); } break; + case 94: + position.set(Position.KEY_RPM, readValue(buf, length, true) * 0.25); + break; case 95: position.set(Position.KEY_OBD_SPEED, readValue(buf, length, true)); break; + case 98: + position.set("fuelRate", readValue(buf, length, true) * 100 / 255.0); + break; + case 100: + position.set(Position.KEY_FUEL_CONSUMPTION, readValue(buf, length, true) / 20.0); + break; case 134: if (readValue(buf, length, false) > 0) { position.set(Position.KEY_ALARM, Position.ALARM_BRAKING); @@ -165,15 +181,31 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { case 150: position.set(Position.KEY_OPERATOR, readValue(buf, length, false)); break; - case 170: - position.set(Position.KEY_CHARGE, readValue(buf, length, false) > 0); + case 163: + position.set(Position.KEY_ODOMETER, readValue(buf, length, false) * 5); break; - case 173: - position.set(Position.KEY_MOTION, readValue(buf, length, false) > 0); + case 164: + position.set(Position.KEY_ODOMETER_TRIP, readValue(buf, length, false) * 5); + break; + case 165: + position.set(Position.KEY_OBD_SPEED, readValue(buf, length, false) / 256.0); break; + case 166: case 197: position.set(Position.KEY_RPM, readValue(buf, length, false) * 0.125); break; + case 170: + position.set(Position.KEY_CHARGE, readValue(buf, length, false) > 0); + break; + case 205: + position.set(Position.KEY_FUEL_LEVEL, readValue(buf, length, false)); + break; + case 207: + position.set(Position.KEY_FUEL_LEVEL, readValue(buf, length, false) * 0.4); + break; + case 208: + position.set(Position.KEY_FUEL_USED, readValue(buf, length, false) * 0.5); + break; case 251: case 409: position.set(Position.KEY_IGNITION, readValue(buf, length, false) > 0); -- cgit v1.2.3