LD-BLD-005  ·  v2.4.6  ·  published  ·  2026-03-30  ·  CC BY-SA 4.0
docs  /  build  /  libdrone — Software Configuration Reference

About

Complete software configuration reference for libdrone Pro. Covers Betaflight 4.5, EdgeTX, AM32, HDZero, Gyroflow, and the ESP32-S3 sensor logger. Includes PID starting values, filter configuration, dual profile setup (chase/cinematic), GPS Rescue, low-speed A2 compliance mode, and maiden flight procedure.

About

This document is a libdrone Software Configuration Reference for EDGETX — BETAFLIGHT 4.5 — AM32 — HDZERO — GYROFLOW — SENSOR LOGGER and other platform parts

ARCHITECTURE OVERVIEW — HARDWARE → SOFTWARE IMPLICATIONS

libdrone V2.4.6 is a 6-inch True-X interceptor:

  • 330 mm wheelbase
  • 4 × 2507 1750 KV motors on 6S
  • Three-layer architecture: X sandwich (bottom) / Platform 283×40/50mm stepped (middle) / Backplane 187×50mm (top)
  • Floating motor mounts (silicone o-rings + sleeves)
  • Dry mass target: check the Variables file (Platform mass increase vs V2.4.6 not yet measured)

These hardware properties directly influence software settings:

  • High motor authority → conservative P and D starting values; small increments during tuning; never copy values from a lighter build
  • Higher moment of inertia (V2.4.6 vs V2.4.6: longer arms 125mm, 330mm wheelbase) → slightly slower pitch/roll response vs V2.4.6; D-term may need increase at maiden; start conservative
  • Floating mounts → high-frequency noise reaching gyro is reduced; RPM filter has less to clean up; D-term can stay lower than rigid-mount equivalent

EDGETX — TRANSMITTER SETUP (TX16S MKII MAX)

FIRMWARE:

  • EdgeTX latest stable release. Update via EdgeTX Buddy (browser-based) or Companion desktop application.
  • Verify ELRS internal module firmware matches receiver firmware version — both must run the same ELRS release. Update via ELRS Configurator.

MODEL CREATION

  1. Create new model: "libdrone V2.4.6"
  2. Internal RF Module: ELRS / 250Hz / LBT mode
  3. Channel order: AETR (Aileron/Elevator/Throttle/Rudder) — standard Betaflight
  4. Failsafe: all channels to defined safe values (throttle below min)

SWITCH ASSIGNMENTS

Switch Function Position Logic
SF ARM / DISARM UP = disarmed; DOWN = armed
SC Rate Profile UP = Cinematic; MID = Skatepark
SD Low-Speed Mode UP = normal; DOWN = low-speed active
SE GPS Rescue (manual) UP = normal; DOWN = rescue trigger
SH Buzzer (momentary) Press = activate Vifly Finder 2
SA VTX Power UP = 25mW; MID = 200mW; DOWN = 1000mW

LOGICAL SWITCHES

  • Create a logical switch: ARM + THROTTLE_LOW → enable pre-arm warning OSD element. Prevents accidental arming at non-zero throttle.

ELRS BACKPACK INTEGRATION (HDZero Goggle 2): * Enable ELRS Backpack on TX16S MKII: Settings → Tools → ExpressLRS * Bind TX backpack to HDZero Goggle 2 backpack via WiFi pairing procedure. * Once paired: battery voltage, RSSI, GPS data from Betaflight telemetry appear as OSD overlay in goggles without separate video OSD dependency. * Verify: boot TX → boot goggles → confirm telemetry data visible in goggle OSD.

TELEMETRY SENSORS TO DISPLAY ON TX

  • RxBt (battery voltage)
  • 1RSS / 2RSS (ELRS link quality)
  • GPS (altitude, speed, distance)
  • Curr (current draw from ESC telemetry)
  • Capa (consumed mAh)

TRIM / CALIBRATION: * Zero all trims before maiden. Betaflight handles levelling via accelerometer. * Set throttle curve: linear for maiden. Add slight expo if needed after tuning.

BETAFLIGHT — PORTS

| UART | Function | Baud | Notes |

