1
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:
MX
2025-07-30 04:28:22 +03:00
parent 6a2f062234
commit fb41c6c20c
4 changed files with 66 additions and 7 deletions

View File

@@ -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);
};
}
}
}