summaryrefslogtreecommitdiff
path: root/include/libcamera/internal/camera_sensor_properties.h
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-12-06 14:49:16 +0900
committerJacopo Mondi <jacopo@jmondi.org>2021-12-06 17:41:45 +0100
commit5148c0aa7e5957628c4fe6b8b9bca9e923e608ce (patch)
treedfe51faa58ce4d5efe7315bd7881aea683825164 /include/libcamera/internal/camera_sensor_properties.h
parentb53f6efb99e289375b88f50d3fb5ef216c97da02 (diff)
libcamera: camera_sensor: Reference test pattern modes by enum type
The CameraSensor stores TestPatternModes as an int32_t. This prevents the compiler from verifying the usage against the defined enum types. Fix references to the TestPatternMode to store the value as the TestPatternModeEnum type which is defined by the control generator. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include/libcamera/internal/camera_sensor_properties.h')
-rw-r--r--include/libcamera/internal/camera_sensor_properties.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h
index af381a12..1ee3cb99 100644
--- a/include/libcamera/internal/camera_sensor_properties.h
+++ b/include/libcamera/internal/camera_sensor_properties.h
@@ -10,6 +10,7 @@
#include <map>
#include <string>
+#include <libcamera/control_ids.h>
#include <libcamera/geometry.h>
namespace libcamera {
@@ -18,7 +19,7 @@ struct CameraSensorProperties {
static const CameraSensorProperties *get(const std::string &sensor);
Size unitCellSize;
- std::map<int32_t, int32_t> testPatternModes;
+ std::map<controls::draft::TestPatternModeEnum, int32_t> testPatternModes;
};
} /* namespace libcamera */