Skip to content

v2.3.5 - Detector Init Cleanup (2026-02-24)

What Changed?

This release removes redundant gpio_set_pull_mode() calls from CosmicDetector::init(). The calls were duplicating what pinMode(INPUT_PULLDOWN) already does internally. No behavior changes; fully backward compatible.


What's New

Main Feature: Remove Redundant GPIO Init Calls

What it does:

Removes three gpio_set_pull_mode(pin, GPIO_PULLDOWN_ONLY) calls from CosmicDetector::init() that were duplicating the pull-down configuration already applied by pinMode(DETECT_PIN*, INPUT_PULLDOWN).

Why it matters:

  • pinMode(INPUT_PULLDOWN) calls gpio_set_pull_mode(GPIO_PULLDOWN_ONLY) internally — the explicit IDF calls were redundant
  • Removes unnecessary coupling to ESP-IDF's driver/gpio.h in the detector init path
  • Clarifies the intent: a single pinMode() call is sufficient and self-documenting

Installation

Quick Start

# Get the release
git checkout v2.3.5

# Build
task v2:build

# Upload
task v2:upload

# Check it works
task monitor

What's Different from the Last Version?

🔧 Changed

  • v2_detector.cpp: removed three redundant gpio_set_pull_mode() calls from CosmicDetector::init()
  • v2_detector.cpp: added comment explaining that INPUT_PULLDOWN handles pull-down configuration internally

Is It Safe to Upgrade?

Backward Compatible: Yes

  • GPIO pull-down configuration is unchanged — pinMode(INPUT_PULLDOWN) applies it as before
  • No change in detection behavior or runtime output

Tests Passed

  • ✅ Builds without errors

Release Details

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

Next Steps

Continued code quality improvements (see REFACTORING_ROADMAP.md):

  • Remove led_init() call from CosmicDetector::init() (P1)
  • Fix swich_pin typo in v2_main.cpp (P1)
  • Fix GNSS coordinate type floatdouble (P1)