diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index 4598c5f858..c75a27c76a 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -103,8 +103,8 @@ static const float hardCodedetbHitachiBiasValues[8] = {-18.0, -17.0, -15.0, 0.0, /* Generated by TS2C on Thu Aug 20 21:10:02 EDT 2020*/ void setHitachiEtbBiasBins() { - copyArray(engineConfiguration->etbBiasBins, hardCodedetbHitachiBiasBins); - copyArray(engineConfiguration->etbBiasValues, hardCodedetbHitachiBiasValues); + copyArray(config->etbBiasBins, hardCodedetbHitachiBiasBins); + copyArray(config->etbBiasValues, hardCodedetbHitachiBiasValues); } @@ -363,7 +363,7 @@ expected EtbController::getOpenLoop(percent_t target) { // Don't apply open loop for wastegate/idle valve, only real ETB if (m_function != ETB_Wastegate && m_function != ETB_IdleValve) { - ff = interpolate2d(target, engineConfiguration->etbBiasBins, engineConfiguration->etbBiasValues); + ff = interpolate2d(target, config->etbBiasBins, config->etbBiasValues); } engine->engineState.etbFeedForward = ff; @@ -836,8 +836,8 @@ void setBoschVAGETB() { } void setBoschVNH2SP30Curve() { - copyArray(engineConfiguration->etbBiasBins, boschBiasBins); - copyArray(engineConfiguration->etbBiasValues, boschBiasValues); + copyArray(config->etbBiasBins, boschBiasBins); + copyArray(config->etbBiasValues, boschBiasValues); } void setDefaultEtbParameters() { @@ -908,8 +908,8 @@ static const float defaultBiasValues[] = { }; void setDefaultEtbBiasCurve() { - copyArray(engineConfiguration->etbBiasBins, defaultBiasBins); - copyArray(engineConfiguration->etbBiasValues, defaultBiasValues); + copyArray(config->etbBiasBins, defaultBiasBins); + copyArray(config->etbBiasValues, defaultBiasValues); } void unregisterEtbPins() { diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index dcaac5876e..294a82872a 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1373,9 +1373,7 @@ float tChargeAirDecrLimit;Maximum allowed rate of decrease allowed for the estim custom tChargeMode_e 1 bits, U08, @OFFSET@, [0:1], @@tChargeMode_e_enum@@ tChargeMode_e tChargeMode; - float[ETB_BIAS_CURVE_LENGTH] etbBiasBins;target TPS value, 0 to 100%\nTODO: use int8 data date once we template interpolation method;"target TPS position", 1, 0, 0, 100, 0 - float[ETB_BIAS_CURVE_LENGTH] etbBiasValues;PWM bias, 0 to 100%;"ETB duty cycle bias", 1, 0, -100, 100, 2 - + float hip9011Gain;;"", 1, 0, 0, 100, 2 int16_t etb_iTermMin;iTerm min value;"", 1, 0, -30000, 30000, 0 int16_t etb_iTermMax;iTerm max value;"", 1, 0, -30000, 30000, 0 @@ -1524,6 +1522,9 @@ end_struct ! note that this magic field name is used by LiveDataParserPanel engine_configuration_s engineConfiguration; + float[ETB_BIAS_CURVE_LENGTH] etbBiasBins;target TPS value, 0 to 100%\nTODO: use int8 data date once we template interpolation method;"target TPS position", 1, 0, 0, 100, 0 + float[ETB_BIAS_CURVE_LENGTH] etbBiasValues;PWM bias, 0 to 100%;"ETB duty cycle bias", 1, 0, -100, 100, 2 + uint8_t[IAC_PID_MULT_SIZE x IAC_PID_MULT_SIZE] iacPidMultTable;;"%", 1, 0, 0, 999, 2 uint8_t[IAC_PID_MULT_SIZE] iacPidMultLoadBins;;"Load", 1, 0, 0, 500, 2 uint8_t[IAC_PID_MULT_SIZE] autoscale iacPidMultRpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0, 12000, 0