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 <ailuruxx@gmail.com> Co-committed-by: ailurux <ailuruxx@gmail.com>custom
parent
275b931e0b
commit
48495ddafe
@ -0,0 +1,18 @@ |
||||
|
||||
/*
|
||||
* Copyright 2025 ailurux <ailuruxx@gmail.com> |
||||
* |
||||
* SPDX-License-Identifier: GPL-3.0-only |
||||
*/ |
||||
|
||||
#pragma once |
||||
|
||||
namespace input { |
||||
|
||||
enum class InputEvent { |
||||
kNone = 0, |
||||
kOnPress = 1, |
||||
kOnLongPress = 2, |
||||
}; |
||||
|
||||
} // namespace input
|
Loading…
Reference in new issue