diff options
Diffstat (limited to 'src/main/java/org')
-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; } |