From 1ff28233bd6a64fab97c56861477e122e4c3eac6 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 7 Aug 2024 12:09:23 +1000 Subject: Recalibrate the touchwheel after unlocking Also power it down whilst we're locked. This saves about half a milliamp. --- src/tangara/input/input_touch_wheel.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/tangara/input/input_touch_wheel.cpp') diff --git a/src/tangara/input/input_touch_wheel.cpp b/src/tangara/input/input_touch_wheel.cpp index b961bb02..a5069ae4 100644 --- a/src/tangara/input/input_touch_wheel.cpp +++ b/src/tangara/input/input_touch_wheel.cpp @@ -108,6 +108,15 @@ auto TouchWheel::triggers() return {centre_, up_, right_, down_, left_}; } +auto TouchWheel::onLock() -> void { + wheel_.LowPowerMode(true); +} + +auto TouchWheel::onUnlock() -> void { + wheel_.LowPowerMode(false); + wheel_.Recalibrate(); +} + auto TouchWheel::sensitivity() -> lua::Property& { return sensitivity_; } -- cgit v1.2.3