Patent attributes
Methods and apparatus are disclosed for selecting a lens control mode for a camera in external magnetic fields or other types of non-magnetic interference. In embodiments, when the camera is activated, a test of a position sensor for the camera lens is performed by moving the camera lens through a range of positions and collecting values from the sensor. In embodiments, the sensor readings are analyzed to determine conditions such as (a) whether the sensor is saturated by an external magnetic field or non-magnetic interference, (b) whether the sensor's readings are within an error margin, and (c) whether a computed position offset for the sensor is valid. Based on the analysis, the camera is placed into a first control mode where movement of the lens is controlled using the position sensor, or a second control mode where lens movement is controlled without the position sensor.