From c249e72c20c2046eef91fd602279e11e218159a3 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 21 Mar 2019 21:13:32 -0700 Subject: Decode Box ignition --- src/org/traccar/protocol/BoxProtocolDecoder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/org/traccar/protocol/BoxProtocolDecoder.java b/src/org/traccar/protocol/BoxProtocolDecoder.java index d7b401a2d..3635c29e5 100644 --- a/src/org/traccar/protocol/BoxProtocolDecoder.java +++ b/src/org/traccar/protocol/BoxProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 - 2018 Anton Tananaev (anton@traccar.org) + * Copyright 2014 - 2019 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -94,6 +94,8 @@ public class BoxProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_EVENT, parser.next()); int status = parser.nextInt(); + position.set(Position.KEY_IGNITION, BitUtil.check(status, 0)); + position.set(Position.KEY_MOTION, BitUtil.check(status, 1)); position.setValid(!BitUtil.check(status, 2)); position.set(Position.KEY_STATUS, status); -- cgit v1.2.3