Open-source firmware

The flight core that stays inspectable.

ESPFlight firmware is the embedded layer responsible for control, stabilization, safety state, telemetry and the drone-side network protocol.

espflight / flight_control.cpp
// control loop
imu.update();
failsafe.evaluate();
controller.stabilize();
motors.write();

// keep the pilot informed
telemetry.publish();
Current stable · Firmware v 1.0.0 · Protocol 2
Current core

Small enough to understand. Structured enough to grow.

01

Stabilization

IMU processing and PID-based attitude stabilization form the core control loop.

02

Safety state

Explicit arming, link-loss handling, low-battery logic, attitude protection and flight-state guards.

03

Network control

Device discovery, WebSocket control, command ownership and acknowledgements for important actions.

04

Telemetry

Drone state and flight data are continuously exposed to the companion application.

05

Assisted flight

Altitude assistance plus takeoff and landing flows sit above the basic stabilized control layer.

06

Configuration

Control parameters can be tuned from the application while the drone is connected.

ESPFlight Protocol 2

A clear contract between drone and app.

ESPFlight treats connectivity as part of the flight platform rather than a pile of ad-hoc messages.

  • UDP discovery
  • WebSocket control and telemetry channel
  • Explicit ARM / DISARM commands
  • Single-controller ownership model
  • ACKs for high-level commands
  • Link timeout and flight-state safety logic
ESPFlight App
DISCOVERY UDP CONTROL + TELEMETRY WebSocket
ESPFlight Firmware
v1 network security boundary Protocol 2 is designed for a trusted private local network. The v1 transport does not provide encrypted transport or cryptographic client authentication against a hostile client on the same network; do not use an untrusted or public shared network for flight control.

Read it. Build it. Improve it.

ESPFlight Firmware v1.0.0 is open-source under the MIT License, so you can read it, learn from it, modify it, redistribute it, and use it in personal or commercial projects subject to the license terms.

View source v1.0.0 release Firmware docs Read MIT License
Known v1.0.0 errata

Check the official firmware errata for documentation corrections recorded without changing the v1.0.0 release tag.

View official errata ↗