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:
Daniel Agar
2020-05-06 13:53:54 -04:00
parent 45ebbb895a
commit 746a8f5cf9
96 changed files with 332 additions and 528 deletions
@@ -149,10 +149,6 @@ typedef int (*px4_main_t)(int argc, char *argv[]);
__BEGIN_DECLS
/** Reboots the board (without waiting for clean shutdown). Modules should use px4_shutdown_request() in most cases.
*/
__EXPORT void px4_systemreset(bool to_bootloader) noreturn_function;
/** Starts a task and performs any specific accounting, scheduler setup, etc. */
__EXPORT px4_task_t px4_task_spawn_cmd(const char *name,
int scheduler,