Software Summary

A concise overview of the firmware, Python GUI, state machine, telemetry, tuning workflow, and planned integration direction.

Software Concept

The software is built around a custom STM32 flight-control firmware and a Python development GUI. The firmware owns real-time control, estimator updates, motor safety, configuration, and telemetry. The GUI owns bench workflows, live plots, event analysis, configuration editing, and tuning.

The current focus is a minimal flight mode using the onboard ICM-20948, RC input, hover-centered throttle mapping, roll/pitch attitude control, yaw rate damping, and event-buffer based analysis.

Main Software Blocks

BlockRole
Firmware state machineSeparates RC-only operation, bench control, active flight, and fault behavior.
Estimator layerSupports estimator selection and tuning. Mahony is the practical default; MEKF/UKF infrastructure exists for later work.
Controller layerCurrently cascaded angle/rate controller with live tunable gains, output limits, idle spin, and hover-centered throttle behavior.
Config systemVehicle, controller, and estimator values can be applied to RAM and saved to STM32 flash.
Telemetry packagesEach GUI tab requests the firmware data package it needs, reducing GUI clutter and serial load.
Flight event bufferFirmware stores high-rate data around fault/pilot-disable events for post-test analysis.

Communication Model

DirectionFormatPurpose
Firmware to GUICSV telemetry linesLive plots and tab-specific data packages.
GUI to firmwareASCII command lines beginning with $CMDMode changes, config, tuning, motor bench commands, event requests.
Firmware to GUI$ACK, $ERR, $EVTCommand responses, errors, state changes, event notifications.

App Modes

ModePurposeApp Sub Modes
MonitorFlight data, vehicle configuration, and post-event analysis.Main Data, Vehicle Config, Flight Event.
Bench ControlTestbench workflows where the GUI may take controlled authority.Motor Control, Motor Balancing, Motor Mixing, Orientation, RC Link, Magnetometer Calibration, Control Tuning, Estimator Tuning.

Safety-Oriented Behavior

SituationExpected behavior
Boot/initMotors remain stopped until firmware is initialized and safety gates allow control.
RC-only flightRC pilot motor enable and throttle/sticks control stabilized flight if gates pass.
Bench disarmedGUI may connect and inspect data, but motors remain stopped.
Bench armedGUI may command motors for explicit bench workflows.
FaultMotors are forced off and event data can be fetched.

Development Direction

The near-term software value is not trying to replace QGroundControl. The project should use the custom app where it is strongest: bench work, tuning, estimator development, and FC-specific diagnostics. Later MAVLink/QGroundControl support can cover standard telemetry, mode/status, battery, attitude, parameters, and basic flight integration.