mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
UsbCamera: Scale some properties to make them constently percentages.
The "raw" version of these properties are still available, just prefixed with "raw_".
This commit is contained in:
@@ -48,16 +48,24 @@ class CvSourceImpl : public SourceImpl {
|
||||
class PropertyData : public PropertyBase {
|
||||
public:
|
||||
PropertyData() = default;
|
||||
PropertyData(llvm::StringRef name_) : PropertyBase{name_} {}
|
||||
PropertyData(llvm::StringRef name_, CS_PropertyKind kind_, int minimum_,
|
||||
int maximum_, int step_, int defaultValue_, int value_)
|
||||
: PropertyBase{name_, kind_, minimum_, maximum_,
|
||||
step_, defaultValue_, value_} {}
|
||||
: PropertyBase{name_, kind_, step_, defaultValue_, value_} {
|
||||
hasMinimum = true;
|
||||
minimum = minimum_;
|
||||
hasMaximum = true;
|
||||
maximum = maximum_;
|
||||
}
|
||||
~PropertyData() override = default;
|
||||
|
||||
std::function<void(CS_Property property)> onChange;
|
||||
};
|
||||
|
||||
protected:
|
||||
std::unique_ptr<PropertyBase> CreateEmptyProperty(
|
||||
llvm::StringRef name) const override;
|
||||
|
||||
bool CacheProperties(CS_Status* status) const override;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user