Skip to content

v2.5.2 - Reduce default poll_count for threshold scan in noisy environment (2026-06-02)

What Changed?

This release reduces the default detection poll count from 100 to 10 per cycle. This is required for threshold scan measurements with noisy OSECHI detectors, where a lower poll count reduces false coincidence counts in high-noise conditions. It also fixes a large number of stale docstrings that had drifted from the actual implementation.


What's New

Main Change: Lower default poll_count (100 → 10)

What it does: The number of GPIO polls per detection cycle is now 10 by default instead of 100. In noisy OSECHI environments, a high poll count inflates hit counts and makes threshold scans unreliable. Reducing to 10 gives cleaner per-event counts suitable for threshold calibration.

How to use it: No action required — the new default takes effect automatically on the next firmware upload. To restore the old value, send SET_POLL_COUNT 100 via serial after boot, or redefine DETECT_POLL_COUNT in your build flags.

Code example:

// Runtime override (serial command):
// SET_POLL_COUNT 100

// Build-time override (platformio.ini):
// build_flags = -DDETECT_POLL_COUNT=100

Installation

Quick Start

# Get the release
git checkout 2.5.2

# Build
task v2:build

# Upload
task v2:upload

# Check it works
task monitor

What's Different from the Last Version?

🔧 Changed

  • Default poll_count reduced from 100 to 10 (required for threshold scan in noisy OSECHI)
  • DETECT_POLL_COUNT macro in config.h updated to match
  • Valid range clarified: 1–65535 (0 was never valid but was documented as such)

📝 Docs Fixed

  • poll_count default value updated in all docstrings (v2_command.h, v2_command.cpp, v2_detector.h, v2_command_queue.h)
  • Stale sent_at field name corrected to sent_us in v2_device_response.h and v2_device_response.cpp
  • Missing v2_ prefix added to @see references in v2_detector.h, v2_detection_processor.h, v2_command_manager.h
  • init() docstring no longer claims LED manager initialization (not implemented there)
  • cosmic_detector_reset() corrected to CosmicDetector::reset() in v2_detection_processor.h
  • last_event_time_us corrected to g_triggered_us in v2_detection_processor.h
  • build_and_queue_event() description updated to reflect actual behavior (enqueue only, no payload build)
  • EventQueue memory estimate corrected from ~250 bytes to ~90 bytes per event_t
  • EventQueue usage example updated to use correct enqueue(&event) signature
  • ENABLE_DEVICE_RESPONSE and ENABLE_TIMESTAMP noted as always-on in v2

Is It Safe to Upgrade?

Backward Compatible: Yes, with one behavioral note.

  • Hit counts per event will typically be in the 0–10 range instead of 0–100. If your analysis scripts assume counts up to 100, adjust accordingly or send SET_POLL_COUNT 100 after boot.
  • All serial commands and JSON output format are unchanged.

Tests Passed

  • Builds without errors (task v2:build)
  • SET_POLL_COUNT / GET_POLL_COUNT commands work as before

Release Details

  • Date: 2026-06-02
  • Version: v2.5.2
  • Files Changed: 12

Next Steps

Continue v2 development — see REFACTORING_ROADMAP.md for upcoming work.