mirror of
https://protopirate.net/ProtoPirate/ProtoPirate.git
synced 2026-08-29 00:18:20 +00:00
add a furi_check on context, better is_emu_off default
This commit is contained in:
@@ -28,12 +28,15 @@ static void protopirate_scene_saved_info_widget_callback(
|
||||
notification_message(app->notifications, &sequence_semi_success);
|
||||
view_dispatcher_send_custom_event(
|
||||
app->view_dispatcher, ProtoPirateCustomEventSavedInfoDelete);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void protopirate_scene_saved_info_on_enter(void* context) {
|
||||
furi_check(context);
|
||||
ProtoPirateApp* app = context;
|
||||
Storage* storage = NULL;
|
||||
FlipperFormat* ff = NULL;
|
||||
@@ -104,7 +107,9 @@ void protopirate_scene_saved_info_on_enter(void* context) {
|
||||
FURI_LOG_I(TAG, "File opened, reading...");
|
||||
|
||||
// Read fields
|
||||
uint32_t temp_data;
|
||||
uint32_t temp_data = 0;
|
||||
// reset is_emu_off state before loading
|
||||
is_emu_off = false;
|
||||
|
||||
flipper_format_rewind(ff);
|
||||
if(flipper_format_read_string(ff, "Protocol", temp_str)) {
|
||||
@@ -116,8 +121,6 @@ void protopirate_scene_saved_info_on_enter(void* context) {
|
||||
is_emu_off = true;
|
||||
} else if(furi_string_cmp_str(temp_str, "Kia V6") == 0) {
|
||||
is_emu_off = true;
|
||||
} else {
|
||||
is_emu_off = false;
|
||||
}
|
||||
|
||||
flipper_format_rewind(ff);
|
||||
|
||||
Reference in New Issue
Block a user