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:
Eric Katzfey
2026-02-05 15:12:31 -07:00
committed by Eric Katzfey
parent dbb00d500f
commit 1dbee4100a
9 changed files with 65 additions and 1 deletions
+13
View File
@@ -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);