Merge pull request #8864 from german77/toggle_analog

input_common: Add support for analog toggle
This commit is contained in:
bunnei
2022-09-09 20:54:01 -07:00
committed by GitHub
4 changed files with 23 additions and 7 deletions

View File

@ -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{};
};