File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/ipa/rpi/controller/rpi Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -485,11 +485,12 @@ bool Af::earlyTerminationByPhase(double phase)
485
485
* Interpolate/extrapolate the lens position for zero phase.
486
486
* Check that the extrapolation is well-conditioned.
487
487
*/
488
- if ((ftarget_ - oldFocus) * (phase - oldPhase) > 0.0 ) {
488
+ if ((ftarget_ - oldFocus) * (phase - oldPhase) * cfg_. speeds [speed_]. pdafGain < 0.0 ) {
489
489
double param = phase / (phase - oldPhase);
490
- if (-2.5 <= param && param <= 3.0 ) {
491
- ftarget_ += param * (oldFocus - ftarget_);
490
+ if ((-2.5 <= param || mode_ == AfModeContinuous) && param <= 3.0 ) {
492
491
LOG (RPiAf, Debug) << " ETBP: param=" << param;
492
+ param = std::max (param, -2.5 );
493
+ ftarget_ += param * (oldFocus - ftarget_);
493
494
return true ;
494
495
}
495
496
}
You can’t perform that action at this time.
0 commit comments