diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-20 14:48:58 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-20 14:48:58 +1300 |
commit | 57d9d42a8a6e84a7af2c75a17c3df55850c52288 (patch) | |
tree | 861ef2b1af95de1a80dbd609dd91aa7548f77291 /src/org/traccar/protocol/Gt06ProtocolDecoder.java | |
parent | 9debdb83c7a00633b6ae751affea787afbd09729 (diff) | |
download | trackermap-server-57d9d42a8a6e84a7af2c75a17c3df55850c52288.tar.gz trackermap-server-57d9d42a8a6e84a7af2c75a17c3df55850c52288.tar.bz2 trackermap-server-57d9d42a8a6e84a7af2c75a17c3df55850c52288.zip |
Decode GT06 LBS data and status
Diffstat (limited to 'src/org/traccar/protocol/Gt06ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Gt06ProtocolDecoder.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java index a551e65ce..f30b71c54 100644 --- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -75,12 +75,13 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { } private static boolean hasLbs(int type) { - return type == MSG_GPS_LBS_1 || type == MSG_GPS_LBS_2 || type == MSG_GPS_LBS_STATUS_1 - || type == MSG_GPS_LBS_STATUS_2 || type == MSG_GPS_LBS_STATUS_3; + return type == MSG_LBS || type == MSG_LBS_STATUS || type == MSG_GPS_LBS_1 || type == MSG_GPS_LBS_2 + || type == MSG_GPS_LBS_STATUS_1 || type == MSG_GPS_LBS_STATUS_2 || type == MSG_GPS_LBS_STATUS_3; } private static boolean hasStatus(int type) { - return type == MSG_GPS_LBS_STATUS_1 || type == MSG_GPS_LBS_STATUS_2 || type == MSG_GPS_LBS_STATUS_3; + return type == MSG_STATUS || type == MSG_LBS_STATUS + || type == MSG_GPS_LBS_STATUS_1 || type == MSG_GPS_LBS_STATUS_2 || type == MSG_GPS_LBS_STATUS_3; } private static void sendResponse(Channel channel, int type, int index) { @@ -212,7 +213,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { if (hasGps(type)) { decodeGps(position, buf); } else { - getLastLocation(position); + getLastLocation(position, null); } if (hasLbs(type)) { |