1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 09:45:33 +03:00

Fix broken boxes initialization in #2751

mspFcInit() can't be called until the HW has been initialized, since
it performs some checks to decide which boxes to enable. We can
still call mspSerialInit() early in the boot process, so trace-over-MSP
works anyway.
This commit is contained in:
Alberto García Hierro 2018-02-12 13:25:12 +00:00
parent 8539178eee
commit 7f054c6f78

View file

@ -261,8 +261,9 @@ void init(void)
serialInit(feature(FEATURE_SOFTSERIAL), SERIAL_PORT_NONE);
#endif
// Initialize MSP here so the DEBUG_TRACE can share a port with MSP
mspFcInit();
// Initialize MSP serial ports here so DEBUG_TRACE can share a port with MSP.
// XXX: Don't call mspFcInit() yet, since it initializes the boxes and needs
// to run after the sensors have been detected.
mspSerialInit();
#if defined(USE_DEBUG_TRACE)
@ -560,6 +561,10 @@ void init(void)
imuInit();
// Sensors have now been detected, mspFcInit() can now be called
// to set the boxes up
mspFcInit();
#ifdef USE_CLI
cliInit(serialConfig());
#endif