Fix multi firmware not working first time if internal module is on (#7302)

This commit is contained in:
3djc
2020-01-21 11:13:58 +01:00
committed by GitHub
parent d44ec9b218
commit 36d098d22d
+3 -3
View File
@@ -520,7 +520,7 @@ bool multiFlashFirmware(uint8_t moduleIdx, const char * filename)
pausePulses();
#if defined(INTERNAL_MODULE_MULTI)
#if defined(HARDWARE_INTERNAL_MODULE)
uint8_t intPwr = IS_INTERNAL_MODULE_ON();
INTERNAL_MODULE_OFF();
#endif
@@ -534,7 +534,7 @@ bool multiFlashFirmware(uint8_t moduleIdx, const char * filename)
/* wait 2s off */
watchdogSuspend(500 /*5s*/);
RTOS_WAIT_MS(2000);
RTOS_WAIT_MS(3000);
const char * result = driver->flashFirmware(&file, getBasename(filename));
f_close(&file);
@@ -563,7 +563,7 @@ bool multiFlashFirmware(uint8_t moduleIdx, const char * filename)
// reset telemetry protocol
telemetryInit(255);
#if defined(INTERNAL_MODULE_MULTI)
#if defined(HARDWARE_INTERNAL_MODULE)
if (intPwr) {
INTERNAL_MODULE_ON();
setupPulsesInternalModule();