input_common: Add support for analog toggle

This commit is contained in:
Narr the Reg 2022-09-06 11:20:53 -05:00
parent 199f77b92f
commit 2898be69f4
4 changed files with 15 additions and 0 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{};
};