Skip to content

v1.10.5 - Detection Stream Control (2025-12-05)

What Changed?

This release adds runtime control to enable/disable detection data streaming output. Users can now use the SET_STREAM command to pause detection output while maintaining full command reception and response capability. This is useful for data logging, calibration, or testing scenarios where selective output is needed.


What's New

Main Feature: Detection Stream ON/OFF Control

What it does:

Allows runtime control of detection event output without affecting command processing. When disabled, detection events are still processed internally (LED feedback, sensor reading) but not transmitted to serial. Commands and responses continue working normally.

How to use it:

Text command interface (development builds only):

# Disable detection output
SET_STREAM 0
# Response: {"type":"response","status":"ok","stream_enabled":0}

# Query current stream state
GET_STREAM
# Response: {"type":"response","status":"ok","stream_enabled":1}

# Enable detection output
SET_STREAM 1
# Response: {"type":"response","status":"ok","stream_enabled":1}

Or programmatically from C code:

// Disable stream output
config_set_stream_enabled(false);

// ... perform calibration or data collection ...

// Re-enable stream output
config_set_stream_enabled(true);

Installation

Quick Start

# Get the release
git checkout v1.10.5

# Build development firmware (with text commands)
task dev:build

# Upload
task dev:upload

# Check it works
task monitor

What's Different from the Last Version?

✅ Added

  • SET_STREAM <0|1> command - Enable/disable detection output
  • GET_STREAM command - Query current stream state
  • config_get_stream_enabled() C API - Query stream state programmatically
  • config_set_stream_enabled(bool) C API - Control stream state from code

🔧 Changed

  • send_event() dispatcher now checks stream enable flag before output
  • Stream formatter documentation updated with control notes

🎯 Key Properties

  • Stream enabled by default (matches original behavior)
  • Stream state persists across RESET (not reset when configuration resets)
  • Works with all output formats: SSV, TSV, CSV, JSONL
  • Minimal overhead: Single boolean check (<1 CPU cycle when disabled)
  • Commands always accepted regardless of stream state

Is It Safe to Upgrade?

Backward Compatible: ✅ Yes

  • Default behavior unchanged (stream enabled on startup)
  • All existing commands continue to work
  • No changes to detection or sensor logic
  • No changes to LED or hardware control
  • Binary size increase: ~0.1% (minimal)

Tests Passed

  • ✅ Builds without errors (prod, debug, dev profiles)
  • ✅ RAM usage acceptable (6.9-8.4%)
  • ✅ Flash usage acceptable (23.4-24.7%)
  • ✅ Commands accepted and processed correctly when stream disabled
  • ✅ Detection continues internally when stream OFF
  • ✅ LED feedback works regardless of stream state

Release Details

  • Date: 2025-12-05
  • Version: v1.10.5
  • Files Changed: 6
  • Commits:
  • 4dfe70c: feat(stream-control): implement detection stream ON/OFF control
  • daadd39: docs(progress): add stream control implementation log entry

Firmware Build Information

All builds tested and verified:

Profile RAM Flash Status
prod:build 6.9% 23.4% ✅ SUCCESS
debug:build 7.2% 23.6% ✅ SUCCESS
dev:build 8.4% 24.7% ✅ SUCCESS

Next Steps

Coming in v1.10.6:

  • Add stream state to GET_STATUS output for quick visibility
  • Optional debug logging for stream state transitions
  • Optional persistent stream state across power cycles