Skip to content

Commit

Permalink
ipa: rpi: Fix incorrect cast for ExposureTime ControlInfo
Browse files Browse the repository at this point in the history
controls::ExposureTime is of type ControlTypeInteger32, but the
default ControlInfoMap casts a value to int64_t causing incorrect
initialisation of the associated ControlInfo.

Fix this by casting correctly to int32_t.

Fixes: 8cebd77 ("ipa: rpi: Apply default ControlInfo values for sensor controls (2)")
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
  • Loading branch information
naushir committed Feb 13, 2025
1 parent 8cebd77 commit 2915667
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ipa/rpi/common/ipa_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ constexpr Duration controllerMinFrameDuration = 1.0s / 30.0;
const ControlInfoMap::Map ipaControls{
{ &controls::AeEnable, ControlInfo(false, true) },
{ &controls::ExposureTime,
ControlInfo(1, 66666, static_cast<int64_t>(defaultExposureTime.get<std::micro>())) },
ControlInfo(1, 66666, static_cast<int32_t>(defaultExposureTime.get<std::micro>())) },
{ &controls::AnalogueGain, ControlInfo(1.0f, 16.0f, 1.0f) },
{ &controls::AeMeteringMode, ControlInfo(controls::AeMeteringModeValues) },
{ &controls::AeConstraintMode, ControlInfo(controls::AeConstraintModeValues) },
Expand Down

0 comments on commit 2915667

Please sign in to comment.