Copter: increase read_rangefinder to 50hz

This commit is contained in:
Randy Mackay 2019-08-22 20:11:24 +09:00
parent 3ef94a69ad
commit b54cf410ef
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, 20, 100),
SCHED_TASK(read_rangefinder, 50, 100),
#endif
#if PROXIMITY_ENABLED == ENABLED
SCHED_TASK_CLASS(AP_Proximity, &copter.g2.proximity, update, 100, 50),

View File

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