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>
This commit is contained in:
committed by
Laurent Pinchart
parent
abd96336ed
commit
8b12a161e0
@@ -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>> {
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user