Copter: restore range finder updates to 20hz

This commit is contained in:
Randy Mackay 2019-09-28 10:01:38 +09:00
parent a5d0f55bdc
commit 9d5cbbe58f
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ const AP_Scheduler::Task Copter::scheduler_tasks[] = {
SCHED_TASK(auto_disarm_check, 10, 50),
SCHED_TASK(auto_trim, 10, 75),
#if RANGEFINDER_ENABLED == ENABLED
SCHED_TASK(read_rangefinder, 50, 100),
SCHED_TASK(read_rangefinder, 20, 100),
#endif
#if PROXIMITY_ENABLED == ENABLED
SCHED_TASK_CLASS(AP_Proximity, &copter.g2.proximity, update, 100, 50),

View File

@ -82,7 +82,7 @@ void Copter::read_rangefinder(void)
// reset filter if we haven't used it within the last second
rf_state.alt_cm_filt.reset(rf_state.alt_cm);
} else {
rf_state.alt_cm_filt.apply(rf_state.alt_cm, 0.02f);
rf_state.alt_cm_filt.apply(rf_state.alt_cm, 0.05f);
}
rf_state.last_healthy_ms = now;
}