You have to modify the decoder class for this protocol.
Do you mean I should edit the conditions of the following cod?
private String decodeAlarm(int status) {
if (BitUtil.check(status, 0)) {
return Position.ALARM_LOW_BATTERY;
} else if (BitUtil.check(status, 1)) {
return Position.ALARM_GEOFENCE_EXIT;
} else if (BitUtil.check(status, 2)) {
return Position.ALARM_GEOFENCE_ENTER;
} else if (BitUtil.check(status, 3)) {
return Position.ALARM_OVERSPEED;
} else if (BitUtil.check(status, 16)) {
return Position.ALARM_SOS;
} else if (BitUtil.check(status, 17)) {
return Position.ALARM_LOW_BATTERY;
} else if (BitUtil.check(status, 18)) {
return Position.ALARM_GEOFENCE_EXIT;
} else if (BitUtil.check(status, 19)) {
return Position.ALARM_GEOFENCE_ENTER;
} else if (BitUtil.check(status, 20)) {
return Position.ALARM_REMOVING;
} else if (BitUtil.check(status, 22)) {
return Position.ALARM_FALL_DOWN;
}
return null;
Dear Anton
I hope this finds you well
I have a personal GPS tracker and it used "watch" protocol, and I connected it to the my Traccar server and I get the data from the device.
But when I receive the data I found the Traccar can't explain the alarm type from the message as follow:
00010000 and 00400000 are the different types of alarm from the device but it assume the as same.
How can I edit it?
Best regards
Mahmoud alqannas