reticulatedpines / magiclantern_simplified

A Git based version of Magic Lantern, for those unwilling or unable to work using Mercurial. The vast majority of branches have been removed, with those thought to be important brought in individually and merged.
GNU General Public License v2.0
147 stars 51 forks source link

RP: implement experimental feature: close shutter on shutdown #44

Closed coon42 closed 2 years ago

coon42 commented 2 years ago

Cameras like R have a setting in original firmware which allows to close the shutter when the camera is turned off, so the sensor is protected against dust when switching lenses. However, models like M50 or RP do not have this feature so FEATURE_CLOSE_SHUTTER_ON_SHUTDOWN is meant to be used by these models.

This PR adds a sub menu to Debug menu which has some experimental features for RP which might get added to full ML later. Also the first feature FEATURE_CLOSE_SHUTTER_ON_SHUTDOWN is added, which can be simply turned on and off. The shutter is closed by calling the factory function FA_MechaShutterClose in PROP_SHUTDOWN_REASON handler. The setting from the menu is saved to SD card as experimental.close_shutter_on_shutdown to magic.cfg when toggled.

Feature successfully tested with RP.160. Shutter only needs to be closed. Original firmware will open shutter on boot automatically.