Development Roadmap Hull controller - SergeGit/rc-tank-platform GitHub Wiki
Hull Controller Development Roadmap
🗂️ Overview
This roadmap defines the step-by-step implementation and testing strategy for the RC Tank Hull Controller firmware under PlatformIO. Each phase corresponds to a specific subsystem, outlining coding tasks, testing milestones, and relative complexity.
⚙️ Development Phases
| Phase |
Module |
Implementation Tasks |
Testing Milestones |
Priority |
Complexity |
| 1. Core Framework |
main.cpp / main.h |
- Implement processCommand() switch-case- Register I2C receive/request events- Implement global responseBuffer- Add system states: NORMAL / ERROR / EMERGENCY_STOP- Setup watchdog timer |
✅ System compiles✅ I2C recognized on 0x08✅ Commands echo back expected data |
🔥 High |
🔸 Medium |
| 2. Configuration Setup |
config.h |
- Verify all pin mappings- Define all timing constants- Add voltage divider constants- Add debug flags |
✅ All pins defined✅ Constants verified✅ Configuration flexible |
🔹 Medium |
🔹 Low |
| 3. Battery Management System |
bms.cpp / bms.h |
- Implement ADC voltage read- Apply moving average (10 samples)- Implement battery type detection- Add relay enable/disable- Integrate with I2C responses |
✅ Voltage reports correctly✅ Relay toggles✅ Low battery triggers error |
🔥 High |
🔸 Medium |
| 4. Motor Control Core |
motor_control.cpp / motor_control.h |
- Create motor data struct- Register L293D & Cytron motors- Implement ramping algorithm- Add stopAllMotors()- Add diagnostic getters |
✅ Motors ramp smoothly✅ All motors stop on command✅ Diagnostics output correct |
🔥 High |
🔴 High |
| 5. Tracks Module |
tracks.cpp / tracks.h |
- Link track motors via motor_control IDs- Implement differential drive logic- Add arcade drive input- Add E-stop integration |
✅ Forward/backward and turning smooth✅ E-stop halts instantly |
🔥 High |
🔸 Medium |
| 6. Turret Module |
turret.cpp / turret.h |
- Register rotation/elevation motors- Implement speed mapping- Add stop function- Disable on E-stop |
✅ Turret rotates/elevates properly✅ Stops correctly on E-stop |
🔹 Medium |
🔹 Low |
| 7. Weapons System |
weapons.cpp / weapons.h |
- Implement timed cannon firing- Implement cooldown timer- Add laser/IR toggles- Integrate safety lock- Optional: firing interrupt |
✅ Cannon fires once per cooldown✅ Laser/IR toggle work✅ E-stop disables all |
🔥 High |
🔴 High |
| 8. Lights Module |
lights.cpp / lights.h |
- Implement ON/OFF/BLINK logic- Blink timing via millis()- Add safety override |
✅ Front/rear lights respond✅ Blink pattern stable✅ E-stop disables lights |
🔹 Medium |
🔹 Low |
| 9. Status & Telemetry |
(Main + Modules) |
- Build buildStatusByte() with bit flags- Implement prepareBatteryResponse()- Assemble all telemetry data |
✅ All telemetry commands functional✅ Status bits accurate |
🔥 High |
🔸 Medium |
| 10. System Validation & Integration |
(All Modules) |
- Connect to Raspberry Pi- Use Python test suite- Stress test commands- Verify power isolation and watchdog reset |
✅ All subsystems respond✅ Stable under full load |
🚀 Critical |
🟢 Mixed |
🧭 Development Strategy
- Complete low-level systems (BMS and Motor Control) first.
- Verify I2C and watchdog stability after every two phases.
- Use serial debug to validate PWM, ADC, and relay outputs before integrating with I2C.
- Perform end-to-end testing from the Raspberry Pi once all modules are integrated.
📊 Progress Tracking Template
| Module |
Status |
Notes |
main.cpp |
⬜ Pending |
Core I2C and command routing setup |
config.h |
✅ Complete |
Verified pin mappings and constants |
bms.cpp |
⬜ In Progress |
ADC functional, relay control pending |
motor_control.cpp |
⬜ In Progress |
Ramping implementation underway |
tracks.cpp |
⬜ Pending |
Awaiting motor IDs from registration |
turret.cpp |
⬜ Pending |
Mapping logic next |
weapons.cpp |
⬜ Pending |
Cannon cooldown logic next |
lights.cpp |
⬜ Pending |
Blink timing test next |
🧩 Notes
- Prioritize watchdog reliability and battery safety in early stages.
- Keep I2C communication consistent with the Hull Controller API Reference.
- Verify PWM pins and direction logic with oscilloscope before live motor tests.