| :--- | :-------------------- | :------- | :---------------------------------- | | 1 | MSP (USB/CLI) | Auto | Default — do not reassign | | 2 | ESC Telemetry | 115200 | Pilotix AM32 RPM + extended telemetry | | 3 | GPS (M10Q‑5883) | 57600 | Enable GPS in Configuration tab | | 4 | HDZero VTX (MSP) | 115200 | Peripherals → VTX MSP + Displayport | | 5 | Receiver (RP2 ELRS) | 420000 | ELRS default baud; set to Serial RX |

Verify physical UART-to-pad mapping against H7A3-SLIM pinout diagram. Assignments above are logical — physical pad numbers vary by board revision.

BETAFLIGHT — CONFIGURATION TAB

MIXER:

  • Mixer Type : Quad X
  • Motor direction : Props In

ESC / MOTOR: * ESC Protocol : DSHOT600 * Bidirectional DSHOT: ON (mandatory — required for RPM filtering) * Motor Poles : 14 (verify on motor spec sheet — 2507 typically 14N12P) * DSHOT Burst : ON * Motor Stop : OFF (Air Mode handles idle; motor stop causes oscillation)

RECEIVER

  • Receiver Mode : Serial (via UART 5)
  • Serial Receiver Provider: CRSF (ELRS uses CRSF protocol)
  • Bind RP2 to TX16S via ELRS Configurator WiFi binding procedure before connecting to Betaflight. Verify green link quality indicator in Betaflight Receiver tab with TX powered on.

SYSTEM

  • Accelerometer : ON (required for GPS Rescue angle limiting)
  • Barometer : ON if present on H7A3-SLIM variant; OFF if not fitted
  • Magnetometer : ON (M10Q integrated compass via GPS UART)

ARMING

  • Max Arm Angle : 25°
  • Disable arm on switch: SF switch assigned; throttle-low/yaw-right disabled

FEATURES

  • GPS, GPS Rescue, Telemetry, OSD (MSP), Blackbox, Air Mode: all ON

BETAFLIGHT — POWER & BATTERY

- Cells : 6S (auto-detect or set manually)

  • Voltage Scale : Calibrate against multimeter on first boot
  • Min Cell Voltage : 3.5 V (summer) / 3.6 V (winter) — see Winter Protocol [19]
  • Warning Cell V : 3.6 V (summer) / 3.7 V (winter)
  • Max Cell Voltage : 4.2 V standard LiPo
  • Current Meter : ESC (Pilotix AM32 reports via telemetry)
  • Current Scale : ~400 starting value; calibrate against known load
  • Capacity Warning : 80% consumed (maintains GPS Rescue headroom)

BETAFLIGHT — PID TUNING

PHILOSOPHY:

The floating motor mount provides mechanical isolation reducing high-frequency vibration reaching the gyro. RPM filtering has less noise to chase. D-term can often stay lower than a rigid-mount equivalent — raise carefully if prop wash is present. 2507 on 6S is powerful; start conservative on P.

STARTING PID VALUES

ROLL : P 47 I 85 D 32 F 105 PITCH : P 50 I 85 D 36 F 105 YAW : P 42 I 85 D 0 F 100

[D-term reduced vs V2.14 baseline — lower moment of inertia in V2.4.6 sandwich architecture]

MASTER MULTIPLIER: 1.0

TUNING SEQUENCE

  1. Hover: if oscillations → reduce P on oscillating axis by 10% increments.
  2. Forward flight: if slow oscillations → increase I by 5 units.
  3. Descents/prop wash: if oscillation → raise D by 2–3 units (watch motor temperature — rising temps = too high D).
  4. Snap response: if sluggish → raise F (feedforward) by 10 units.
  5. After any P/D change: re-verify RPM filter in Blackbox.

ITERM RELAX : RPY / Cutoff 15 Hz / Threshold 30 ITERM ROTATION: ON ANTI GRAVITY : Gain 5.0 / Threshold 250

BETAFLIGHT — FILTERS

RPM FILTER (primary — BiDShot must be confirmed working first):

  • RPM Filter : ON
  • Harmonics : 3
  • Min Frequency : 100 Hz
  • Verify BiDShot: Motors tab → spin briefly → confirm RPM readout in OSD/Blackbox.

GYRO LOWPASS

  • LP1: PT1 / 200 Hz (ON)
  • LP2: OFF (RPM filter makes this redundant on a clean build)

D-TERM LOWPASS

  • LP1: PT1 / 100 Hz (ON)
  • LP2: OFF

DYNAMIC NOTCH

  • ON / 3D / Count 3 / Min 100 Hz / Max 600 Hz

POST-MAIDEN FILTER VERIFICATION (Blackbox Explorer): * Pre-filter gyro noise floor < 1: clean build confirmed * Post-filter trace: smooth, no motor frequency peaks * D-term trace: no high-frequency chatter riding on manoeuvres * If any fail: increase relevant cutoff by 20 Hz increments before raising D

BETAFLIGHT — RATES

PROFILE 1 — CINEMATIC (SC switch UP):

Axis RC Rate Super Rate Expo
Roll 1.00 0.68 0.20
Pitch 1.00 0.68 0.20
Yaw 1.00 0.50 0.20
Throttle Mid: 0.50 / Expo: 0.20

PROFILE 2 — SKATEPARK / CHASE (SC switch MID): | Axis | RC Rate | Super Rate | Expo | | :---- | :------ | :--------- | :---- | | Roll | 1.30 | 0.72 | 0.15 | | Pitch | 1.30 | 0.72 | 0.15 | | Yaw | 1.20 | 0.55 | 0.15 | Throttle Mid: 0.45 / Expo: 0.15

BETAFLIGHT — GPS & RESCUE

GPS SETTINGS:

  • Protocol : UBLOX
  • Auto Config : ON
  • Baud : 57600
  • SBAS : ON (EGNOS — Czech Republic is fully covered)
  • Min Sats to Arm : 8
  • GPS for Yaw : OFF (compass handles yaw)

COMPASS

  • ON / Alignment per physical module orientation (arrow forward = CW0_DEG_FLIP)
  • Calibrate outdoors, away from metal, before maiden and after any frame swap where GPS module position may have shifted.
  • GPS orientation is fixed by bracket geometry — arrow forward by design.

GPS RESCUE 2.0: * Rescue Angle : 32° * Return Altitude : 40 m * Ground Speed : 10 m/s * Throttle Min : 1150 * Throttle Max : 1700 * Throttle Hover : Calibrate via hover test (~1350–1450 for this build) * Min Sats : 8 * Sanity Checks : ON * Allow Arm Without Fix: OFF

FAILSAFE

  • Guard Time : 300 ms (Stage 1)
  • Stage 2 : GPS Rescue (if sats ≥8 and home set); Land (fallback)
  • Failsafe Throttle : 1200

BETAFLIGHT — LOW-SPEED MODE (A2 REGULATORY COMPLIANCE)

Target: declared maximum speed ≤5 m/s for EASA A2 skatepark proximity flying.

Implementation: throttle scale profile on SD switch.

CONFIGURATION

  1. In Profiles: Throttle Limit Type = SCALE; Throttle Limit % = 55% (starting point)
  2. Assign profile to SD switch DOWN position.
  3. OSD: enable GPS Speed display (km/h) — pilot monitors compliance in real time.

CALIBRATION PROCEDURE

  • Fly straight line at full stick with SD DOWN (low-speed mode active).
  • Read peak GPS speed from Blackbox or OSD recording.
  • Adjust throttle scale until peak speed ≤4.8 m/s (0.2 m/s margin).
  • Re-verify after any weight change.

CALIBRATED VALUES (fill in after calibration): * Throttle Scale : _ % * TX Switch : SD DOWN = LOW-SPEED MODE ACTIVE * Peak speed verified: _ m/s on _ (date)

BETAFLIGHT — OSD LAYOUT

Always visible:

  • Battery Voltage (large, top left)
  • Battery Percentage (top left, below voltage)
  • GPS Satellites (top right)
  • GPS Speed km/h (centre right — A2 compliance monitoring)
  • RSSI / Link Quality (top right, below sats)
  • Warnings (centre, auto-position)
  • Disarmed indicator (centre)

Flight session: * Altitude relative (right) * Home Direction Arrow (bottom centre) * Home Distance (bottom right) * Throttle Position (bottom left) * Flight Timer (bottom left) * ESC Temperature (bottom right — monitor on hot days and after punch runs)

Tuning / debug (enable temporarily): * Debug 1–4 (RPM or filter values) * Crosshairs (level reference for cinematic framing)

HDZero NOTE: MSP Displayport selected in OSD tab — OSD is rendered by VTX, not burned into video. Clean, sharp OSD in DVR recording.

