mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-29 19:57:12 +08:00
commander: reboot/shutdown usability fixes
- always check with state machine before reboot/shutdown - respect BOARD_HAS_POWER_CONTROL (shutdown from command, low battery, power button) - px4_shutdown_request add optional delay and always execute from HPWORK - px4_shutdown_request split out px4_reboot_request
This commit is contained in:
@@ -104,7 +104,7 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "CYGWIN")
|
||||
WORKING_DIRECTORY ${SITL_WORKING_DIR})
|
||||
|
||||
#set_tests_properties(shutdown PROPERTIES FAIL_REGULAR_EXPRESSION "shutdown FAILED")
|
||||
set_tests_properties(shutdown PROPERTIES PASS_REGULAR_EXPRESSION "Shutting down")
|
||||
set_tests_properties(shutdown PROPERTIES PASS_REGULAR_EXPRESSION "Exiting NOW.")
|
||||
sanitizer_fail_test_on_error(shutdown)
|
||||
endif()
|
||||
|
||||
@@ -145,7 +145,7 @@ foreach(cmd_name ${test_cmds})
|
||||
WORKING_DIRECTORY ${SITL_WORKING_DIR})
|
||||
|
||||
sanitizer_fail_test_on_error(posix_${cmd_name})
|
||||
set_tests_properties(posix_${cmd_name} PROPERTIES PASS_REGULAR_EXPRESSION "Shutting down")
|
||||
set_tests_properties(posix_${cmd_name} PROPERTIES PASS_REGULAR_EXPRESSION "Exiting NOW.")
|
||||
endforeach()
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Coverage)
|
||||
|
||||
@@ -111,13 +111,6 @@ static void *entry_adapter(void *ptr)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
px4_systemreset(bool to_bootloader)
|
||||
{
|
||||
PX4_WARN("Called px4_system_reset");
|
||||
system_exit(0);
|
||||
}
|
||||
|
||||
px4_task_t px4_task_spawn_cmd(const char *name, int scheduler, int priority, int stack_size, px4_main_t entry,
|
||||
char *const argv[])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user