File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -819,19 +819,17 @@ void NavEKF3::UpdateFilter(void)
819
819
820
820
imuSampleTime_us = AP::dal ().micros64 ();
821
821
822
- bool statePredictEnabled[num_cores];
823
822
for (uint8_t i=0 ; i<num_cores; i++) {
824
823
// if we have not overrun by more than 3 IMU frames, and we
825
824
// have already used more than 1/3 of the CPU budget for this
826
825
// loop then suppress the prediction step. This allows
827
826
// multiple EKF instances to cooperate on scheduling
827
+ bool allow_state_prediction = true ;
828
828
if (core[i].getFramesSincePredict () < (_framesPerPrediction+3 ) &&
829
829
AP::dal ().ekf_low_time_remaining (AP_DAL::EKFType::EKF3, i)) {
830
- statePredictEnabled[i] = false ;
831
- } else {
832
- statePredictEnabled[i] = true ;
830
+ allow_state_prediction = false ;
833
831
}
834
- core[i].UpdateFilter (statePredictEnabled[i] );
832
+ core[i].UpdateFilter (allow_state_prediction );
835
833
}
836
834
837
835
// If the current core selected has a bad error score or is unhealthy, switch to a healthy core with the lowest fault score
You can’t perform that action at this time.
0 commit comments