How omni-god/pico_drone works
This is Raspberry Pi Pico 2 flight-controller firmware. Its principal workflow receives CRSF radio input, combines it with IMU and attitude data, applies safety and flight-control logic, and drives motor ESCs; separate tasks also handle sensor processing and telemetry. The graph preserves the major sensor, RC, safety, control, and telemetry subsystems. Evidence is limited to the README (empty), source index, and shown excerpts; unsampled task interactions are not asserted.
Main entry points: drone.cpp Firmware entry · RCTask.cpp RC task · IMUTask.cpp IMU task · SensorManager.cpp Sensor manager
Components 25
Firmware Runtime
- Firmware entry
drone.cpp - Telemetry task
Flight/Telemetry/TelemetryTask.cpp
Sensors and Estimation
- IMU task
Flight/Sensor/IMUTask.cpp - Sensor manager
Managers/Sensors/SensorManager.cpp - Sensor state
Flight/Sensor/SensorState.h - IMU publisher
Flight/Sensor/IMUPublisher.h - Attitude estimator
Flight/Sensor/AttitudeEstimator.cpp
Radio Control
- RC task
Flight/RC/RCTask.cpp - CRSF parser
Flight/RC/CrsfParser.cpp - RC input mapping
Flight/RC/RCInput.cpp - RC state
Flight/RC/RCState.h - RC publisher
Flight/RC/RCPublisher.cpp - CRSF telemetry
Flight/RC/CrsfTelemetry.h
Safety and Flight Control
- Safety task
Flight/Safety/SafetyTask.cpp - Safety manager
Flight/Safety/SafetyManager.cpp - Safety snapshot
Flight/Safety/SafetySnapshot.h - Flight-control task
Flight/FlightControl/FlightControlTask.cpp - Flight controller
Flight/FlightControl/FlightController.cpp - PID loops
Flight/FlightControl/PID.cpp - Motor mixer
Flight/FlightControl/MotorMixer.cpp
Hardware Drivers
- ICM20948 IMU
Drivers/Sensors/ICM20948/ICM20948.cpp - Auxiliary sensors
Drivers/Sensors - ESC outputs
Drivers/PWM/Esc.cpp - I2C bus
Drivers/I2C/I2c.cpp
Other components
- Pilot / operator
Connections 29
- Pilot / operator → CRSF parser: sends commands
- Firmware entry → Sensor manager: constructs
drone.cpp - Firmware entry → ICM20948 IMU: constructs
drone.cpp - Firmware entry → Auxiliary sensors: constructs
drone.cpp - Firmware entry → CRSF parser: configures
drone.cpp - Firmware entry → Flight-control task: constructs
drone.cpp - Firmware entry → Telemetry task: constructs
drone.cpp - Sensor manager → ICM20948 IMU: uses sensor
- Sensor manager → Auxiliary sensors: uses sensors
- ICM20948 IMU → I2C bus: uses bus
- Auxiliary sensors → I2C bus: uses bus
- Flight controller → PID loops: updates
Flight/FlightControl/FlightController.cpp - Flight controller → Motor mixer: mixes outputs
Flight/FlightControl/FlightController.cpp - Flight-control task → Flight controller: runs control
- Flight-control task → ESC outputs: drives motors
- Firmware entry → IMU task: starts task
drone.cpp - Firmware entry → Safety task: starts task
drone.cpp - Firmware entry → RC task: starts task
- RC task → CRSF parser: receives frames
- RC task → RC input mapping: maps channels
- RC input mapping → RC state: produces state
- IMU task → Sensor state: produces samples
- IMU task → IMU publisher: publishes samples
- Sensor state → Attitude estimator: estimates attitude
- Safety task → Safety manager: evaluates state
- Safety manager → Safety snapshot: updates snapshot
- Firmware entry → CRSF telemetry: constructs
drone.cpp - Telemetry task → CRSF telemetry: uses telemetry
- RC task → RC publisher: publishes state