aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/NiotProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/NiotProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/NiotProtocolDecoder.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main/java/org/traccar/protocol/NiotProtocolDecoder.java b/src/main/java/org/traccar/protocol/NiotProtocolDecoder.java
index 35614ccca..d53271778 100644
--- a/src/main/java/org/traccar/protocol/NiotProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/NiotProtocolDecoder.java
@@ -99,14 +99,8 @@ public class NiotProtocolDecoder extends BaseProtocolDecoder {
int statusX = buf.readUnsignedByte();
position.setValid(BitUtil.check(statusX, 7));
switch (BitUtil.between(statusX, 3, 5)) {
- case 0b10:
- position.set(Position.KEY_ALARM, Position.ALARM_POWER_CUT);
- break;
- case 0b01:
- position.set(Position.KEY_ALARM, Position.ALARM_LOW_POWER);
- break;
- default:
- break;
+ case 0b10 -> position.set(Position.KEY_ALARM, Position.ALARM_POWER_CUT);
+ case 0b01 -> position.set(Position.KEY_ALARM, Position.ALARM_LOW_POWER);
}
position.set(Position.KEY_ODOMETER, buf.readUnsignedInt());