[Horus] Masstorage reboots now gone? Still needed to mount again the SD after USB is unplugged
This commit is contained in:
@@ -48,7 +48,7 @@ void handleUsbConnection()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(USB_MASS_STORAGE)
|
#if defined(USB_MASS_STORAGE)
|
||||||
opentxClose();
|
opentxClose(false);
|
||||||
usbPluggedIn();
|
usbPluggedIn();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-14
@@ -1951,33 +1951,31 @@ void opentxStart()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CPUARM) || defined(CPUM2560)
|
#if defined(CPUARM) || defined(CPUM2560)
|
||||||
void opentxClose()
|
void opentxClose(uint8_t shutdown)
|
||||||
{
|
{
|
||||||
TRACE("opentxClose()");
|
TRACE("opentxClose()");
|
||||||
|
|
||||||
|
if (shutdown) {
|
||||||
#if defined(CPUARM)
|
#if defined(CPUARM)
|
||||||
watchdogSetTimeout(2000/*20s*/);
|
watchdogSetTimeout(2000/*20s*/);
|
||||||
#endif
|
#endif
|
||||||
pausePulses(); // stop mixer task to disable trims processing while in shutdown
|
pausePulses(); // stop mixer task to disable trims processing while in shutdown
|
||||||
|
AUDIO_BYE();
|
||||||
AUDIO_BYE();
|
|
||||||
|
|
||||||
#if defined(FRSKY)
|
#if defined(FRSKY)
|
||||||
// TODO needed? telemetryEnd();
|
// TODO needed? telemetryEnd();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LUA)
|
#if defined(LUA)
|
||||||
luaClose();
|
luaClose();
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(HAPTIC)
|
||||||
|
hapticOff();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(SDCARD)
|
#if defined(SDCARD)
|
||||||
closeLogs();
|
closeLogs();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAPTIC)
|
|
||||||
hapticOff();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
saveTimers();
|
saveTimers();
|
||||||
|
|
||||||
#if defined(CPUARM)
|
#if defined(CPUARM)
|
||||||
@@ -2023,7 +2021,6 @@ void opentxClose()
|
|||||||
while (IS_PLAYING(ID_PLAY_BYE)) {
|
while (IS_PLAYING(ID_PLAY_BYE)) {
|
||||||
CoTickDelay(10);
|
CoTickDelay(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoTickDelay(50);
|
CoTickDelay(50);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -1423,9 +1423,9 @@ extern uint8_t requiredSpeakerVolume;
|
|||||||
extern uint8_t requestScreenshot;
|
extern uint8_t requestScreenshot;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void checkBattery();
|
void checkBattery();
|
||||||
extern void opentxClose();
|
void opentxClose(uint8_t shutdown=true);
|
||||||
extern void opentxInit();
|
void opentxInit();
|
||||||
|
|
||||||
#if defined(PCBHORUS) && !defined(SIMU)
|
#if defined(PCBHORUS) && !defined(SIMU)
|
||||||
#define LED_ERROR_BEGIN() ledRed()
|
#define LED_ERROR_BEGIN() ledRed()
|
||||||
|
|||||||
Reference in New Issue
Block a user