Bsongis/sd manager pause resume (#7172)

* Push the event EVT_ENTRY to force the current screen refresh when USB unplugged

* Test fix

* Compilation fix
This commit is contained in:
Bertrand Songis
2019-12-09 15:24:05 +01:00
committed by GitHub
parent 1e020c5f2f
commit 4098b84fe5
2 changed files with 3 additions and 0 deletions
@@ -224,6 +224,8 @@ bool menuRadioSdManager(event_t _event)
// no break;
case EVT_ENTRY_UP:
memset(&reusableBuffer.sdManager, 0, sizeof(reusableBuffer.sdManager));
menuVerticalPosition = 0;
REFRESH_FILES();
break;
+1
View File
@@ -69,6 +69,7 @@ void handleUsbConnection()
usbStop();
if (getSelectedUsbMode() == USB_MASS_STORAGE_MODE) {
opentxResume();
putEvent(EVT_ENTRY);
}
setSelectedUsbMode(USB_UNSELECTED_MODE);
}