Changelog
View Sourcev0.3.0 (2026-08-03)
Added
Drone.Adapters.Crazyfliefor single-drone Crazyradio / mock high-level flight- CRTP encode/decode, high-level commander, supervisor, and platform packets
- CRTP logging TOC/subscribe helpers (
Logging) for battery +sys.canfly - Bitcraze SafeLink enable + header-bit framing (
SafeLink) - Crazyradio transport with pluggable USB backend (
USB.Unavailableby default) - In-process
Transport.Mockprofiles for CI (mock://ready, estimator/battery/unplug) - Optional
Transport.telemetry/1so adapters do not inspect transport structs - Optional
Drone.Adapter.capabilities/1andDrone.Adapter.Capabilities Drone.capabilities/1public API- Mission preflight capability validation (
Mission.validate_capabilities/2) - Safety options
:require_estimatorand:max_telemetry_age_ms - Guide:
docs/crazyflie.md - Shared adapter acceptance tests for Sim and Crazyflie mock
- Example:
examples/crazyflie_mock_flight.exs
Changed
Drone.Adapter.resolve/1recognizes:crazyflieand rejects unloaded modules- Sim and Tello advertise Tello-like capabilities
- Crazyflie pose uses
Drone.Geometry; takeoff height feeds altitude safety - Crazyflie readiness gate applies to takeoff, land, move, and rotate
- Radio URIs default
safelink=0;?safelink=1enables SafeLink negotiation - Estimator / telemetry-age safety fail closed on missing values
mix verifymirrors CI (format, unused deps, credo, sobelow, dialyzer, tests, docs)- README roadmap: Crazyflie delivered in v0.3.0 (swarms already shipped in v0.2.0)
Notes
- Real
radio://links require a user-suppliedusb_backendimplementingDrone.Adapters.Crazyflie.USB. Connect downloads the logging TOC and subscribes topm.batteryLevel/sys.canflyfor readiness. Optional?safelink=1negotiates Bitcraze SafeLink. BLE, raw attitude, trajectories, parameter editing, and Crazyflie swarms remain deferred — seedocs/design/v0_3_0_deferred.md.
v0.2.0 (2026-07-31)
Added
Drone.Swarmcoordinator for named multi-drone groups with fail-fast fan-outDrone.Swarm.SupervisorandDrone.Swarm.Registryfor supervised, named swarmsDrone.Formationpure planners::front,:column,:vee,:diamond,:echelon,:circle,:shoulder_pair, optional:grid- Coordinated
connect_sdk/1,takeoff/1,land/1,emergency/1,run/2,run/3,telemetry/1, andstop/1 Drone.Swarm.start/1public entry (handle-returning, likeDrone.connect/2; not an OTPstart_link)Swarm.run/3passes formation options (:side,:radius_cm,:columns,:leader,:origin,:heading_deg, etc.) through to the planner- Plan-time separation checks (
min_separation_cm) for formations - Simulator initial pose opts:
initial_x,initial_y,initial_z,initial_yaw - Swarm telemetry events (
[:drone, :swarm, ...]) including stopreason - Good Advisor / Bad Advisor example (
examples/good_bad_advisor.exs) - Docs:
docs/swarm.md,docs/formations.md,docs/design/v0_2_0_deferred.md
Fixed
emergency/1fans out from the caller (membership ETS), not blocked byrun/2- Coordinator traps exits, links members, and disconnects them on shutdown/crash
- Formation/
runcrash paths: bare%Mission{},:diamondwith ≠4 drones, float yaw, invalid options, unknown mission-map keys, invalid custom returns - Configurable call
:timeout(default 60s) on swarm operations
Notes
- Formations are one-shot geometric planners (simulator-first), not closed-loop
flocking. Deferred behaviours are listed in
docs/design/v0_2_0_deferred.md.
v0.1.0 (2026-06-10)
Added
Dronepublic API module for connecting, flying, and disconnecting dronesDrone.Vehiclesupervised GenServer per drone processDrone.Adapterbehaviour for pluggable drone adaptersDrone.Adapters.Simsimulator adapter (in-process state machine, no hardware needed)Drone.Adapters.TelloTello UDP adapter with command encoding and response parsingDrone.Adapters.Tello.ConnectionUDP connection handler with centralized defaultsDrone.Commandstruct with constructors for all Tello SDK commandsDrone.Errorerror type helpers withsafety/1,adapter/1,invalid_command/1Drone.Geometryshared position math module (move_delta/3,rotate_yaw/3,flip_delta/1)Drone.Safetypure validation module with altitude, distance, battery, geofence, and allowlist checksDrone.Safety.Policystruct with default, indoor, and unrestricted presetsDrone.Safety.Geofencecircle and polygon geofence supportDrone.Telemetryevent helpers emitting:telemetryeventsDrone.MissionDSL for scripting command sequencesDrone.Supervisordynamic supervisor for vehicle processesDrone.ApplicationOTP application starting Registry and Supervisor- Emergency stop command bypassing all safety checks
- Dry-run mode for validating missions without sending commands
- Command history tracking in simulator and vehicle state
- Flight time simulation in simulator (
query(:time)returns cumulative motor-on seconds) - Configurable battery drain simulation
- Configurable failure injection in simulator
- Position tracking (x, y, z, yaw) in simulator and vehicle state
- Command argument validation enforcing Tello SDK ranges (distance 20-500cm, degrees 1-3600, speed 10-100cm/s, hover seconds >0)
- CI/CD pipeline (lint, test matrix, coverage, sobelow, dialyzer, docs, Hex.pm release)
Changed
Drone.Vehicle.child_specsimplified::idis a constant since DynamicSupervisor ignores itDrone.Adapters.Tellonow referencesConnection.default_*()accessor functions instead of duplicating defaultsDrone.Adapters.Sim.query(:time)returns cumulative flight seconds (not command count), matching real Tello behavior@type dronenarrowed fromatom() | pid()toatom()(pids not supported)Drone.Error.safety/1used throughout Safety module (was inline tuples)- Battery stored as
number()internally in sim, exposed astrunc(battery)integer
Fixed
- Command range validation (F-01):
move/3,rotate/3,set_speed/2,hover/2reject out-of-range values - Battery always reported as integer (F-02)
- Graceful
{:error, :not_connected}for unknown drone names (F-04) - Tello parser handles negative numbers (F-08)
Policy.new(unrestricted: true)no longer crashes (F-09/F-10)Drone.Vehicle.terminate/2emits adapter key (:sim/:tello) not raw module name- Telemetry metadata bug: terminate/2 was emitting adapter module instead of adapter key