px4_module: use px4_atomic_t

This commit is contained in:
Beat Küng
2019-01-29 07:19:22 +01:00
committed by Daniel Agar
parent b6e2ac74de
commit 481bfc6308
9 changed files with 31 additions and 33 deletions
+2 -2
View File
@@ -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);