* Refactor ArnaviBinaryProtocolDecoder constants and methods
1. sendResponse для HEADER v2 — сломан полностью
Код делал time.writeBytes(time) — писал буфер сам в себя. В результате ответ на HEADER2 отправлялся пустым, без unixtime. Устройство не получало подтверждения и начинало слать HEADER повторно - координаты вообще не поступали.
2. TAG 5 — ошибка приоритета операторов в Java
satellites & 0x0F + (satellites >> 4) & 0x0F из-за приоритета + над & считало неверно. Нужны скобки: (satellites & 0x0F) + ((satellites >> 4) & 0x0F).
3. TAG 9 — перезапись KEY_POWER
TAG 9 перезаписывал KEY_POWER, уже установленный TAG 1. Теперь TAG 9 пишет только KEY_STATUS.
4. Цикл decode() — читал 0x5D как тип записи
После последнего PACKET байт 0x5D (конец PACKAGE) читался как тип пакета и возвращал null. Теперь цикл проверяет конечный маркер.
* Refactor position keys for CAN data handling
* Rename gas pedal variable to throttle
* Refactor ArnaviBinaryProtocolDecoder for clarity
Переписана проверка координат на корректность, теперь setValid определяет тег 0x05
Добавлены теги для Device Status и CAN security.
Исправлена обработка для KEY_POWER и KEY_BATTERY
Добавлено условие для LLS, для фильтрации "шума". Температура LLS будет записывать только при наличии данных по уровню топлива. Исключен LLS0, в большинстве случаев он не используется.
* Clean up commented code in ArnaviBinaryProtocolDecoder
Removed commented-out code for time buffer handling.
* Change mode reading from int to unsigned byte for tag 0x06
* Fix bitwise operation for tempRaw calculation
* Refactor ArnaviBinaryProtocolDecoder for clarity
1. Validation for zero coordinates was removed
2. Fixed discrete inputs handling.
3. Updated tag numbering to numeric per documentation.
* Remove all comments
* removed trailing spaces
* Refactor ArnaviBinaryProtocolDecoder to improve readability and maintainability
* Refactor network setting in ArnaviBinaryProtocolDecoder for improved parameter order and clarity
* Refactor ArnaviBinaryProtocolDecoder to simplify condition for RECORD_DATA processing
* Fix critical bug in case 6 mode=0x01: incorrect 15-byte buffer shift
* Update device status and discrete input handling to align with the standard custom attributes approach
* Added unit tests for HEADER_3 and new tags. Added a check for mobile network data
* Removed the test that wasn't testing anything
* removed ByteBuf import
* The testFullTagsAttributes test has been extended
* format fix
* fix physicalInputs numbering
* Decoder - removed nested blocks
DecoderTest - updated to be consistent with the other tests
* Decoder - removed nested blocks
* Removed unnecessary reformatting from sendResponse, removed unnecessary verifyAttribute from DecoderTest
* format fix
* format fix
* format fix
* GT06 NT20 protocol correction, hours should be long and odometer should be read as unsigned
* Update src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
Co-authored-by: Anton Tananaev <anton.tananaev@gmail.com>
---------
Co-authored-by: Anton Tananaev <anton.tananaev@gmail.com>
* Fix Xexun2 negative longitude (DDMM.MMMM truncate toward zero)
* Add test for Xexun2 negative longitude (DDMM.MMMM) conversion
- Add testConvertCoordinateNegativeLongitude() asserting correct conversion
for negative longitude (-121.64531°), reference latitude (37.09772°),
and positive longitude (121.64531°).
- Make convertCoordinate() package-private so the test can call it.
Made-with: Cursor
* Fix Xexun2 HEX test: correct lon/lat float bytes and checksum
- Use IEEE 754 big-endian bytes for -12138.7186 (lon) and 3705.8632 (lat)
- Assert only lat/lon/valid (no fix time) for decoder timestamp independence
- Recompute payload checksum for PR #5818
Made-with: Cursor
* Use position() helper for Xexun2 negative-longitude test; match decoded fix time
Made-with: Cursor