aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-05-11 12:24:48 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-05-11 12:24:48 -0700
commit9256a86c91349f63759c7e7d14eaaf56abd567f3 (patch)
treeadcdb9c93329a087fb2d0775ad17c136c47b13dc /src/main
parent327b4855db850a39808716b36265198b0340fe5f (diff)
downloadtrackermap-server-9256a86c91349f63759c7e7d14eaaf56abd567f3.tar.gz
trackermap-server-9256a86c91349f63759c7e7d14eaaf56abd567f3.tar.bz2
trackermap-server-9256a86c91349f63759c7e7d14eaaf56abd567f3.zip
Support GV300CAN driver behavior
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
index 46ef4fff8..5a0ff4197 100644
--- a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
@@ -1080,6 +1080,22 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.PREFIX_IN + reportType / 0x10, reportType % 0x10 == 1);
} else if (type.equals("IGL")) {
position.set(Position.KEY_IGNITION, reportType % 0x10 == 1);
+ } else if (type.equals("HBM")) {
+ switch (reportType % 0x10) {
+ case 0:
+ case 3:
+ position.set(Position.KEY_ALARM, Position.ALARM_BRAKING);
+ break;
+ case 1:
+ case 4:
+ position.set(Position.KEY_ALARM, Position.ALARM_ACCELERATION);
+ break;
+ case 2:
+ position.set(Position.KEY_ALARM, Position.ALARM_CORNERING);
+ break;
+ default:
+ break;
+ }
}
decodeLocation(position, parser);