From 1bcb7539dfcc2dde9745a9637c0a4132de34a9d4 Mon Sep 17 00:00:00 2001 From: Nick Hollinghurst Date: Mon, 21 Nov 2022 14:47:29 +0000 Subject: ipa: raspberrypi: Remove generic "pause" mechanism from Algorithm No existing Algorithm used the base pause(), resume() functions or the paused_ flag, nor is there a need for a generic pause API. Remove these. The AGC and AWB algorithms now have methods named disableAuto(), enableAuto() which better describe their functionality. Signed-off-by: Nick Hollinghurst Reviewed-by: David Plowman Reviewed-by: Naushir Patuck Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/controller/rpi/agc.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/ipa/raspberrypi/controller/rpi/agc.cpp') diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp index bd54a639..a30e50c1 100644 --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp @@ -270,18 +270,13 @@ int Agc::read(const libcamera::YamlObject ¶ms) return 0; } -bool Agc::isPaused() const -{ - return false; -} - -void Agc::pause() +void Agc::disableAuto() { fixedShutter_ = status_.shutterTime; fixedAnalogueGain_ = status_.analogueGain; } -void Agc::resume() +void Agc::enableAuto() { fixedShutter_ = 0s; fixedAnalogueGain_ = 0; @@ -317,14 +312,14 @@ void Agc::setMaxShutter(Duration maxShutter) void Agc::setFixedShutter(Duration fixedShutter) { fixedShutter_ = fixedShutter; - /* Set this in case someone calls Pause() straight after. */ + /* Set this in case someone calls disableAuto() straight after. */ status_.shutterTime = clipShutter(fixedShutter_); } void Agc::setFixedAnalogueGain(double fixedAnalogueGain) { fixedAnalogueGain_ = fixedAnalogueGain; - /* Set this in case someone calls Pause() straight after. */ + /* Set this in case someone calls disableAuto() straight after. */ status_.analogueGain = fixedAnalogueGain; } -- cgit v1.2.1