mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 05:10:34 +08:00
px4_module: use px4_atomic_t
This commit is contained in:
@@ -92,7 +92,7 @@ void LandDetector::_cycle()
|
||||
{
|
||||
perf_begin(_cycle_perf);
|
||||
|
||||
if (_object == nullptr) { // not initialized yet
|
||||
if (_object.load() == nullptr) { // not initialized yet
|
||||
// Advertise the first land detected uORB.
|
||||
_landDetected.timestamp = hrt_absolute_time();
|
||||
_landDetected.freefall = false;
|
||||
@@ -110,7 +110,7 @@ void LandDetector::_cycle()
|
||||
|
||||
_check_params(true);
|
||||
|
||||
_object = this;
|
||||
_object.store(this);
|
||||
}
|
||||
|
||||
_check_params(false);
|
||||
|
||||
Reference in New Issue
Block a user