Focus.c needs updating with one line of code ;-)
Created originally on Bitbucket by garry23 (Garry George)
The current focus.c does not handle the near DoF correctly when focus is at infinity. The current code around line 191 is:
lens_info.dof_near = fl + (fdH-fl2)/(H+fd-2fl); // in mm relative to the sensor plane
Needs replacing with:
if (fd>=655000) { lens_info.dof_near = H/2; // in mm relative to the sensor plane } else { lens_info.dof_near = fl + (fdH-fl2)/(H+fd-2fl); // in mm relative to the sensor plane }
I'm sorry I can't take this further myself at the moment.