Skip to content

Commit

Permalink
manually stop all
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLocatelli committed Feb 14, 2024
1 parent 176b21d commit 4e8099c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/os/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,10 @@ auto main() -> int
imu::lsm6dsox.init();
imukit.init();

rtos::ThisThread::sleep_for(1s);

imukit.stop();

robot::controller.initializeComponents();
robot::controller.registerOnUpdateLoadedCallback(firmware::setPendingUpdate);
robot::controller.registerOnFactoryResetNotificationCallback(factory_reset::set);
Expand Down
10 changes: 7 additions & 3 deletions libs/RobotKit/include/RobotController.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,13 @@ class RobotController : public interface::RobotController

void suspendHardwareForDeepSleep() final
{
for (auto &component: _deep_sleep_enabled_components) {
component->enableDeepSleep();
}
// for (auto &component: _deep_sleep_enabled_components) {
// component->enableDeepSleep();
// }
_motor_left.enableDeepSleep();
_motor_right.enableDeepSleep();
_rfidkit.enableDeepSleep();
_lcd.enableDeepSleep();
}

void resetEmergencyStopCounter() final { _emergency_stop_counter = 0; }
Expand Down

0 comments on commit 4e8099c

Please sign in to comment.