BETAFLIGHT — BLACKBOX

  • Device : Flash (H7A3-SLIM onboard flash — no SD card needed)
  • Rate : 1/2 (500 Hz)
  • Debug Mode : GYRO_SCALED (initial filter verification) → Change to RPM_FILTER after filters confirmed clean

FLASH CAPACITY MANAGEMENT

  • H7A3-SLIM onboard flash fills in ~20–30 minutes at 500 Hz.
  • Before each session: check remaining space in Blackbox tab.
  • Download and erase flash after each session — never start a maiden or tuning session with less than 50% flash available.
  • Name log files by date and session before archiving: YYYYMMDD_session_N.bbl

POST-MAIDEN ANALYSIS WORKFLOW

  1. Download log: Betaflight Configurator → Blackbox tab → Download.
  2. Open at https://blackbox.betaflight.com (Blackbox Explorer, browser-based).
  3. Check Gyro[0] pre/post filter: noise floor should drop significantly.
  4. Check D-term trace: clean, no high-frequency chatter.
  5. Check motor outputs: all 4 track together. Divergence = imbalance or oscillation.
  6. High-frequency motor output not in gyro = motor/ESC issue.
  7. Gyro peaks not caught by filters = identify frequency, adjust dynamic notch range.

ESC CONFIGURATION (PILOTIX 75A AM32)

Access via AM32 Configurator or Betaflight pass-through.

  • PWM Frequency : 48 kHz
  • Motor Timing : 16° starting value → raise to 20° if motors run cool and throttle response feels laggy → keep at 16° or lower if motor temps are elevated at cruise
  • Demag Compensation: Medium
  • Rampup Power : 75% (prevents aggressive spin-up resonance)
  • Temperature Prot : ON

BIDIRECTIONAL DSHOT

  • Bidirectional : ON (must match Betaflight Configuration tab)
  • Extended Telemetry: ON (temp, voltage, current per ESC — OSD + Blackbox)

MOTOR DIRECTION (Props In):

  • Motor 1 Front Right : CCW
  • Motor 2 Rear Right : CW
  • Motor 3 Rear Left : CCW
  • Motor 4 Front Left : CW

Set directions via Betaflight Motor tab DSHOT commands — not AM32 direction setting.

HDZERO FREESTYLE V2 — VTX CONFIGURATION

  • Default Power : 200 mW (skatepark VLOS range; reduces VTX heat)
  • Maximum Power : 1000 mW (extended cinematic; verify local regulations)
  • Band/Channel : R (Raceband) / R1 (5658 MHz) as default when flying solo
  • OSD Source : MSP Displayport (UART 4 from Betaflight)
  • DVR Resolution : 1080p60
  • DVR Bitrate : Maximum
  • Record Trigger : Auto on arm
  • File Format : MP4 (H.264)

MIPI CABLE NOTE

  • Use 250 mm cable with generous service loop — never pull taut during swap.
  • Camera travels on front bracket. VTX is in Platform electronics zone. MIPI ribbon (225mm) runs through Platform channel nose-to-tail. Bracket removes without disconnecting VTX (service loop ~26mm).
  • Inspect ZIF socket annually. Rated ~30 insertion cycles.
  • Keep one 250 mm spare MIPI cable in field bag.

HDZERO GOGGLE 2 — SETUP & INTEGRATION

INITIAL SETUP:

  1. Update Goggle 2 firmware via HDZero app (phone/tablet over WiFi).
  2. Pair with HDZero Freestyle V2 VTX: both on same channel/band.
  3. Verify 1080p 90Hz video feed before configuring anything else.

ELRS BACKPACK INTEGRATION

  1. On TX16S MKII: EdgeTX → Tools → ExpressLRS → Backpack WiFi mode.
  2. On Goggle 2: Settings → ExpressLRS Backpack → WiFi binding mode.
  3. Pair devices via browser at 10.0.0.1 (backpack hotspot) or via TX binding.
  4. Once paired: FC telemetry (voltage, GPS, RSSI) appears as OSD overlay in goggles.
  5. This is independent of the HDZero video OSD — two separate OSD layers.

WIFI MIRROR

  • Goggle 2 WiFi streaming: Settings → WiFi → enable.
  • Connect phone/tablet to Goggle 2 hotspot.
  • Open HDZero app → Live View.
  • Use for: spotter monitoring, recording session review on phone, demo to bystanders.
  • Note: WiFi mirror adds ~1 frame latency to phone view — goggles remain at 3ms.

