aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-10-20 11:45:28 -0700
committerGitHub <noreply@github.com>2021-10-20 11:45:28 -0700
commit1830366641d1515ac75a6c08189361f5e88df609 (patch)
tree39cf8499265c577dd007bb4d63f3839a73de3b3e /src
parent7c04066ff6444790acd8b28d1abffd46bd8243da (diff)
parent72ada0ce78ee824b2d54cc4d37311ddd7cd216ee (diff)
downloadtrackermap-server-1830366641d1515ac75a6c08189361f5e88df609.tar.gz
trackermap-server-1830366641d1515ac75a6c08189361f5e88df609.tar.bz2
trackermap-server-1830366641d1515ac75a6c08189361f5e88df609.zip
Merge pull request #4762 from jinzo/master
More accurate/generic Totem status
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/TotemProtocolDecoder.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main/java/org/traccar/protocol/TotemProtocolDecoder.java b/src/main/java/org/traccar/protocol/TotemProtocolDecoder.java
index f7d0ffde7..dc4347f00 100644
--- a/src/main/java/org/traccar/protocol/TotemProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/TotemProtocolDecoder.java
@@ -375,14 +375,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.PREFIX_OUT + 1, BitUtil.check(status, 32 - 9));
position.set(Position.PREFIX_OUT + 2, BitUtil.check(status, 32 - 10));
position.set(Position.PREFIX_OUT + 3, BitUtil.check(status, 32 - 11));
- position.set(Position.PREFIX_OUT + 4, BitUtil.check(status, 32 - 12));
- position.set(Position.PREFIX_IN + 2, BitUtil.check(status, 32 - 13));
- position.set(Position.PREFIX_IN + 3, BitUtil.check(status, 32 - 14));
- position.set(Position.PREFIX_IN + 4, BitUtil.check(status, 32 - 15));
- position.set(Position.KEY_ALARM, BitUtil.check(status, 32 - 16) ? Position.ALARM_SHOCK : null);
- position.set(Position.KEY_ALARM, BitUtil.check(status, 32 - 17) ? Position.ALARM_IDLE : null);
- position.set(Position.KEY_ALARM, BitUtil.check(status, 32 - 18) ? Position.ALARM_LOW_BATTERY : null);
- position.set(Position.KEY_ALARM, BitUtil.check(status, 32 - 22) ? Position.ALARM_JAMMING : null);
+ position.set(Position.KEY_STATUS, status); // see https://github.com/traccar/traccar/pull/4762
position.setTime(parser.nextDateTime());