boards: Advanced Technology Labs (ATL) Mantis EDU support and airfarme (SYS_AUTOSTART 4061)

Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: Daniel Agar <daniel@agar.ca>
This commit is contained in:
Daniel Agar
2021-07-13 20:45:36 -04:00
parent 8f64f7ce90
commit e900f2ea54
32 changed files with 2476 additions and 20 deletions
+2 -6
View File
@@ -1128,7 +1128,7 @@ Commander::handle_command(const vehicle_command_s &cmd)
#endif // CONFIG_BOARDCTL_RESET
#if defined(CONFIG_BOARDCTL_POWEROFF)
#if defined(BOARD_HAS_POWER_CONTROL)
} else if ((param1 == 2) && shutdown_if_allowed() && (px4_shutdown_request(400_ms) == 0)) {
// 2: Shutdown autopilot
@@ -1136,7 +1136,7 @@ Commander::handle_command(const vehicle_command_s &cmd)
while (1) { px4_usleep(1); }
#endif // CONFIG_BOARDCTL_POWEROFF
#endif // BOARD_HAS_POWER_CONTROL
#if defined(CONFIG_BOARDCTL_RESET)
@@ -1770,13 +1770,9 @@ Commander::run()
if (_power_button_state_sub.copy(&button_state)) {
if (button_state.event == power_button_state_s::PWR_BUTTON_STATE_REQUEST_SHUTDOWN) {
#if defined(CONFIG_BOARDCTL_POWEROFF)
if (shutdown_if_allowed() && (px4_shutdown_request() == 0)) {
while (1) { px4_usleep(1); }
}
#endif // CONFIG_BOARDCTL_POWEROFF
}
}
}