DVR MANAGEMENT

  • DVR files stored on Goggle 2 internal storage (check capacity before session).
  • Download via USB after session. Keep goggle DVR and VTX DVR — both provide different angles and backup in case one recording is corrupted.

GYROFLOW — POST-PROCESSING

WORKFLOW:

  1. Download Blackbox log (.bbl) from FC flash via Betaflight.
  2. Download DVR recording (.mp4) from HDZero VTX internal storage via USB.
  3. Open Gyroflow. Import video.
  4. Import gyro data: Betaflight Blackbox → load .bbl file.
  5. Sync: align gyro data with video using audio waveform. HDZero audio contains motor noise — useful for sync identification.
  6. Lens calibration: select HDZero Freestyle V2 profile from Gyroflow database. If not present, run Gyroflow calibration tool with printed checkerboard.

STABILISATION SETTINGS

  • Cinematic ground shots: Horizon Lock / Smoothness 70–80%
  • Chase shots: Plain Stabilisation / Smoothness 60–65%
  • Zoom (crop): minimum — target 1.05–1.10x. Above 1.15x = sync or vibration issue.

EXPORT

  • Resolution: 1080p. Codec: H.265 (archival) / H.264 (editing).

QUALITY INDICATOR

  • Clean floating-mount build: >90% quality on hover footage.
  • Chase footage: lower due to intentional motion.
  • Below 70% on hover: check gyro sync, prop balance, motor mount torque.

MATEK M10Q‑5883 — GPS CONFIGURATION

Auto-configured by Betaflight when GPS Auto Config is ON.

One-time manual configuration via u-center (Windows) for best performance and operational security:

CONSTELLATION CONFIGURATION

  • GPS ✅ ON — baseline, US infrastructure
  • Galileo ✅ ON — EU infrastructure, politically neutral, excellent accuracy
  • BeiDou ✅ ON — Chinese infrastructure, independent ground segment, good coverage at Czech latitudes, no documented hostile manipulation in European airspace
  • GLONASS ❌ OFF — Russian infrastructure. Documented jamming and spoofing in conflict-adjacent areas. Disable as first config step.

Rationale: GPS + Galileo + BeiDou gives 20-25 visible satellites at Czech latitudes — equivalent coverage to all-four-constellation config. GLONASS removal has zero practical penalty and eliminates one threat vector. Near eastern borders specifically: GLONASS OFF is mandatory operational rule.

OPERATIONAL RULE — BORDER AREAS:

  • Never use GPS-dependent flight modes (Poshold, RTH) near eastern border areas
  • Fly Angle mode with manual control only in high-jamming-risk zones
  • Monitor satellite count in OSD — if count drops below 6 mid-flight, switch to Angle mode immediately
  • ELRS 250Hz packet rate preferred over 500Hz in high-RF-noise environments (better range and noise rejection at cost of minor latency)

OTHER SETTINGS

  • SBAS: EGNOS ON (Czech Republic: excellent Galileo/EGNOS coverage)
  • Dynamic Model: Airborne 1G
  • Update Rate: 10 Hz
  • Save to flash after changes

ANTENNA PLACEMENT (CRITICAL):

  • GPS antenna must have unobstructed sky view — no PCCF or CF material between antenna element and sky. CF is electrically conductive and attenuates GPS signals.
  • V2.4.6: M10Q mounts on front GPS/camera bracket, above camera, facing up. Bracket positions GPS at maximum distance from ESC and main wiring — clean RF environment.
  • Arrow pointing forward. Bracket orientation is fixed — GPS alignment is permanent.
  • VTX antenna exits downward or rearward from electronics zone — must NOT obstruct GPS antenna on front bracket above.
  • Compass calibration: outdoors, away from metal, before maiden and after any bracket removal/reinstallation where GPS module orientation may have shifted.

RECEIVER — RADIOMASTER RP2 ELRS

BINDING PROCEDURE:

  1. Power RP2 via FC 5V pad (bind before full installation for easier access).
  2. RP2 enters binding mode automatically on first power — or hold bind button.
  3. On TX16S MKII: EdgeTX model → Internal RF → ELRS → [Bind].
  4. RP2 LED: solid = bound. Flashing = searching.
  5. In Betaflight Receiver tab: confirm channel inputs move correctly with sticks. Verify arm switch (SF) channel reads correctly before proceeding.

ELRS SETTINGS ON RP2:

  • Packet Rate: 250 Hz
  • Telemetry Ratio: 1:16
  • Power: Auto / 100mW max (LBT EU limit)
  • Switch Mode: Wide (required for all 6 switch assignments)

ANTENNA PLACEMENT

  • RP2 antenna must not be routed parallel to video or ESC motor wires.
  • Perpendicular routing or 45° angle to main wiring runs.
  • Secure antenna with thin zip-tie — not glue.

CONFORMAL COATING — ELECTRONICS PROTECTION

Mandatory before first flight in any weather. Protects against:

  • Skatepark moisture (dew, rain splash, wet concrete)
  • Winter condensation when transitioning from warm car to cold air
  • Crash debris ingestion
  • Corrosion from extended storage

PROCEDURE

  1. Complete all soldering and wiring before coating. Coating after soldering.
  2. Mask connectors, USB port, button pads, any through-hole pads needing future re-soldering, and ESC motor pads (coating on high-current pads causes delamination).
  3. Apply one thin coat of electronics-grade silicone or acrylic conformal coating (spray or brush). Silicone preferred — more flexible, better thermal cycling.
  4. Allow full cure per manufacturer spec (typically 24 hours at room temperature).
  5. Apply second coat if first shows thin spots or bare areas.
  6. Remove masking. Inspect under UV light if conformal coating is UV-fluorescing (most are) — confirms coverage without gaps.

PARTS TO COAT

  • H7A3-SLIM FC: all surfaces except USB port, boot button, UART pads in use.
  • Pilotix ESC: all surfaces except motor pads, VBAT input, and ESC telemetry pad.
  • HDZero VTX: all surfaces except MIPI ZIF socket area and video connector.
  • Matek M10Q: connector area and PCB surfaces.
  • RP2 receiver: full coverage except antenna base and bind button.
  • Buck converter: full coverage.

DO NOT COAT

  • Connector bodies or pins
  • Motor windings or motor pads on ESC
  • MIPI ZIF socket
  • USB port on FC
  • Any pad you may need to re-solder

WINTER OPERATIONS PROTOCOL

TEMPERATURE THRESHOLDS:

  • Above ~0°C : PETG arms — standard operating procedures.
  • Below 0°C : Battery pre-warming mandatory. Reduced flight time targets. PETG arms not recommended below 0°C in V2.4.6 baseline — avoid.
  • Below −10°C : Not recommended. LiPo performance severely degraded. If flying, pre-warm to 25°C and monitor cell voltage every 30 seconds.

BATTERY PRE-WARMING

  • Store batteries at room temperature (minimum 15°C) before session.
  • At session site: keep batteries inside jacket or insulated bag until 5 minutes before flight. Target battery temperature before first flight: 20–25°C.
  • A battery at 5°C may perform as if 30–40% of its rated capacity is unavailable.
  • Never charge a cold battery — wait until battery is above 10°C.

FLIGHT TIME TARGETS IN COLD WEATHER

Temperature Cruise target Chase target Land trigger
+5 to 0°C 12 min 5 min 3.7 V/cell warning
0 to −5°C 9 min 4 min 3.7 V/cell warning
−5 to −10°C 6 min 3 min 3.8 V/cell warning

Betaflight winter voltage settings: * Min Cell V: 3.6 V (vs summer 3.5 V) * Warning Cell V: 3.7 V (vs summer 3.6 V) Switch to winter voltage profile in Betaflight before cold-weather sessions.

CONDENSATION MANAGEMENT

  • Allow drone to acclimate slowly when moving from cold exterior to warm interior. Wrap in breathable cloth — do not seal in airtight bag (condensation forms inside).
  • If visible condensation on electronics: do not power on. Allow 30 minutes at room temperature before powering up. Conformal coating prevents most issues but condensation inside connectors is still a risk.

PROP INSPECTION (cold weather):

  • Inspect all 4 props before every cold-weather flight — not just tip inspection.
  • Check full blade surface for micro-cracks: cold props are more brittle and cracks propagate faster. Any visible crack = replace entire prop set.
  • Carry 2 full spare prop sets in field bag at all times during winter sessions.

ARM MATERIAL VERIFICATION

  • V2.4.6 uses PETG arms (single material strategy).
  • Do not fly below 0°C in V2.4.6 baseline — PETG not qualified at sub-zero temps.
  • Inspect arm shafts and tab junctions visually before every cold-weather flight. Cold temps increase PETG brittleness — lower crash tolerance.

