Skip to content

v2.3.7 - Fix swich_pin Typo (2026-02-24)

What Changed?

This release fixes the swich_pin typo in v2_main.cpp and replaces the local variable with the SWITCH_PIN constant from config.h. No behavior changes; fully backward compatible.


What's New

Main Feature: Fix swich_pin Typo and Use SWITCH_PIN Constant

What it does:

Removes the local const int swich_pin = 0 variable and replaces its use in attachInterrupt() with the SWITCH_PIN constant defined in config.h. config.h is now the single source of truth for the switch pin number.

Why it matters:

  • Fixes the swich_pin typo (missing t)
  • Build-flag overrides (-DSWITCH_PIN=xx) now take effect in v2_main.cpp
  • Consistent with the project's SSOT pattern for pin constants

Installation

Quick Start

# Get the release
git checkout v2.3.7

# Build
task v2:build

# Upload
task v2:upload

# Check it works
task monitor

What's Different from the Last Version?

🐛 Fixed

  • v2_main.cpp: removed const int swich_pin = 0 local variable (typo: missing t)
  • v2_main.cpp: replaced swich_pin with SWITCH_PIN from config.h in attachInterrupt()

Is It Safe to Upgrade?

Backward Compatible: Yes

  • SWITCH_PIN defaults to GPIO0 (same value as the removed variable)
  • No change in interrupt behavior or runtime output

Tests Passed

  • ✅ Builds without errors

Release Details

  • Date: 2026-02-24
  • Version: v2.3.7
  • Files Changed: 1 (src/v2_main.cpp)

Next Steps

Continued code quality improvements (see REFACTORING_ROADMAP.md):

  • Fix GNSS coordinate type floatdouble (P1)
  • Remove pushed / onPushed() dead code from v2_main.cpp