ipa: raspberrypi Store the target string in the controller
The target string may be used by algorithms to determine the running hardware target. Store the target string provided by the camera tuning files in the controller state. Add a getTarget() member function to retrieve this string. Validate the correct hardware target ("bcm2835") during the IPA initialisation phase. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
f7bf0be653
commit
cf6df17958
4 changed files with 22 additions and 0 deletions
|
@ -266,6 +266,14 @@ int IPARPi::init(const IPASettings &settings, bool lensPresent, IPAInitResult *r
|
|||
return ret;
|
||||
}
|
||||
|
||||
const std::string &target = controller_.getTarget();
|
||||
if (target != "bcm2835") {
|
||||
LOG(IPARPI, Error)
|
||||
<< "Tuning data file target returned \"" << target << "\""
|
||||
<< ", expected \"bcm2835\"";
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
lensPresent_ = lensPresent;
|
||||
|
||||
controller_.initialise();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue