Skip to content

Commit

Permalink
✨ (RobotController): Disconnect robot when entering in DS
Browse files Browse the repository at this point in the history
Remove transition in StateMachine to avoid infinite reboot loop
  • Loading branch information
YannLocatelli committed Jul 15, 2024
1 parent 640f7d8 commit aa41532
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions libs/RobotKit/include/RobotController.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ class RobotController : public interface::RobotController
for (auto &component: _deep_sleep_enabled_components) {
component->enableDeepSleep();
}
_ble.disconnect();
}

void wakeUp() final { system_reset(); }
Expand Down
1 change: 0 additions & 1 deletion libs/RobotKit/include/StateMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ struct StateMachine {
, sm::state::deep_sleeping + event<sm::event::charge_did_stop> = X

, sm::state::deep_sleeping + event<sm::event::ble_connection> = X
, sm::state::deep_sleeping + event<sm::event::ble_disconnection> = X

, sm::state::charging + boost::sml::on_entry<_> / (sm::action::start_deep_sleep_timeout {}, sm::action::start_charging_behavior {} )
, sm::state::charging + boost::sml::on_exit<_> / (sm::action::stop_deep_sleep_timeout {}, sm::action::stop_charging_behavior {} )
Expand Down

0 comments on commit aa41532

Please sign in to comment.