diff options
author | Anton Tananaev <anton@traccar.org> | 2024-04-05 17:39:48 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-04-05 17:39:48 -0700 |
commit | 5d571897e0d60c574cbb9ed85a04acfb40ce7f3c (patch) | |
tree | 11f0798730251413f86e238f6003a27e56486f90 /src/main/java/org/traccar/protocol | |
parent | b209b3aa18db7bf3b2095ce924edb09ffb831542 (diff) | |
download | trackermap-server-5d571897e0d60c574cbb9ed85a04acfb40ce7f3c.tar.gz trackermap-server-5d571897e0d60c574cbb9ed85a04acfb40ce7f3c.tar.bz2 trackermap-server-5d571897e0d60c574cbb9ed85a04acfb40ce7f3c.zip |
Decode additional VL502 data
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java index 2186fb91f..648c5fb42 100644 --- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java @@ -979,6 +979,12 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { case 0x0103: position.set(Position.KEY_FUEL_LEVEL, buf.readUnsignedInt() * 0.01); break; + case 0x0111: + position.set("fuelTemp", buf.readUnsignedByte() - 40); + break; + case 0x012E: + position.set("oilLevel", buf.readUnsignedShort() * 0.1); + break; case 0x052A: position.set(Position.KEY_FUEL_LEVEL, buf.readUnsignedShort() * 0.01); break; @@ -1113,6 +1119,30 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { } getLastLocation(position, time); break; + case 0x15: + int event = buf.readInt(); + switch (event) { + case 51: + position.set(Position.KEY_ALARM, Position.ALARM_ACCELERATION); + break; + case 52: + position.set(Position.KEY_ALARM, Position.ALARM_BRAKING); + break; + case 53: + position.set(Position.KEY_ALARM, Position.ALARM_CORNERING); + break; + case 54: + position.set(Position.KEY_ALARM, Position.ALARM_LANE_CHANGE); + break; + case 56: + position.set(Position.KEY_ALARM, Position.ALARM_ACCIDENT); + break; + default: + position.set(Position.KEY_EVENT, event); + break; + } + getLastLocation(position, time); + break; default: return null; } |