mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 08:35:07 +03:00
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:
parent
abd96336ed
commit
8b12a161e0
3 changed files with 29 additions and 3 deletions
|
@ -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>> {
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue