LandDetector: call param_notify_changes() instead of param_save_default()

param_save_default() could take something like 0.5s, and because the
LandDetector is running on the HP work queue, this would block other
tasks, like RC handling or drivers.
This commit is contained in:
Beat Küng 2017-03-14 13:27:01 +01:00 committed by Lorenz Meier
parent f6d9d77f60
commit 948635c989

View File

@ -152,7 +152,7 @@ void LandDetector::_cycle()
param_set_no_notification(_p_total_flight_time_high, &flight_time);
flight_time = _total_flight_time & 0xffffffff;
param_set_no_notification(_p_total_flight_time_low, &flight_time);
param_save_default();
param_notify_changes(); // this will notify the commander, who will save the params
}
_landDetected.timestamp = hrt_absolute_time();