summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/rpi/agc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/agc.cpp')
-rw-r--r--src/ipa/raspberrypi/controller/rpi/agc.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp
index a4742872..c02b5ece 100644
--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp
@@ -221,6 +221,18 @@ void Agc::SetConstraintMode(std::string const &constraint_mode_name)
constraint_mode_name_ = constraint_mode_name;
}
+void Agc::SwitchMode(CameraMode const &camera_mode, Metadata *metadata)
+{
+ // On a mode switch, it's possible the exposure profile could change,
+ // so we run through the dividing up of exposure/gain again and
+ // write the results into the metadata we've been given.
+ if (status_.total_exposure_value) {
+ housekeepConfig();
+ divvyupExposure();
+ writeAndFinish(metadata, false);
+ }
+}
+
void Agc::Prepare(Metadata *image_metadata)
{
AgcStatus status;