v1.10.4 - Stream Module Refactoring (2025-12-05)¶
What Changed?¶
This release refactors the serial stream output modules to improve code clarity and establish a consistent naming convention for future extensions.
The sensor_data and sensor_formatter modules are renamed to stream_data and stream_formatter to clarify their specialization in stream output formatting (SSV/TSV/CSV/JSONL).
The sensor_data_t struct is renamed to event_t for simplicity. All changes are pure refactoring with zero functional impact.
What's New¶
Main Feature: Stream Module Clarity¶
What it does:
Renames modules and types to reflect their actual purpose (serial stream output formatting) rather than generic sensor data handling. This separates architectural concerns between stream formatting modules and sensor driver modules (adc_sensor, bme280_sensor), improving codebase navigability.
Why it matters:
- Developers can immediately identify stream-specialized modules by filename
- Establishes
stream_*naming convention for future extensions (WebSocket, Cloud, Logger) - Reduces architectural confusion when adding new features
Module Changes:
| Old Name | New Name |
|---|---|
sensor_data.h/cpp |
stream_data.h/cpp |
sensor_formatter.h |
stream_formatter.h/cpp |
sensor_data_t |
event_t |
send_sensor_data() |
send_event() |
Installation¶
Quick Start¶
# Get the release
git checkout v1.10.4
# Build
task build
# Upload
task upload
# Check it works
task monitor
What's Different from the Last Version?¶
✅ Added¶
- Documentation of
stream_*naming convention in include/stream_data.h for future module extensions - Guidelines for future stream modules in
REFACTORING_ROADMAP.mdv1.10.4 section
🔧 Changed¶
-
File renames (via
git mvto preserve history):src/sensor_data.cpp→src/stream_data.cppinclude/sensor_data.h→include/stream_data.hsrc/sensor_formatter.cpp→src/stream_formatter.cppinclude/sensor_formatter.h→include/stream_formatter.h
-
Type renames:
sensor_data_t→event_t(across 8+ files)send_sensor_data()→send_event()(improved consistency)
-
Include updates:
- Updated 6 files with new include directives
- Updated header guards (
SENSOR_DATA_H→STREAM_DATA_H, etc.) - Updated all function signatures and type references
🐛 Fixed¶
- (No bug fixes; pure refactoring)
Is It Safe to Upgrade?¶
Backward Compatible: Yes ✅
- Zero functional changes: All output formats, behavior, and APIs remain identical
- Binary identical: Flash and RAM usage unchanged (8.4% RAM, 24.6% Flash)
- Build verified: Zero warnings, pre-commit hooks passed
- Include order independent: No conflicts with different header include orders
- Internal refactoring only: No breaking changes to public APIs
All existing code using stream data structures and formatters will work without modification.
Tests Passed¶
- ✅ Builds without errors (
task build) - ✅ Binary size identical to v1.10.3 (RAM 8.4%, Flash 24.6%)
- ✅ All old references removed (grep verification)
- ✅ Pre-commit hooks passed
- ✅ No duplicate definition conflicts
- ✅ All 4 stream formats (SSV/TSV/CSV/JSONL) produce identical output
Release Details¶
- Date: 2025-12-05
- Version: v1.10.4
- Files Changed: 12 (4 renamed, 8 updated)
- Commits: 5
f49cd22- refactor(stream): update header guards, includes, struct nameea85b88- refactor(stream): rename send_sensor_data() → send_event()
Next Steps¶
The refactoring enables future stream-related features to follow a consistent pattern:
- stream_websocket.h/cpp - WebSocket output formatter
- stream_logger.h/cpp - File logging formatter
- stream_cloud.h/cpp - Cloud API integration
All future stream modules should follow the stream_* naming pattern established in v1.10.4.