Merge pull request #8864 from german77/toggle_analog
input_common: Add support for analog toggle
This commit is contained in:
commit
a967c41fa0
4 changed files with 23 additions and 7 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