ipa: raspberrypi: lux: Supply missing method and remove atomic variable

Supply the missing SetCurrentAperture() method (even though no one is
calling it). If we did call it, it would be called synchronously so
the atomic variable is not required.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
David Plowman 2021-02-04 09:34:56 +00:00 committed by Laurent Pinchart
parent ef3ce74b26
commit 7fab304719
2 changed files with 6 additions and 2 deletions

View file

@ -46,6 +46,11 @@ void Lux::Read(boost::property_tree::ptree const &params)
current_aperture_ = reference_aperture_; current_aperture_ = reference_aperture_;
} }
void Lux::SetCurrentAperture(double aperture)
{
current_aperture_ = aperture;
}
void Lux::Prepare(Metadata *image_metadata) void Lux::Prepare(Metadata *image_metadata)
{ {
std::unique_lock<std::mutex> lock(mutex_); std::unique_lock<std::mutex> lock(mutex_);

View file

@ -6,7 +6,6 @@
*/ */
#pragma once #pragma once
#include <atomic>
#include <mutex> #include <mutex>
#include "../lux_status.h" #include "../lux_status.h"
@ -34,7 +33,7 @@ private:
double reference_aperture_; // units of 1/f double reference_aperture_; // units of 1/f
double reference_Y_; // out of 65536 double reference_Y_; // out of 65536
double reference_lux_; double reference_lux_;
std::atomic<double> current_aperture_; double current_aperture_;
LuxStatus status_; LuxStatus status_;
std::mutex mutex_; std::mutex mutex_;
}; };