From 2f3bd4b9238ebe9e286e130390255fe9c2963031 Mon Sep 17 00:00:00 2001 From: rusefi Date: Fri, 3 Jun 2022 01:05:48 -0400 Subject: [PATCH] new autoscale constraint #4111 --- firmware/controllers/tc_4l6x.cpp | 4 ++-- firmware/integration/rusefi_config.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/firmware/controllers/tc_4l6x.cpp b/firmware/controllers/tc_4l6x.cpp index 9be6d27432..cbcedcca73 100644 --- a/firmware/controllers/tc_4l6x.cpp +++ b/firmware/controllers/tc_4l6x.cpp @@ -137,8 +137,8 @@ void Gm4l6xTransmissionController::setPcState(gear_e gear) { pcts = &config->tcu_pcVals4; break; } - int pct = interpolate2d(engine->engineState.sd.airMassInOneCylinder, config->tcu_pcAirmassBins, *pcts); - pcPwm.setSimplePwmDutyCycle(pct*0.01); + float duty = 0.01f * interpolate2d(engine->engineState.sd.airMassInOneCylinder, config->tcu_pcAirmassBins, *pcts); + pcPwm.setSimplePwmDutyCycle(duty); } void Gm4l6xTransmissionController::set32State(gear_e gear) { diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 4b1e7aac09..4f086f25d4 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1646,7 +1646,7 @@ uint16_t[FUEL_RPM_COUNT] veRpmBins;;"RPM", 1, 0, 0, 18000, 0 #if LAMBDA uint8_t[FUEL_RPM_COUNT x FUEL_LOAD_COUNT] autoscale lambdaTable;;"lambda", {1/@@PACK_MULT_LAMBDA_CFG@@}, 0, 0.6, 1.5, 2 #else -uint8_t[FUEL_RPM_COUNT x FUEL_LOAD_COUNT] lambdaTable;;"afr", {1/@@PACK_MULT_AFR_CFG@@}, 0, 0, 25, 1 +uint8_t[FUEL_RPM_COUNT x FUEL_LOAD_COUNT] autoscale lambdaTable;;"afr", {1/@@PACK_MULT_AFR_CFG@@}, 0, 0, 25, 1 #endif ! union @@ -1697,7 +1697,7 @@ uint16_t[CRANKING_CURVE_SIZE] autoscale crankingFuelCoefE100;;"ratio", 0.01, 0, #define TCU_MAGIC_SIZE 8 -uint8_t[TCU_MAGIC_SIZE] tcu_pcAirmassBins;;"Airmass", 1, 0, 0, 255, 2 +uint8_t[TCU_MAGIC_SIZE] autoscale tcu_pcAirmassBins;;"Airmass", 0.02, 0, 0, 255, 2 uint8_t[TCU_MAGIC_SIZE] tcu_pcValsR;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] tcu_pcValsN;;"%", 1, 0, 0, 255, 0 uint8_t[TCU_MAGIC_SIZE] tcu_pcVals1;;"%", 1, 0, 0, 255, 0