diff options
author | Anton Tananaev <anton@traccar.org> | 2023-06-14 22:21:18 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-06-14 22:21:25 -0700 |
commit | 94fbc93f8b0a75fe17e529355c4e7758b81b4776 (patch) | |
tree | 39b7f9fec56a95ce07e2c1f38919eb5beb675a86 /src/main/java | |
parent | 82ecf19d235a50af1475463f7467d9468fa53346 (diff) | |
download | trackermap-server-94fbc93f8b0a75fe17e529355c4e7758b81b4776.tar.gz trackermap-server-94fbc93f8b0a75fe17e529355c4e7758b81b4776.tar.bz2 trackermap-server-94fbc93f8b0a75fe17e529355c4e7758b81b4776.zip |
Additional Atrack parameters
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/protocol/AtrackProtocolDecoder.java | 17 |
1 files changed, 17 insertions, 0 deletions
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; } |