Skip to content

DEADTIME_MS

Controls the minimum time interval (in milliseconds) that must elapse between consecutive detection events.

Can be set at compile time as a build flag or changed at runtime via the SET_DEADTIME command.


Default

  • v2: DEADTIME_MS=0 (no deadtime) — set in platformio.ini
  • v1: DEADTIME_MS=0 (no deadtime)

Build Flag

Set the compile-time default via platformio.override.ini:

[env:esp32dev-v2]
build_flags =
    -D DEADTIME_MS=1000

Runtime Command

Change deadtime dynamically without rebuilding:

SET_DEADTIME <milliseconds>

Examples:

SET_DEADTIME 0      # Disable deadtime
SET_DEADTIME 1000   # 1-second deadtime between events
SET_DEADTIME 60000  # Maximum: 60-second deadtime

The setting takes effect immediately and persists until the device resets.


Use Cases

  • DEADTIME_MS=0 — Normal cosmic ray detection (default)
  • DEADTIME_MS=1000–60000 — Bench testing to simulate lower event rates

History

  • v1.6.5 — Initial implementation