summaryrefslogtreecommitdiff
path: root/src/tangara/input/input_touch_wheel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tangara/input/input_touch_wheel.cpp')
-rw-r--r--src/tangara/input/input_touch_wheel.cpp9
1 files changed, 9 insertions, 0 deletions
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_;
}