PRE-FLIGHT SOFTWARE CHECKLIST

Before each session:

[ ] Betaflight: firmware and config not reset (verify on boot) [ ] GPS lock: ≥8 satellites before arming [ ] Compass: calibrated (re-calibrate if near magnetic interference or after swap) [ ] OSD: battery voltage matches multimeter (±0.1 V) [ ] Low-speed mode: test on ground — throttle limit active; confirm via OSD [ ] HDZero VTX: DVR recording starts on arm; storage space available [ ] Blackbox: logging active; flash has ≥50% space; erase if needed [ ] ELRS Backpack: telemetry visible in Goggle 2 OSD [ ] Motor check: spin each motor individually before maiden and after any crash [ ] Winter only: battery temperature ≥15°C; correct arm set fitted; props inspected

After each session: [ ] Download Blackbox log before erasing flash [ ] Download HDZero DVR files (VTX + Goggle 2) [ ] Check motor mount torque (every 5 flight hours) [ ] Inspect o-rings for compression set or cracking [ ] Check prop tips for damage; replace any nicked prop [ ] Winter: allow drone to acclimate before storing indoors

ELECTRONICS SERVICE — SOFTWARE CONSIDERATIONS

Betaflight configuration is stored on the FC flash. No reconfiguration required

after routine electronics service (FC/ESC removal and reinstall).

ITEMS TO VERIFY AFTER ELECTRONICS SERVICE

  • Motor directions: spin test each motor in Betaflight Motors tab. MR30 labels (M1–M4) prevent mis-wiring, but verify electrically.
  • Motor order: confirm correct Betaflight motor mapping (M1 FR, M2 RR, M3 RL, M4 FL).
  • GPS compass calibration: if GPS/camera bracket was removed and reinstalled, verify arrow orientation and recalibrate outdoors if in doubt.
  • OSD voltage reading: verify against multimeter.
  • Blackbox space: check and erase if needed before flight.
  • Low-speed mode: re-verify GPS speed calibration if battery or prop set changed.
  • Dowel pin seating: confirm FC tray seated on both dowel pins — keyed, cannot seat 180° wrong.

CONFIGURATION BACKUP (after any significant change):

  • Betaflight → Presets → Save Backup → "libdrone_V2.4.6_BF_YYYYMMDD.txt"
  • AM32 Configurator → Save Setup → "libdrone_V2.4.6_AM32.ini"
  • HDZero App → Export → "libdrone_V2.4.6_HDZero.json"
  • EdgeTX → Backup model → "libdrone_V2.4.6_EdgeTX.etx"
  • Store all in Obsidian vault. Commit to Gitea on Synology after each session.

RELATION BETWEEN SOFTWARE_V300 AND FIRMWARE DIRECTORY

This document provides the conceptual configuration: * what each subsystem does and why specific values were chosen * how hardware properties (mass, inertia, motor mount isolation) influence software parameters * operational procedures and checklists

The code/Firmware/ directory provides concrete artefacts: * Betaflight CLI diffs (.txt) * AM32 Configurator JSON presets * EdgeTX model exports (.etx) * HDZero JSON profiles * MicroPython sensor logger source files

Together they form the complete description of the libdrone V2.4.6 flight stack. Update both when any configuration change is made — they must stay in sync.

"SOFTWARE IS THE NERVOUS SYSTEM. GET IT RIGHT BEFORE THE DRONE LEAVES THE GROUND."


PI ZERO 2W SETUP — LCM-1 COMPANION COMPUTE

This section covers OS configuration for the Pi Zero 2W fitted in the Pro Pi bay. Complete WBS Phase 9.2–9.3 in order. Do not skip the Bluetooth disable step.

Critical: UART0 / Bluetooth Conflict

The Pi Zero 2W maps its primary UART (UART0, used for GPIO pins 8 TX and 10 RX) to Bluetooth by default. This must be disabled before the companion UART can work.

In /boot/config.txt — add these lines:

enable_uart=1
dtoverlay=disable-bt

In /boot/cmdline.txt — remove console=serial0,115200 if present.

Reboot. Verify: ls /dev/ttyAMA0 should exist and respond. Test: python3 -c "import serial; s=serial.Serial('/dev/ttyAMA0',921600); print('OK')"

