mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 12:42:30 +04:00
Input Settings: Add Vibro Trigger option
by 956MB & WillyJL
This commit is contained in:
@@ -162,13 +162,14 @@ int32_t input_srv(void* p) {
|
||||
event.type = pin_states[i].state ? InputTypePress : InputTypeRelease;
|
||||
furi_pubsub_publish(event_pubsub, &event);
|
||||
// vibro signal if user setup vibro touch level in Settings-Input.
|
||||
if(settings->vibro_touch_level) {
|
||||
if(settings->vibro_touch_level &&
|
||||
((1 << event.type) & settings->vibro_touch_trigger_mask)) {
|
||||
//delay 1 ticks for compatibility with rgb_backlight_mod
|
||||
furi_delay_tick(1);
|
||||
furi_hal_vibro_on(true);
|
||||
furi_delay_tick(settings->vibro_touch_level);
|
||||
furi_hal_vibro_on(false);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user