Skip to content

Remove SetupEvent/AnimatedEvent — dome drive is now a plain object#67

Merged
thePunderWoman merged 1 commit intomainfrom
refactor/dome-drive-remove-event-loop
Apr 21, 2026
Merged

Remove SetupEvent/AnimatedEvent — dome drive is now a plain object#67
thePunderWoman merged 1 commit intomainfrom
refactor/dome-drive-remove-event-loop

Conversation

@thePunderWoman
Copy link
Copy Markdown
Owner

Summary

  • DomeDriveRoboClaw no longer inherits SetupEvent or AnimatedEvent. It is a plain C++ class with no ReelTwo event-loop dependency.
  • setup() and animate() are called explicitly by AmidalaController, which is already in the ReelTwo event pool.

Bonus fix: setup ordering bug

Previously, fDomeDrive.setup() was called before AmidalaController::setup() because member objects register with SetupEvent before the owning class does. This meant homing started with default config values (default QPPS, front offset, stall timeout, etc.) — the EEPROM/config.txt values were applied only after homing had already begun.

Now fDomeDrive.setup() is called explicitly at the end of the RoboClaw config block in AmidalaController::setup(), after all parameters are applied.

What's left of ReelTwo in the dome drive

  • JoystickController — the hardware state struct for the PS controller
  • ReelTwo.h — for DEBUG_PRINT/DEBUG_PRINTLN macros

Neither is a structural dependency on the ReelTwo architecture.

Test plan

  • Build passes (pio run)
  • All 409 native unit tests pass (pio test -e native)
  • Dome starts homing on boot with correct config values applied
  • All dome behaviors work normally

🤖 Generated with Claude Code

DomeDriveRoboClaw no longer inherits SetupEvent or AnimatedEvent. setup()
and animate() are now called explicitly by AmidalaController, which is
already in the ReelTwo event pool.

This also fixes a subtle ordering bug: previously fDomeDrive.setup() was
called before AmidalaController::setup() (members register before the
class itself), so homing started with default config values. Now setup()
is called explicitly at the end of the RoboClaw config block, after all
parameters from EEPROM/config.txt have been applied.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thePunderWoman thePunderWoman merged commit 7014bce into main Apr 21, 2026
1 check passed
@thePunderWoman thePunderWoman deleted the refactor/dome-drive-remove-event-loop branch April 21, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant