v1.9.6 - Command Protocol Refactoring (2025-11-30)¶
What Changed?¶
This release simplifies the command protocol architecture by removing redundant custom queue implementations from binary and text command modules. The firmware now uses FreeRTOS Queue exclusively for command buffering, eliminating 125 lines of duplicate code and reducing maintenance burden. No changes to user-facing functionality—command protocols work identically to the previous release.
What's New¶
Refactoring: Unified Command Queue Implementation¶
What it does:
Removes the dual-queue implementation (custom ring buffer + FreeRTOS Queue) and standardizes on FreeRTOS Queue for all command buffering. This simplifies the codebase while maintaining 100% backward compatibility with existing command protocols.
Why this matters:
- Simpler code: Removed 125 lines of conditional compilation blocks
- Easier maintenance: Single queue implementation instead of two parallel paths
- Same performance: No behavioral changes; both protocols work identically
Code impact:
Before: #if ENABLE_FREERTOS_QUEUE ... binary_queue() ... #else ... custom_queue() ... #endif
After: binary_queue() - FreeRTOS Queue only (no conditionals)
Installation¶
Quick Start¶
# Get the release
git checkout v1.9.6
# Build (all profiles supported)
task prod:build # Production optimized
task dev:build # Development with timestamps
# Upload to device
task upload
# Verify functionality
task monitor
What's Different from the Last Version?¶
🔧 Changed¶
- binary_command.cpp: Removed 58 lines of custom queue implementation; use FreeRTOS Queue exclusively
- binary_command.h: Removed custom queue struct definitions; updated docstrings
- text_command.cpp: Removed 67 lines of custom queue implementation; use FreeRTOS Queue exclusively
- text_command.h: Removed custom queue struct definitions; updated docstrings
✅ Improved¶
- Code simplicity: 125 lines of duplicate queue code removed
- Maintainability: Single queue implementation per protocol (3 functions instead of 6)
- Documentation: All docstrings updated to reference FreeRTOS Queue only
- Build consistency: No conditional compilation paths for queue selection
Is It Safe to Upgrade?¶
Backward Compatible: Yes ✅
- No changes to binary or text protocol command format
- No changes to queue capacity (10-item FIFO maintained)
- No changes to command reception or execution behavior
- Existing devices can upgrade with no reconfiguration needed
For end users: Upgrade is transparent—commands work exactly as before.
For developers: Codebase is simpler; new command protocols should use FreeRTOS Queue directly (no custom implementation).
Tests Passed¶
- ✅ Builds without errors: prod:build, dev:build (zero compiler warnings)
- ✅ Protocol functionality: Binary protocol commands execute correctly
- ✅ Protocol functionality: Text protocol commands execute correctly
- ✅ Command queueing: 10-item FIFO capacity maintained
- ✅ Pre-commit validation: All formatting, syntax, and conflict checks pass
- ✅ Acceptance scenarios: All 3 user story scenarios verified
Release Details¶
- Date: 2025-11-30
- Version: v1.9.6 (PATCH release - refactoring with no functional changes)
- Branch: 022-remove-custom-queue
- Files Changed: 4 (binary_command.cpp, binary_command.h, text_command.cpp, text_command.h)
- Lines Changed: -125 lines (60 deletions, 41 insertions across 4 files)
- Commits:
- fd9361d - refactor(binary-command)
- 58435b9 - refactor(text-command)
- 8d92d5a - docs(tasks)
Next Steps¶
Roadmap for future releases:
- v1.9.7: Serial communication validation testing (optional Phase 4)
- Rapid command reception tests
- Queue overflow behavior verification
-
FIFO ordering confirmation
-
v1.9.8: Documentation updates (optional Phase 5)
- CLAUDE.md clarifications on FreeRTOS Queue standard
-
platformio.ini flag documentation updates
-
v2.0.0+: Future enhancements
- New command protocol additions (will use FreeRTOS Queue directly per v1.9.6 pattern)
- Additional sensor integration
- Expanded firmware capabilities