mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-04 05:05:19 +08:00
init shmem early to avoid random crash in fastrpc (#6407)
* init shmem early to avoid possible crash * fix_code_style * Keep the initialziation to NULL, remove the duplicate memory allocation
This commit is contained in:
@@ -5,6 +5,7 @@ param set MAV_BROADCAST 1
|
|||||||
param set SDLOG_PRIO_BOOST 3
|
param set SDLOG_PRIO_BOOST 3
|
||||||
dataman start
|
dataman start
|
||||||
navigator start
|
navigator start
|
||||||
|
sleep 2
|
||||||
mavlink start -u 14556 -r 1000000
|
mavlink start -u 14556 -r 1000000
|
||||||
sleep 1
|
sleep 1
|
||||||
mavlink stream -u 14556 -s HIGHRES_IMU -r 50
|
mavlink stream -u 14556 -s HIGHRES_IMU -r 50
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ __END_DECLS
|
|||||||
int px4muorb_orb_initialize()
|
int px4muorb_orb_initialize()
|
||||||
{
|
{
|
||||||
HAP_power_request(100, 100, 1000);
|
HAP_power_request(100, 100, 1000);
|
||||||
|
shmem_info_p = NULL;
|
||||||
|
|
||||||
// The uORB Manager needs to be initialized first up, otherwise the instance is nullptr.
|
// The uORB Manager needs to be initialized first up, otherwise the instance is nullptr.
|
||||||
uORB::Manager::initialize();
|
uORB::Manager::initialize();
|
||||||
|
|||||||
@@ -449,7 +449,6 @@ uORB::DeviceNode::publish(const orb_metadata *meta, orb_advert_t handle, const v
|
|||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(__PX4_QURT_EXCELSIOR) && !defined(__PX4_POSIX_EXCELSIOR)
|
|
||||||
/*
|
/*
|
||||||
* if the write is successful, send the data over the Multi-ORB link
|
* if the write is successful, send the data over the Multi-ORB link
|
||||||
*/
|
*/
|
||||||
@@ -463,7 +462,6 @@ uORB::DeviceNode::publish(const orb_metadata *meta, orb_advert_t handle, const v
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
return PX4_OK;
|
return PX4_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user