mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
36 lines
1.1 KiB
C
36 lines
1.1 KiB
C
#include "flipchess_haptic.h"
|
|
#include "../flipchess.h"
|
|
|
|
void flipchess_play_happy_bump(void* context) {
|
|
FlipChess* app = context;
|
|
if(app->haptic != 1) {
|
|
return;
|
|
}
|
|
notification_message(app->notification, &sequence_set_vibro_on);
|
|
furi_thread_flags_wait(0, FuriFlagWaitAny, 20);
|
|
notification_message(app->notification, &sequence_reset_vibro);
|
|
}
|
|
|
|
void flipchess_play_bad_bump(void* context) {
|
|
FlipChess* app = context;
|
|
if(app->haptic != 1) {
|
|
return;
|
|
}
|
|
notification_message(app->notification, &sequence_set_vibro_on);
|
|
furi_thread_flags_wait(0, FuriFlagWaitAny, 100);
|
|
notification_message(app->notification, &sequence_reset_vibro);
|
|
}
|
|
|
|
void flipchess_play_long_bump(void* context) {
|
|
FlipChess* app = context;
|
|
if(app->haptic != 1) {
|
|
return;
|
|
}
|
|
for(int i = 0; i < 4; i++) {
|
|
notification_message(app->notification, &sequence_set_vibro_on);
|
|
furi_thread_flags_wait(0, FuriFlagWaitAny, 50);
|
|
notification_message(app->notification, &sequence_reset_vibro);
|
|
furi_thread_flags_wait(0, FuriFlagWaitAny, 100);
|
|
}
|
|
}
|