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_countreduced from 100 to 10 (required for threshold scan in noisy OSECHI) DETECT_POLL_COUNTmacro inconfig.hupdated to match- Valid range clarified: 1–65535 (0 was never valid but was documented as such)
📝 Docs Fixed¶
poll_countdefault value updated in all docstrings (v2_command.h,v2_command.cpp,v2_detector.h,v2_command_queue.h)- Stale
sent_atfield name corrected tosent_usinv2_device_response.handv2_device_response.cpp - Missing
v2_prefix added to@seereferences inv2_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 toCosmicDetector::reset()inv2_detection_processor.hlast_event_time_uscorrected tog_triggered_usinv2_detection_processor.hbuild_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_RESPONSEandENABLE_TIMESTAMPnoted 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 100after boot. - All serial commands and JSON output format are unchanged.
Tests Passed¶
- Builds without errors (
task v2:build) SET_POLL_COUNT/GET_POLL_COUNTcommands 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.