aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/CastelProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/protocol/CastelProtocolDecoder.java b/src/main/java/org/traccar/protocol/CastelProtocolDecoder.java
index 53a66af27..23401b5ee 100644
--- a/src/main/java/org/traccar/protocol/CastelProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/CastelProtocolDecoder.java
@@ -188,10 +188,10 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedShortLE(); // current fuel consumption
long state = buf.readUnsignedIntLE();
- position.set(Position.KEY_IGNITION, BitUtil.check(state, 8 + 2));
- position.set(Position.KEY_ALARM, BitUtil.check(state, 3 * 8 + 4) ? Position.ALARM_ACCELERATION : null);
- position.set(Position.KEY_ALARM, BitUtil.check(state, 3 * 8 + 5) ? Position.ALARM_BRAKING : null);
- position.set(Position.KEY_ALARM, BitUtil.check(state, 3 * 8 + 6) ? Position.ALARM_IDLE : null);
+ position.set(Position.KEY_ALARM, BitUtil.check(state, 4) ? Position.ALARM_ACCELERATION : null);
+ position.set(Position.KEY_ALARM, BitUtil.check(state, 5) ? Position.ALARM_BRAKING : null);
+ position.set(Position.KEY_ALARM, BitUtil.check(state, 6) ? Position.ALARM_IDLE : null);
+ position.set(Position.KEY_IGNITION, BitUtil.check(state, 2 * 8 + 2));
position.set(Position.KEY_STATUS, state);
buf.skipBytes(8);