Skip to content

v2.3.6 - Detector SRP Cleanup (2026-02-24)

What Changed?

This release removes led_init() from CosmicDetector::init() to enforce single responsibility. LED initialization is the caller's responsibility (v2_main.cpp), not the detector's. No behavior changes; fully backward compatible.


What's New

Main Feature: Remove led_init() from CosmicDetector

What it does:

Removes the led_init() call and #include "led_manager.h" from v2_detector.cpp. CosmicDetector::init() now only initializes detection GPIO pins and resets counters — nothing more.

Why it matters:

  • Single Responsibility Principle: the detector should not own LED initialization
  • led_init() is already called explicitly in v2_main.cpp setup() before CosmicDetector::init()
  • The call in v2_detector.cpp was redundant and an SRP violation

Installation

Quick Start

# Get the release
git checkout v2.3.6

# 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 led_init() call from CosmicDetector::init()
  • v2_detector.cpp: removed #include "led_manager.h" (no longer needed)

Is It Safe to Upgrade?

Backward Compatible: Yes

  • led_init() is still called in v2_main.cpp setup() — LED behavior is unchanged
  • No change in detection behavior or runtime output

Tests Passed

  • ✅ Builds without errors

Release Details

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

Next Steps

Continued code quality improvements (see REFACTORING_ROADMAP.md):

  • Fix swich_pin typo in v2_main.cpp (P1)
  • Fix GNSS coordinate type floatdouble (P1)