# Changelog

All notable changes to the LLUAV SDK will be documented in this file.

## [1.0.0] - 2026-04-28

### Added

#### Core Features
- **Auto-login**: Automatically sends `login` command after WebSocket connection is established when a password is configured.
- **Auto-reconnect**: Detects connection loss and reconnects with exponential backoff (configurable initial delay, max delay, and max retries).
- **Connection keep-alive (heartbeat)**: Configurable periodic heartbeat command (default `state` every 5s) to keep NAT/firewall sessions alive.
- **Command queue**: Strict FIFO queue guarantees one command in flight at a time, matching the drone's request/response protocol.
- **Timeout & retry management**: Per-command deadlines with automatic retry on network failure (default 3 retries, 10s timeout).
- **Periodic task scheduler**: Register named tasks that are automatically enqueued at fixed intervals without blocking the caller.

#### Language Implementations
- **Python SDK** (synchronous): Based on `websocket-client`. Supports blocking and non-blocking (`Future`) command execution.
- **Python SDK** (asynchronous): Based on `websockets`. Full `async/await` API with `asyncio.Queue`.
- **C++ SDK**: Based on `websocketpp` (Asio). Header-friendly design with `nlohmann::json`. Supports CMake build.
- **JavaScript SDK**: Compatible with Node.js (`ws`) and browsers (native `WebSocket`). Promise-based API.

#### Demos
- `demo_state_monitor` — Real-time telemetry polling with periodic tasks.
- `demo_flight_mission` — Complete flight workflow: preflight, takeoff, setpoint, RTL.
- `demo_camera_map` — Camera control and map management operations.

#### Documentation
- `README.md` — Quick start and feature overview.
- `docs/PROTOCOL.md` — Complete wire protocol specification derived from firmware source.
- `docs/ARCHITECTURE.md` — Internal SDK architecture and data flow.
- `docs/API_REFERENCE.md` — Full API reference for all three languages.
- `docs/TROUBLESHOOTING.md` — Common issues and tuning recommendations.
- `docs/CHANGELOG.md` — This file.

#### Build & Release
- `release.py` — Cross-platform release script that packages the SDK into `.tar.gz` and `.zip` archives.
- `release.sh` — Bash wrapper for `release.py`.
- Release script automatically excludes `doc/wsserver.cpp` and other non-essential files.
- Generates `MANIFEST.txt`, `VERSION`, and SHA-256 checksums for each release.

### Protocol Coverage

All commands from the LLUAV firmware WebSocket server are supported:

- **State & Telemetry**: `state`, `param`, `get_param`, `ver`, `sysinfo`, `diskusage`, `statics`, `machineid`, `hud1`, `lidarpose`, `apron_state`, `mavlink_msgs`, `get_submap_info`
- **Flight Control**: `takeoff`, `land`, `rtl`, `mrtl`, `tether_land`, `set_sp_ned`, `relocate_pos`, `tunnelfly`, `disarm`, `sleep`, `wakeup`, `autosleep_enable`, `zyhk`
- **Mission Management**: `mission`, `plan`, `unlock_plan`, `mw_list`, `mw_exec`, `ai1_mission`, `obs_mission`, `dump_missionresult`, `dump_missionlist`, `abort_report`, `set_taskname`
- **Map Management**: `savemap`, `set_maplocate`, `set_mappath`, `list_maps`, `rm_map`
- **Camera & Recording**: `capture`, `snapshot`, `record`, `savebag`, `siyi_reboot`, `siyi_format`, `siyi_center`, `siyi_init`, `siyi_downvideo`, `siyi_sync`
- **LED Control**: `ledon`, `ledoff`, `ledenable`, `leddisable`, `ledpwm`, `led_blink`
- **Parameter Management**: `set_param`, `get_param`, `reset_param`, `save_param`, `passwd`
- **Apron**: `apron_vol`, `apron_amp`
- **System**: `reboot_node`, `reboot_ap`, `reboot_system`, `poweroff_system`, `prepare_poweroff`, `reboot_dlo`, `restart_dlo`, `kill_livox`
- **Lidar & Perception**: `lidaronoff`, `lidarwarn`, `utg_get`, `utg_set`
- **Other**: `grabber_ctrl`, `ara8_center`, `ara8_pitch`, `cv_test`, `preflight_check`, `preflight_enable`, `clear_bags`, `clear_images`, `list_imagedir`, `rm_imagedir`, `test_wp`, `test_listwp`, `savemsg`, `bms_setpower`, `bms_setcharge`, `show_sp`, `show_apguid2`, `help`, `admin_lock`, `admin_unlock`
