Skip to content

Commit

Permalink
Make is so the nfc data can be cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
acegoal07 committed Feb 21, 2024
1 parent bfbf7d5 commit 49f4228
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/worker/nfc_playlist_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ void nfc_playlist_worker_set_nfc_data(NfcPlaylistWorker* nfc_playlist_worker, ch
nfc_playlist_worker->nfc_protocol = nfc_device_get_protocol(nfc_playlist_worker->nfc_device);
}

void nfc_playlist_worker_clear_nfc_data(NfcPlaylistWorker* nfc_playlist_worker) {
nfc_device_clear(nfc_playlist_worker->nfc_device);
}

NfcDeviceData* nfc_playlist_worker_get_nfc_data(NfcPlaylistWorker* nfc_playlist_worker) {
return nfc_playlist_worker->nfc_data;
}
1 change: 1 addition & 0 deletions lib/worker/nfc_playlist_worker.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ int32_t nfc_playlist_worker_task(void* context);

bool nfc_playlist_worker_is_emulating(NfcPlaylistWorker* nfc_playlist_worker);
void nfc_playlist_worker_set_nfc_data(NfcPlaylistWorker* nfc_playlist_worker, char* file_path);
void nfc_playlist_worker_clear_nfc_data(NfcPlaylistWorker* nfc_playlist_worker);
NfcDeviceData* nfc_playlist_worker_get_nfc_data(NfcPlaylistWorker* nfc_playlist_worker);
1 change: 1 addition & 0 deletions scences/emulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ int32_t nfc_playlist_emulation_task(void* context) {
time_counter_ms -= 50;
}
nfc_playlist_worker_stop(nfc_playlist->nfc_playlist_worker);
nfc_playlist_worker_clear_nfc_data(nfc_playlist->nfc_playlist_worker);
}
}
popup_reset(nfc_playlist->popup);
Expand Down

0 comments on commit 49f4228

Please sign in to comment.