diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2020-01-09 14:31:00 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-03-06 18:10:32 +0200 |
commit | 8b12a161e0280c086dfc037570ab8aee4c16bdaf (patch) | |
tree | 9427ef1f136db9620b1602da3d85309ca6abd4d7 /include | |
parent | abd96336ed0f4e4a109d9742ee5f39388654ef22 (diff) |
libcamera: controls: Add support for float controls
Add support for float values in Control<> and ControlValue classes.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/controls.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 2102d571..0ad442b9 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -24,6 +24,7 @@ enum ControlType { ControlTypeBool, ControlTypeInteger32, ControlTypeInteger64, + ControlTypeFloat, }; namespace details { @@ -52,6 +53,11 @@ struct control_type<int64_t> { static constexpr ControlType value = ControlTypeInteger64; }; +template<> +struct control_type<float> { + static constexpr ControlType value = ControlTypeFloat; +}; + template<typename T, std::size_t N> struct control_type<Span<T, N>> : public control_type<std::remove_cv_t<T>> { }; |