From 902b838b2a6dcb0d9d0fce7444520e9f1b87703a Mon Sep 17 00:00:00 2001 From: Ken Carpenter <62639971+FoundationKen@users.noreply.github.com> Date: Thu, 29 Jul 2021 14:16:10 -0700 Subject: [PATCH] PASS1-102_b (#22) * PASS1-102: Fix backwards microSD issue Found that `ErrorCode` in `SD_HandleTypeDef` was not reset after a failure. Updated `HAL_SD_Init()` to reset it before attempting initialization. * Switch back to hard-coded path for now --- ports/stm32/boards/Passport/modules/actions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/stm32/boards/Passport/modules/actions.py b/ports/stm32/boards/Passport/modules/actions.py index 99b5f86..9b1dc51 100644 --- a/ports/stm32/boards/Passport/modules/actions.py +++ b/ports/stm32/boards/Passport/modules/actions.py @@ -22,7 +22,7 @@ import common from common import settings, system, noise, dis from utils import (UXStateMachine, imported, pretty_short_delay, xfp2str, to_str, truncate_string_to_width, set_next_addr, scan_for_address, get_accounts, run_chooser, - make_account_name_num, is_valid_address, save_next_addr, needs_microsd, format_btc_address, get_backups_folder_path) + make_account_name_num, is_valid_address, save_next_addr, needs_microsd, format_btc_address) from wallets.utils import get_export_mode, get_addr_type_from_address, get_deriv_path_from_addr_type_and_acct from ux import (the_ux, ux_confirm, ux_enter_pin, ux_enter_text, ux_scan_qr_code, ux_shutdown, @@ -927,7 +927,7 @@ async def verify_microsd_backup(*A): with imported('export') as exp: fn = await file_picker('Select the backup to verify.', - suffix='.7z', max_size=exp.MAX_BACKUP_FILE_SIZE, folder_path=get_backups_folder_path()) + suffix='.7z', max_size=exp.MAX_BACKUP_FILE_SIZE, folder_path='/sd/backups') if fn: # do a limited CRC-check over encrypted file @@ -965,7 +965,7 @@ async def restore_microsd_backup(*A): # Choose a backup file -- must be in 7z format fn = await file_picker('Select the backup to restore and then enter the six-word password.', - suffix='.7z', max_size=10000, folder_path=get_backups_folder_path()) + suffix='.7z', max_size=10000, folder_path='/sd/backups') if fn: with imported('export') as exp: