mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 07:53:35 +08:00
range finder: remove potential deadlock
Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
committed by
Marco Hauswirth
parent
35da86c85a
commit
73ade6d05c
@@ -149,7 +149,7 @@ void SensorRangeFinder::updateStuckCheck()
|
|||||||
|
|
||||||
void SensorRangeFinder::updateFogCheck(const float dist_bottom, const uint64_t time_us)
|
void SensorRangeFinder::updateFogCheck(const float dist_bottom, const uint64_t time_us)
|
||||||
{
|
{
|
||||||
if (_max_fog_dist > 0.f && time_us - _time_last_valid_us < 1e6) {
|
if (_max_fog_dist > 0.f) {
|
||||||
|
|
||||||
const float median_dist = _median_dist.apply(dist_bottom);
|
const float median_dist = _median_dist.apply(dist_bottom);
|
||||||
const float factor = 2.f; // magic hardcoded factor
|
const float factor = 2.f; // magic hardcoded factor
|
||||||
|
|||||||
Reference in New Issue
Block a user