v2.3.8 - Remove Dead Code from v2_main (2026-02-24)¶
What Changed?¶
This release removes unused interrupt dead code from v2_main.cpp.
The pushed flag, onPushed() ISR, and attachInterrupt() call were copied from the legacy main.cpp but never used in the v2 loop.
No behavior changes; fully backward compatible.
What's New¶
Main Feature: Remove pushed/onPushed Dead Code¶
What it does:
Removes three unused symbols from v2_main.cpp:
volatile boolean pushed— flag written by ISR but never read inloop()void IRAM_ATTR onPushed()— ISR that set the unused flagattachInterrupt(SWITCH_PIN, onPushed, FALLING)— interrupt registration with no consumer
Why it matters:
- These were copied from legacy
main.cppduring the v1/v2 split but serve no purpose in v2 - Removes IRAM allocation for an ISR that does nothing useful
- Clarifies
setup()intent: no button interrupt handling in the current v2 design
Installation¶
Quick Start¶
# Get the release
git checkout v2.3.8
# Build
task v2:build
# Upload
task v2:upload
# Check it works
task monitor
What's Different from the Last Version?¶
🔧 Changed¶
v2_main.cpp: removedvolatile boolean pushedglobal variablev2_main.cpp: removedvoid IRAM_ATTR onPushed()ISRv2_main.cpp: removedattachInterrupt(SWITCH_PIN, onPushed, FALLING)callv2_main.cpp: removed// SHARED STATEsection (now empty)
Is It Safe to Upgrade?¶
Backward Compatible: Yes
- The removed interrupt was never consumed — no behavior change
- Slight RAM reduction (8 bytes) from removing the unused
pushedvariable
Tests Passed¶
- ✅ Builds without errors
Release Details¶
- Date: 2026-02-24
- Version: v2.3.8
- Files Changed: 1 (
src/v2_main.cpp)
Next Steps¶
Continued code quality improvements (see REFACTORING_ROADMAP.md):
- Fix GNSS coordinate type
float→double(P1) - Fix
@filedocstring inv2_main.cpp(saysmain_next.cpp)