2ed7bba5e7f5516586f638957fb09d9bf6186311
Mirror the EXT_PWR_DETECT pattern: replace runtime static variables (ext_chrg_detect_mode, ext_chrg_detect_value) with compile-time macros. Auto-infer EXT_CHRG_DETECT_VALUE from EXT_CHRG_DETECT_MODE when the mode is INPUT_PULLUP (→ LOW) or INPUT_PULLDOWN (→ HIGH); default to HIGH. This fixes inverted polarity on variants that define EXT_CHRG_DETECT_MODE INPUT_PULLUP without an explicit EXT_CHRG_DETECT_VALUE (e.g. russell): previously the runtime default of HIGH caused isCharging() to return the opposite of the correct value. With auto-inference the correct LOW active level is now derived at compile time. Remove the now-redundant EXT_CHRG_DETECT_VALUE HIGH from ELECROW-ThinkNode-M4 variant.h since HIGH is the inferred default. Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Andrew Yong <noreply@example.com> Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
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++
63.9%
C
26.9%
Python
8.2%
Shell
0.6%
Batchfile
0.2%
