From 48495ddafe2ed59611c9491470f192b790e6146d Mon Sep 17 00:00:00 2001 From: ailurux Date: Fri, 7 Feb 2025 02:44:24 +0000 Subject: Add centre button haptic feedback on touch, and setting to disable/lessen haptics (#246) This adds a way for feedback devices to respond to events from outside of LVGL's event system, being passed from input device to feedback device through a vector. This was done so that touch events and long-press triggers can now give feedback through haptics. This PR also adds haptic modes, saved in nvs similarly to input and locked input modes, to disable or change the haptic effect behaviour based on which mode is selected. Finally, this also fixes a bug in which some click events would not trigger haptics, at the expense of re-introducing the (undesired?) behaviour of clicking a button that transitions to a new screen causing a double click. Relevant issues this should close: #195, #233, and (partially?) #120 Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/246 Co-authored-by: ailurux Co-committed-by: ailurux --- lua/settings.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lua/settings.lua') diff --git a/lua/settings.lua b/lua/settings.lua index 07f1e4d2..0ae4e73d 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -451,6 +451,11 @@ settings.InputSettings = SettingsScreen:new { local controls_locked = make_scheme_control(self, controls.locked_schemes(), controls.locked_scheme) local controls_locked_desc = widgets.Description(controls_locked, "Control scheme when locked") + theme.set_subject(self.content:Label { + text = "Haptics Mode", + }, "settings_title") + make_scheme_control(self, controls.haptics_modes(), controls.haptics_mode) + controls_chooser:focus() theme.set_subject(self.content:Label { -- cgit v1.2.3