Skip to content

Commit

Permalink
upd seader
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Nov 28, 2023
1 parent cbac196 commit 36d2e9c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 1 addition & 2 deletions non_catalog_apps/seader/sam_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ bool seader_parse_version(SeaderWorker* seader_worker, uint8_t* buf, size_t size
bool seader_parse_sam_response(Seader* seader, SamResponse_t* samResponse) {
SeaderWorker* seader_worker = seader->worker;
SeaderUartBridge* seader_uart = seader_worker->uart;
FURI_LOG_D(TAG, "seader_parse_sam_response");

if(samResponse->size == 0) {
if(requestPacs) {
Expand All @@ -283,7 +282,7 @@ bool seader_parse_sam_response(Seader* seader, SamResponse_t* samResponse) {
} else if(seader_parse_version(seader_worker, samResponse->buf, samResponse->size)) {
// no-op
} else if(seader_unpack_pacs(seader, samResponse->buf, samResponse->size)) {
view_dispatcher_send_custom_event(seader->view_dispatcher, SeaderCustomEventWorkerExit);
view_dispatcher_send_custom_event(seader->view_dispatcher, SeaderCustomEventPollerSuccess);
} else {
memset(display, 0, sizeof(display));
for(uint8_t i = 0; i < samResponse->size; i++) {
Expand Down
7 changes: 6 additions & 1 deletion non_catalog_apps/seader/scenes/seader_scene_read_14a.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ bool seader_scene_read_14a_on_event(void* context, SceneManagerEvent event) {
seader->credential->type = SeaderCredentialType14A;
scene_manager_next_scene(seader->scene_manager, SeaderSceneReadCardSuccess);
consumed = true;
} else if(event.event == SeaderCustomEventPollerSuccess) {
seader->credential->type = SeaderCredentialType14A;
scene_manager_next_scene(seader->scene_manager, SeaderSceneReadCardSuccess);
consumed = true;
}
} else if(event.type == SceneManagerEventTypeBack) {
scene_manager_search_and_switch_to_previous_scene(seader->scene_manager, SeaderSceneStart);
scene_manager_search_and_switch_to_previous_scene(
seader->scene_manager, SeaderSceneSamPresent);
consumed = true;
}

Expand Down
8 changes: 7 additions & 1 deletion non_catalog_apps/seader/scenes/seader_scene_read_picopass.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@ bool seader_scene_read_picopass_on_event(void* context, SceneManagerEvent event)
seader->credential->type = SeaderCredentialTypePicopass;
scene_manager_next_scene(seader->scene_manager, SeaderSceneReadCardSuccess);
consumed = true;
} else if(event.event == SeaderCustomEventPollerSuccess) {
seader->credential->type = SeaderCredentialTypePicopass;
scene_manager_next_scene(seader->scene_manager, SeaderSceneReadCardSuccess);
consumed = true;
}

} else if(event.type == SceneManagerEventTypeBack) {
scene_manager_search_and_switch_to_previous_scene(seader->scene_manager, SeaderSceneStart);
scene_manager_search_and_switch_to_previous_scene(
seader->scene_manager, SeaderSceneSamPresent);
consumed = true;
}
return consumed;
Expand Down

0 comments on commit 36d2e9c

Please sign in to comment.