[FL-1371] New LF-RFID app. Second encounter. (#547)

* File worker: file operations helper.
* Notification app: removed yield
* File worker: write operations, calls to system file widgets
* App ibutton: use file worker
* Lfrfid: generic key loading, add path helper and hex conversion to lib
* FileWorker: plain C verison
* FileWorker: add to lib.mk
* FileWorker: add to C sources, instead of CPP
* Lfrfid: save scene
* App lfrfid: add key scene, saved key menu
* App lfrfid: saved key info scene
* App lfrfid: delete key scene
This commit is contained in:
SG
2021-06-30 22:02:46 +10:00
committed by GitHub
parent e8211226f3
commit 7a13391b2b
44 changed files with 1637 additions and 446 deletions

View File

@@ -4,7 +4,7 @@ void LfRfidAppSceneWrite::on_enter(LfRfidApp* app, bool need_restore) {
card_not_supported = false;
string_init(data_string);
uint8_t* data = app->worker.key.get_data();
const uint8_t* data = app->worker.key.get_data();
for(uint8_t i = 0; i < app->worker.key.get_type_data_count(); i++) {
string_cat_printf(data_string, "%02X", data[i]);
@@ -12,8 +12,12 @@ void LfRfidAppSceneWrite::on_enter(LfRfidApp* app, bool need_restore) {
auto popup = app->view_controller.get<PopupVM>();
popup->set_header("Writing", 90, 34, AlignCenter, AlignTop);
popup->set_text(string_get_cstr(data_string), 90, 48, AlignCenter, AlignTop);
popup->set_header("LF writing", 89, 30, AlignCenter, AlignTop);
if(strlen(app->worker.key.get_name())) {
popup->set_text(app->worker.key.get_name(), 89, 43, AlignCenter, AlignTop);
} else {
popup->set_text(string_get_cstr(data_string), 89, 43, AlignCenter, AlignTop);
}
popup->set_icon(0, 4, I_RFIDDolphinSend_98x60);
app->view_controller.switch_to<PopupVM>();