mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 01:03:33 +08:00
uORB: Added a new uorb_shutdown function that is called during normal shutdown procedures. It will only
call into a new UORB COMMUNICATOR ICHANNEL shutdown interface if it has been configured, otherwise it does nothing. This allows ICHANNEL implementations to pass on a shutdown indication to a remote processor. Implemented the shutdown interface in the muorb module for VOXL flight controllers.
This commit is contained in:
committed by
Eric Katzfey
parent
dbb00d500f
commit
1dbee4100a
@@ -49,6 +49,7 @@
|
||||
|
||||
#include <px4_platform_common/external_reset_lockout.h>
|
||||
#include <px4_platform_common/log.h>
|
||||
#include <uORB/uORB.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
@@ -173,6 +174,8 @@ static void shutdown_worker(void *arg)
|
||||
const bool delay_elapsed = (now > shutdown_time_us);
|
||||
|
||||
if (delay_elapsed && ((done && shutdown_lock_counter == 0) || (now > (shutdown_time_us + shutdown_timeout_us)))) {
|
||||
uorb_shutdown();
|
||||
|
||||
if (shutdown_args & SHUTDOWN_ARG_REBOOT) {
|
||||
#if defined(CONFIG_BOARDCTL_RESET)
|
||||
PX4_INFO_RAW("Reboot NOW.");
|
||||
|
||||
Reference in New Issue
Block a user