From 94fbc93f8b0a75fe17e529355c4e7758b81b4776 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 14 Jun 2023 22:21:18 -0700 Subject: Additional Atrack parameters --- .../org/traccar/protocol/AtrackProtocolDecoder.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/main/java/org') diff --git a/src/main/java/org/traccar/protocol/AtrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/AtrackProtocolDecoder.java index aa19e9e41..8896dcfb0 100644 --- a/src/main/java/org/traccar/protocol/AtrackProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/AtrackProtocolDecoder.java @@ -614,6 +614,23 @@ public class AtrackProtocolDecoder extends BaseProtocolDecoder { case "JN5": buf.readUnsignedInt(); // pto fuel break; + case "IN0": + position.set(Position.KEY_IGNITION, buf.readUnsignedByte() > 0); + break; + case "IN1": + case "IN2": + case "IN3": + position.set(Position.PREFIX_IN + key.charAt(2), buf.readUnsignedByte() > 0); + break; + case "HA": + position.set(Position.KEY_ALARM, buf.readUnsignedByte() > 0 ? Position.ALARM_ACCELERATION : null); + break; + case "HB": + position.set(Position.KEY_ALARM, buf.readUnsignedByte() > 0 ? Position.ALARM_BRAKING : null); + break; + case "HC": + position.set(Position.KEY_ALARM, buf.readUnsignedByte() > 0 ? Position.ALARM_CORNERING : null); + break; default: break; } -- cgit v1.2.3