I did the following test first (no hack involved here):
Set the camera to M mode, aperture to 1/1.8 and speed to 1/60; moved to Av and set aperture to 2.2; changed to Tv and set speed to 1/400. Now I can jump around these modes, and the camera will recall the correct aperture and speed that I had set for each mode. I also saved these settings as three presets.
Then I made a small modification to our code, so the when a preset is loaded from the card, only the AE value is read and applied, no other parameter from the preset is used. Now I set the camera to A-DEP mode and read those presets; guess what happens? When I change the AE mode, the camera also recalls the other parameters!
This means we could do the following:
- Presets can only be read while in A-DEP mode.
- When a preset is read, we write to the card the AE mode corresponding to such preset.
- When the camera boots, we check the current AE mode: if we are in A-DEP, we load and apply the last AE mode set by a preset; the camera will then recall the other parameters.