UsbCamera: Allow silencing of Connecting message (#1231)

This commit is contained in:
Peter Johnson
2018-07-28 14:57:41 -07:00
committed by GitHub
parent 0614913f1a
commit 6b37ca9f9a
7 changed files with 49 additions and 5 deletions

View File

@@ -26,6 +26,15 @@ class UsbCameraProperty : public PropertyImpl {
UsbCameraProperty() = default;
explicit UsbCameraProperty(wpi::StringRef name_) : PropertyImpl{name_} {}
// Software property constructor
UsbCameraProperty(wpi::StringRef name_, unsigned id_, CS_PropertyKind kind_,
int minimum_, int maximum_, int step_, int defaultValue_,
int value_)
: PropertyImpl(name_, kind_, minimum_, maximum_, step_, defaultValue_,
value_),
device{false},
id{id_} {}
// Normalized property constructor
UsbCameraProperty(wpi::StringRef name_, int rawIndex_,
const UsbCameraProperty& rawProp, int defaultValue_,
@@ -55,6 +64,9 @@ class UsbCameraProperty : public PropertyImpl {
wpi::StringRef newValueStr) const;
#endif
// If this is a device (rather than software) property
bool device{true};
// If this is a percentage (rather than raw) property
bool percentage{false};