aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gps103ProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/Gps103ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index 9d3fda345..b153984cb 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -103,20 +103,22 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
.compile();
private String decodeAlarm(String value) {
- if (value == "tracker") {
+ switch (value) {
+ case "tracker":
return null;
- } else if (value == "help me") {
+ case "help me":
return Position.ALARM_SOS;
- } else if (value == "low battery") {
+ case "low battery":
return Position.ALARM_LOW_BATTERY;
- } else if (value == "stockade") {
+ case "stockade":
return Position.ALARM_GEOFENCE;
- } else if (value == "move") {
+ case "move":
return Position.ALARM_MOVEMENT;
- } else if (value == "speed") {
+ case "speed":
return Position.ALARM_OVERSPEED;
+ default:
+ return null;
}
- return null;
}
@Override