Copter: increase read_rangefinder to 50hz
This commit is contained in:
parent
3ef94a69ad
commit
b54cf410ef
@ -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),
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user