mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 06:47:35 +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
@@ -51,6 +51,7 @@
|
||||
#include <sys/boardctl.h>
|
||||
#endif
|
||||
|
||||
|
||||
static uORB::DeviceMaster *g_dev = nullptr;
|
||||
|
||||
int uorb_start(void)
|
||||
@@ -113,6 +114,18 @@ int uorb_top(char **topic_filter, int num_filters)
|
||||
return OK;
|
||||
}
|
||||
|
||||
void uorb_shutdown(void)
|
||||
{
|
||||
#ifdef CONFIG_ORB_COMMUNICATOR
|
||||
uORBCommunicator::IChannel *ch = uORB::Manager::get_instance()->get_uorb_communicator();
|
||||
|
||||
if (ch) {
|
||||
ch->shutdown();
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ORB_COMMUNICATOR */
|
||||
}
|
||||
|
||||
orb_advert_t orb_advertise(const struct orb_metadata *meta, const void *data)
|
||||
{
|
||||
return uORB::Manager::get_instance()->orb_advertise(meta, data);
|
||||
|
||||
Reference in New Issue
Block a user