From 2898be69f414a2735b8693c58e039097853f5ec7 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Tue, 6 Sep 2022 11:20:53 -0500 Subject: input_common: Add support for analog toggle --- src/common/input.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common/input.h') diff --git a/src/common/input.h b/src/common/input.h index 213aa2384..825b0d650 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{}; }; -- cgit v1.2.3