Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn hold_in_bootloader default as false in reboot #26423

Merged
merged 7 commits into from Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/AP_Compass/AP_Compass_Calibration.cpp
Expand Up @@ -41,7 +41,7 @@ void Compass::cal_update()
return;
} else if (_cal_has_run && _auto_reboot()) {
hal.scheduler->delay(1000);
hal.scheduler->reboot(false);
hal.scheduler->reboot();
}
}

Expand Down
Expand Up @@ -252,7 +252,7 @@ void loop(void)
if (hal.console->available() > 50) {
hal.console->printf("rebooting\n");
hal.console->discard_input();
hal.scheduler->reboot(false);
hal.scheduler->reboot();
}
hal.console->discard_input();
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL/Scheduler.h
Expand Up @@ -70,7 +70,7 @@ class AP_HAL::Scheduler {
virtual void set_system_initialized() = 0;
virtual bool is_system_initialized() = 0;

virtual void reboot(bool hold_in_bootloader) = 0;
virtual void reboot(bool hold_in_bootloader = false) = 0;

/**
optional function to stop clock at a given time, used by log replay
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/Util.cpp
Expand Up @@ -835,7 +835,7 @@ void Util::boot_to_dfu()
{
hal.util->persistent_data.boot_to_dfu = true;
stm32_watchdog_save((uint32_t *)&hal.util->persistent_data, (sizeof(hal.util->persistent_data)+3)/4);
hal.scheduler->reboot(false);
hal.scheduler->reboot();
}
#endif

Expand Down
Expand Up @@ -79,7 +79,7 @@ void loop(void)
}

if (user_input == 'r') {
hal.scheduler->reboot(false);
hal.scheduler->reboot();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_OSD/AP_OSD_ParamScreen.cpp
Expand Up @@ -486,7 +486,7 @@ void AP_OSD_ParamScreen::update_state_machine()
if (_selected_param == SAVE_PARAM) {
if (_transition_count >= OSD_HOLD_BUTTON_PRESS_COUNT) {
save_parameters();
hal.scheduler->reboot(false);
hal.scheduler->reboot();
} else {
save_parameters();
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_Vehicle/AP_Vehicle.cpp
Expand Up @@ -999,7 +999,7 @@ void AP_Vehicle::accel_cal_update()
if (ins.accel_cal_requires_reboot() &&
!hal.util->get_soft_armed()) {
hal.scheduler->delay(1000);
hal.scheduler->reboot(false);
hal.scheduler->reboot();
}
#endif
}
Expand Down