mirror of
https://github.com/meshtastic/firmware.git
synced 2026-10-31 20:40:53 -04:00
d2fb16a508d899585f9a852fdc65e7804cd651ee
The lock exists so a readout cannot land between the calls of a RadioLib sequence, where it would clear flags the sequence is about to use. Three paths reached from the main loop still made such sequences without it: - checkCadHandoffTimeout()'s startReceive() after a handoff RX that never completed. - checkStaleRxFlags(), which reads the IRQ flags, draws a verdict from them and then re-arms or clears - all of which a readout in between invalidates, since it retires the very flags being judged. - resetAGC(), which is a sequence end to end: warm sleep, RC standby, CALIBRATE_ALL, the re-applied DIO2/boosted-gain/0x8B5 settings and the startReceive() that resumes. Its own mid-packet bail is a point check, so it cannot exclude a readout that starts just after it. All three predate the readout task, so this is the task's own lock coverage catching up rather than a regression. Guarding resetAGC() at its call site in periodicRadioMaintenance() covers every driver's override. It can hold the lock for the length of a calibration, which delays a readout, but the chip is not readable for any of that anyway - the RX that would read a frame is the startReceive() at the end. checkRxDoneIrqFlag() is deliberately left unguarded: it is a single flag read and a wake, not a sequence, and serialising it behind a readout in flight would only delay the handoff it exists to make. Co-Authored-By: Jonathan Bennett <jbennett@incomsystems.biz> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVTg7Na1pVvCcwZoSv9Hnd
…
…
…
…
…
…
…
…
…
Overview
This repository contains the official device firmware for Meshtastic, an open-source LoRa mesh networking project designed for long-range, low-power communication without relying on internet or cellular infrastructure. The firmware supports various hardware platforms, including ESP32, nRF52, RP2040/RP2350, and Linux-based devices.
Meshtastic enables text messaging, location sharing, and telemetry over a decentralized mesh network, making it ideal for outdoor adventures, emergency preparedness, and remote operations.
Get Started
- 🔧 Building Instructions - Learn how to compile the firmware from source.
- ⚡ Flashing Instructions - Install or update the firmware on your device.
Join our community and help improve Meshtastic! 🚀
Stats
Languages
C++
73.5%
C
21.8%
Python
2.6%
Shell
1.5%
Batchfile
0.2%
Other
0.2%
