summaryrefslogtreecommitdiff
path: root/src/tangara/input/input_touch_wheel.hpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-08-07 12:09:23 +1000
committerjacqueline <me@jacqueline.id.au>2024-08-07 12:09:23 +1000
commit1ff28233bd6a64fab97c56861477e122e4c3eac6 (patch)
treeb5265a93a0e55043f16cefedbb8f9e43e9d18ff7 /src/tangara/input/input_touch_wheel.hpp
parent649cb74f036c392264264d35f98bef1fa4a5a8aa (diff)
downloadtangara-fw-1ff28233bd6a64fab97c56861477e122e4c3eac6.tar.gz
Recalibrate the touchwheel after unlocking
Also power it down whilst we're locked. This saves about half a milliamp.
Diffstat (limited to 'src/tangara/input/input_touch_wheel.hpp')
-rw-r--r--src/tangara/input/input_touch_wheel.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tangara/input/input_touch_wheel.hpp b/src/tangara/input/input_touch_wheel.hpp
index cf86eced..d5cdbbfc 100644
--- a/src/tangara/input/input_touch_wheel.hpp
+++ b/src/tangara/input/input_touch_wheel.hpp
@@ -12,12 +12,12 @@
#include "indev/lv_indev.h"
#include "drivers/haptics.hpp"
+#include "drivers/nvs.hpp"
+#include "drivers/touchwheel.hpp"
#include "input/input_device.hpp"
#include "input/input_hook.hpp"
#include "input/input_trigger.hpp"
#include "lua/property.hpp"
-#include "drivers/nvs.hpp"
-#include "drivers/touchwheel.hpp"
namespace input {
@@ -30,6 +30,9 @@ class TouchWheel : public IInputDevice {
auto name() -> std::string override;
auto triggers() -> std::vector<std::reference_wrapper<TriggerHooks>> override;
+ auto onLock() -> void override;
+ auto onUnlock() -> void override;
+
auto sensitivity() -> lua::Property&;
private: