aboutsummaryrefslogtreecommitdiff
path: root/src/common/input.h
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2022-09-06 11:20:53 -0500
committerNarr the Reg <juangerman-13@hotmail.com>2022-09-06 11:21:28 -0500
commit2898be69f414a2735b8693c58e039097853f5ec7 (patch)
treedc91ebee52e562781cbe1f58cdeedb4ba468438f /src/common/input.h
parent199f77b92f6e0f47844e44dcc5ef1f4dc299824c (diff)
input_common: Add support for analog toggle
Diffstat (limited to 'src/common/input.h')
-rw-r--r--src/common/input.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/input.h b/src/common/input.h
index 213aa2384d..825b0d650d 100644
--- a/src/common/input.h
+++ b/src/common/input.h
@@ -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{};
};