input_common: Add support for analog toggle
This commit is contained in:
parent
199f77b92f
commit
2898be69f4
4 changed files with 15 additions and 0 deletions
|
@ -102,6 +102,8 @@ struct AnalogProperties {
|
|||
float offset{};
|
||||
// Invert direction of the sensor data
|
||||
bool inverted{};
|
||||
// Press once to activate, press again to release
|
||||
bool toggle{};
|
||||
};
|
||||
|
||||
// Single analog sensor data
|
||||
|
@ -115,8 +117,11 @@ struct AnalogStatus {
|
|||
struct ButtonStatus {
|
||||
Common::UUID uuid{};
|
||||
bool value{};
|
||||
// Invert value of the button
|
||||
bool inverted{};
|
||||
// Press once to activate, press again to release
|
||||
bool toggle{};
|
||||
// Internal lock for the toggle status
|
||||
bool locked{};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue