Skip to content

v1.10.2 - Signal Naming Refactor (2025-12-05)

What Changed?

This release improves code clarity through systematic variable naming refactoring. Detection signals are renamed from signal1/2/3 to hit1/2/3 throughout the codebase, and ADC local variables are renamed from sensorValue to adc. These changes improve semantic clarity and align naming conventions across the firmware.


What's New

Refactoring: Signal and ADC Naming Conventions

What it does: Improves variable naming across detection and ADC modules for better code readability and maintainability.

Why it matters: - signal1/2/3hit1/2/3: The term "hit" is more domain-specific for cosmic ray detection events - sensorValueadc (local var): Shorter, more descriptive name that aligns with output field naming - Consistency: All sensor field names now follow snake_case convention (tmp_c, atm_pa, hmd_pct, uptime_ms, timedelta_us)

Code example:

// Before
int sensorValue = adc_read_with_channel_filter(
    detection.signal1,
    detection.signal2,
    detection.signal3);

// After
int adc = adc_read_with_channel_filter(
    detection.hit1,
    detection.hit2,
    detection.hit3);

Installation

Quick Start

# Get the release
git checkout vX.Y.Z

# Build
task build

# Upload
task upload

# Check it works
task monitor

What's Different from the Last Version?

✅ Added

  • None (refactoring only)

🔧 Changed

  • Renamed signal1, signal2, signal3 to hit1, hit2, hit3 in:
  • cosmic_detection_t struct fields
  • sensor_data_t struct fields
  • All function parameters and local variables
  • All documentation references
  • Renamed sensorValue local variable to adc in detection_process()
  • Updated output documentation (SSV, TSV, CSV, JSONL format descriptions)

🐛 Fixed

  • None (refactoring only)

Is It Safe to Upgrade?

Backward Compatible: Yes

  • Internal refactoring with no changes to firmware behavior or external interfaces
  • All data structures maintain identical memory layout and field values
  • Output formats (SSV, TSV, CSV, JSONL) remain unchanged
  • Pre-commit hooks and build configuration unaffected

Tests Passed

  • ✅ Builds without errors (Flash 24.6%, RAM 8.3%)
  • ✅ Pre-commit hooks pass (trailing whitespace, file endings, merge conflicts)
  • ✅ All format outputs verified (SSV, TSV, CSV, JSONL)
  • ✅ No functional changes to detection logic

Release Details

  • Date: 2025-12-05
  • Version: v1.10.2
  • Files Changed: 10
  • include/cosmic_detector.h
  • include/sensor_data.h
  • include/adc_sensor.h
  • include/sensor_formatter.h
  • src/cosmic_detector.cpp
  • src/main.cpp
  • src/adc_sensor.cpp
  • src/sensor_formatter.cpp
  • CLAUDE.md
  • uv.lock
  • Commits:
  • 201d548: refactor(signal-naming): rename signal1/2/3 to hit1/2/3
  • 6ee111a: refactor(adc-naming): rename sensorValue local variable to adc

Next Steps

Future work includes: - Consider renaming struct field sensorValue to adc_value (currently preserved for backward compatibility) - Potential minor version bump for struct field naming if implemented - Continued code quality improvements based on domain-specific terminology