OS Image

Raspberry Pi OS Lite 64-bit — headless (no desktop). Flash with Raspberry Pi Imager. Configure in Imager before flashing: - Hostname: libdrone-[serial number] - Enable SSH - WiFi: set to your bench network for initial setup - Username/password: document per-build in build log

Python Dependencies

sudo apt update && sudo apt install -y python3-pip
pip3 install pymavlink flask pyserial

WiFi Hotspot Configuration

The Pi runs as a WiFi access point in the field (no router needed). Install hostapd and dnsmasq:

sudo apt install -y hostapd dnsmasq

/etc/hostapd/hostapd.conf:

interface=wlan0
ssid=libdrone-[serial]
wpa_passphrase=libdrone2046
hw_mode=g
channel=6
wpa=2
wpa_key_mgmt=WPA-PSK

/etc/dnsmasq.conf — add:

interface=wlan0
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h

Static IP for wlan0 in /etc/dhcpcd.conf:

interface wlan0
static ip_address=192.168.4.1/24
nohook wpa_supplicant

Libdrone Broker Script (autostart)

Place broker script at /home/pi/libdrone_broker.py. Systemd service at /etc/systemd/system/libdrone.service:

[Unit]
Description=libdrone Pi broker
After=network.target

[Service]
ExecStart=/usr/bin/python3 /home/pi/libdrone_broker.py
Restart=always
User=pi

[Install]
WantedBy=multi-user.target

Enable: sudo systemctl enable libdrone && sudo systemctl start libdrone

Threshold Logic — Reference Implementation

# /home/pi/libdrone_broker.py — minimal threshold broker
from pymavlink import mavutil
from flask import Flask, jsonify
import threading, time

app = Flask(__name__)
state = {'gps': {}, 'battery': {}, 'sensors': {}, 'alerts': []}

THRESHOLDS = {
    'PM25': 5.0,    # µg/m³
    'CO2':  25.0,   # ppm
    'RAD':  0.05,   # µSv/h
}

last_sent = {}
HEARTBEAT_INTERVAL = 30  # seconds

def should_send(key, value):
    now = time.time()
    prev = last_sent.get(key, {'value': None, 'time': 0})
    delta = abs(value - prev['value']) if prev['value'] is not None else float('inf')
    age = now - prev['time']
    if delta > THRESHOLDS.get(key, float('inf')) or age > HEARTBEAT_INTERVAL:
        last_sent[key] = {'value': value, 'time': now}
        return True
    return False

@app.route('/telemetry')
def telemetry():
    return jsonify(state)

def mavlink_loop():
    conn = mavutil.mavlink_connection('/dev/ttyAMA0', baud=921600)
    while True:
        msg = conn.recv_match(blocking=True, timeout=1)
        if msg:
            t = msg.get_type()
            if t == 'GLOBAL_POSITION_INT':
                state['gps'] = {
                    'lat': msg.lat/1e7, 'lon': msg.lon/1e7,
                    'alt': msg.relative_alt/1000
                }
            elif t == 'SYS_STATUS':
                state['battery'] = {'voltage': msg.voltage_battery/1000}

threading.Thread(target=mavlink_loop, daemon=True).start()
app.run(host='0.0.0.0', port=80)

Verification Checklist

[ ] /dev/ttyAMA0 exists and responds
[ ] Bluetooth disabled  no conflict on UART0
[ ] WiFi hotspot SSID libdrone-[serial] visible from phone
[ ] REST API responds: curl 192.168.4.1/telemetry returns JSON
[ ] FC telemetry (lat/lon/alt) updating in API response
[ ] libdrone.service enabled and starts on boot (verify after reboot)
[ ] ELRS WiFi Backpack firmware matches TX16S ELRS firmware version
[ ] QGroundControl connects to backpack hotspot on UDP 14550

Revision History

Version Date Author Summary
3.5.0 2026-03-30 JS Pi Zero 2W Setup section added: UART/Bluetooth conflict fix, OS configuration, WiFi hotspot, broker script, threshold logic reference, verification checklist. Version bumped to 2.4.6.
3.4.3 2026-03-27 JS Platform architecture description updated to stepped width.
3.3.0 2025-12 JS Three-layer architecture context added. VTX moved to electronics zone.
3.2.0 2025-09 JS Initial configuration reference.