avoid various "no connect" scenarios (#2432)
* init mmc and USB earlier * connect USB faster
This commit is contained in:
parent
652cab4148
commit
06e32d937a
|
@ -554,11 +554,6 @@ void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S
|
|||
initSensorChart();
|
||||
#endif /* EFI_SENSOR_CHART */
|
||||
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
startTunerStudioConnectivity();
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
initSettings();
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "mcp3208.h"
|
||||
#include "hip9011.h"
|
||||
#include "histogram.h"
|
||||
#include "mmc_card.h"
|
||||
#include "neo6m.h"
|
||||
#include "lcd_HD44780.h"
|
||||
#include "settings.h"
|
||||
|
@ -249,7 +248,7 @@ void adc_callback_fast(ADCDriver *adcp) {
|
|||
#endif /* HAL_USE_ADC */
|
||||
|
||||
static void calcFastAdcIndexes(void) {
|
||||
#if HAL_USE_ADC
|
||||
#if HAL_USE_ADC && EFI_USE_FAST_ADC
|
||||
fastMapSampleIndex = fastAdc.internalAdcIndexByHardwareIndex[engineConfiguration->map.sensor.hwChannel];
|
||||
hipSampleIndex =
|
||||
isAdcChannelValid(engineConfiguration->hipOutputChannel) ?
|
||||
|
@ -594,10 +593,6 @@ void initHardware(Logging *l) {
|
|||
initHip9011(sharedLogger);
|
||||
#endif /* EFI_HIP_9011 */
|
||||
|
||||
#if EFI_FILE_LOGGING
|
||||
initMmcCard();
|
||||
#endif /* EFI_FILE_LOGGING */
|
||||
|
||||
#if EFI_MEMS
|
||||
initAccelerometer(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
#endif
|
||||
|
|
|
@ -40,7 +40,7 @@ void usb_serial_start(void) {
|
|||
// See also https://github.com/rusefi/rusefi/issues/705
|
||||
#ifndef EFI_SKIP_USB_DISCONNECT
|
||||
usbDisconnectBus(serusbcfg.usbp);
|
||||
chThdSleepMilliseconds(1500);
|
||||
chThdSleepMilliseconds(250);
|
||||
#endif/* EFI_SKIP_USB_DISCONNECT */
|
||||
usbStart(serusbcfg.usbp, &usbcfg);
|
||||
usbConnectBus(serusbcfg.usbp);
|
||||
|
|
|
@ -124,6 +124,8 @@
|
|||
#include "custom_engine.h"
|
||||
#include "engine_math.h"
|
||||
#include "mpu_util.h"
|
||||
#include "tunerstudio.h"
|
||||
#include "mmc_card.h"
|
||||
|
||||
#if EFI_HD44780_LCD
|
||||
#include "lcd_HD44780.h"
|
||||
|
@ -213,11 +215,19 @@ void runRusEfi(void) {
|
|||
*/
|
||||
initializeConsole(&sharedLogger);
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
startTunerStudioConnectivity();
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
/**
|
||||
* Initialize hardware drivers
|
||||
*/
|
||||
initHardware(&sharedLogger);
|
||||
|
||||
#if EFI_FILE_LOGGING
|
||||
initMmcCard();
|
||||
#endif /* EFI_FILE_LOGGING */
|
||||
|
||||
initStatusLoop();
|
||||
/**
|
||||
* Now let's initialize actual engine control logic
|
||||
|
|
Loading…
Reference in New Issue