forked from traccar/traccar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2019 - 2020 Anton Tananaev ([email protected]) | ||
* Copyright 2019 - 2021 Anton Tananaev ([email protected]) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
|
@@ -186,6 +186,17 @@ protected Object decode( | |
position.set(Position.KEY_BATTERY_LEVEL, BitUtil.from(status, 24)); | ||
position.set(Position.KEY_STATUS, status); | ||
break; | ||
case 0x28: | ||
int beaconFlags = buf.readUnsignedByte(); | ||
position.set("tagId", ByteBufUtil.hexDump(buf.readSlice(6))); | ||
buf.readUnsignedByte(); // rssi | ||
buf.readUnsignedByte(); // 1m rssi | ||
if (BitUtil.check(beaconFlags, 7)) { | ||
position.setLatitude(buf.readIntLE() * 0.0000001); | ||
position.setLongitude(buf.readIntLE() * 0.0000001); | ||
hasLocation = true; | ||
} | ||
break; | ||
case 0x30: | ||
buf.readUnsignedInt(); // timestamp | ||
position.set(Position.KEY_STEPS, buf.readUnsignedInt()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters