Skip to content

Commit

Permalink
Picopass: Add haptics to loclass (#53)
Browse files Browse the repository at this point in the history
Co-authored-by: あく <[email protected]>
  • Loading branch information
bettse and skotopes authored Sep 27, 2023
1 parent 7e7df47 commit 6d61acd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions picopass/scenes/picopass_scene_loclass.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,18 @@ bool picopass_scene_loclass_on_event(void* context, SceneManagerEvent event) {
uint32_t loclass_macs_collected =
scene_manager_get_scene_state(picopass->scene_manager, PicopassSceneLoclass);
loclass_macs_collected++;
notification_message(picopass->notifications, &sequence_single_vibro);
scene_manager_set_scene_state(
picopass->scene_manager, PicopassSceneLoclass, loclass_macs_collected);
loclass_set_num_macs(picopass->loclass, loclass_macs_collected);
if(loclass_macs_collected >= LOCLASS_MACS_TO_COLLECT) {
notification_message(picopass->notifications, &sequence_double_vibro);
scene_manager_previous_scene(picopass->scene_manager);
}
consumed = true;
} else if(event.event == PicopassWorkerEventLoclassGotStandardKey) {
loclass_set_header(picopass->loclass, "Loclass (Got Std Key)");
notification_message(picopass->notifications, &sequence_error);
consumed = true;
} else if(event.event == PicopassWorkerEventLoclassFileError) {
scene_manager_set_scene_state(picopass->scene_manager, PicopassSceneLoclass, 255);
Expand Down

0 comments on commit 6d61acd

Please sign in to comment.