diff --git a/firmware/controllers/algo/accel_enrichment.cpp b/firmware/controllers/algo/accel_enrichment.cpp index d36171a9ff..afca93d7ab 100644 --- a/firmware/controllers/algo/accel_enrichment.cpp +++ b/firmware/controllers/algo/accel_enrichment.cpp @@ -234,7 +234,7 @@ float LoadAccelEnrichment::getEngineLoadEnrichment(DECLARE_ENGINE_PARAMETER_SIGN float taper = 0; if (d > engineConfiguration->engineLoadAccelEnrichmentThreshold) { - int distance = cb.currentIndex - index; + distance = cb.currentIndex - index; if (distance <= 0) // checking if indexes are out of order due to circular buffer nature distance += minI(cb.getCount(), cb.getSize()); diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 15ead130d0..5b68e8029b 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -228,9 +228,11 @@ void setMap(fuel_table_t table, float value) { } } +#if 0 static void setWholeVEMap(float value DECLARE_CONFIG_PARAMETER_SUFFIX) { setMap(config->veTable, value); } +#endif void setWholeFuelMap(float value DECLARE_CONFIG_PARAMETER_SUFFIX) { setMap(config->fuelTable, value); @@ -240,6 +242,8 @@ void setWholeIgnitionIatCorr(float value DECLARE_CONFIG_PARAMETER_SUFFIX) { #if (IGN_LOAD_COUNT == FUEL_LOAD_COUNT) && (IGN_RPM_COUNT == FUEL_RPM_COUNT) // todo: make setMap a template setMap(config->ignitionIatCorrTable, value); +#else + UNUSED(value); #endif } diff --git a/firmware/controllers/math/pid_auto_tune.cpp b/firmware/controllers/math/pid_auto_tune.cpp index ac4c9142fe..416d41cbd1 100644 --- a/firmware/controllers/math/pid_auto_tune.cpp +++ b/firmware/controllers/math/pid_auto_tune.cpp @@ -426,7 +426,9 @@ bool PID_AutoTune::Runtime(Logging *logger) } avgInput /= (double)(inputCount + 1); +#if defined(AUTOTUNE_DEBUG) || EFI_UNIT_TEST bool stable = (iMax - iMin) <= 2.0 * workingNoiseBand; +#endif #if defined (AUTOTUNE_DEBUG) Serial.print(F("iMax ")); Serial.println(iMax); diff --git a/firmware/controllers/trigger/spark_logic.cpp b/firmware/controllers/trigger/spark_logic.cpp index 04b4ec84be..6ea038bf9b 100644 --- a/firmware/controllers/trigger/spark_logic.cpp +++ b/firmware/controllers/trigger/spark_logic.cpp @@ -128,13 +128,13 @@ void fireSparkAndPrepareNextSchedule(IgnitionEvent *event) { } #if !EFI_UNIT_TEST if (engineConfiguration->debugMode == DBG_DWELL_METRIC) { +#if EFI_TUNER_STUDIO uint32_t actualDwellDurationNt = getTimeNowLowerNt() - event->actualStartOfDwellNt; /** * ratio of desired dwell duration to actual dwell duration gives us some idea of how good is input trigger jitter */ float ratio = NT2US(actualDwellDurationNt) / 1000.0 / event->sparkDwell; -#if EFI_TUNER_STUDIO // todo: smarted solution for index to field mapping if (event->cylinderIndex == 0) { tsOutputChannels.debugFloatField1 = ratio; diff --git a/firmware/hw_layer/serial_over_usb/usbcfg.c b/firmware/hw_layer/serial_over_usb/usbcfg.c index 7478374357..ae34ee5092 100644 --- a/firmware/hw_layer/serial_over_usb/usbcfg.c +++ b/firmware/hw_layer/serial_over_usb/usbcfg.c @@ -1,5 +1,6 @@ /* ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + Modified for RusEFI Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -164,12 +165,12 @@ static const uint8_t vcom_string1[] = { * Device Description string. */ static const uint8_t vcom_string2[] = { - USB_DESC_BYTE(56), /* bLength. */ + USB_DESC_BYTE(58), /* bLength. */ USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType. */ - 'C', 0, 'h', 0, 'i', 0, 'b', 0, 'i', 0, 'O', 0, 'S', 0, '/', 0, - 'R', 0, 'T', 0, ' ', 0, 'V', 0, 'i', 0, 'r', 0, 't', 0, 'u', 0, - 'a', 0, 'l', 0, ' ', 0, 'C', 0, 'O', 0, 'M', 0, ' ', 0, 'P', 0, - 'o', 0, 'r', 0, 't', 0 + 'R', 0, 'u', 0, 's', 0, 'E', 0, 'F', 0, 'I', 0, ' ', 0, 'E', 0, + 'n', 0, 'g', 0, 'i', 0, 'n', 0, 'e', 0, ' ', 0, 'M', 0, 'a', 0, + 'n', 0, 'a', 0, 'g', 0, 'e', 0, 'm', 0, 'e', 0, 'n', 0, 't', 0, + ' ', 0, 'E', 0, 'C', 0, 'U', 0 }; /* diff --git a/firmware/hw_layer/serial_over_usb/usbconsole.c b/firmware/hw_layer/serial_over_usb/usbconsole.c index 89f18f5d9f..804e8934f5 100644 --- a/firmware/hw_layer/serial_over_usb/usbconsole.c +++ b/firmware/hw_layer/serial_over_usb/usbconsole.c @@ -44,7 +44,7 @@ void usb_serial_start(void) { efiSetPadMode("USB DM", EFI_USB_SERIAL_DM, PAL_MODE_ALTERNATE(EFI_USB_AF)); efiSetPadMode("USB DP", EFI_USB_SERIAL_DP, PAL_MODE_ALTERNATE(EFI_USB_AF)); /* - * Activates the serial driver 2 using the driver default configuration. + * Activates the serial driver using the driver default configuration. */ sdStart(&USB_SERIAL_DRIVER, NULL); #endif /* HAL_USE_SERIAL */