From 1b59375425455b3ea8692bac4ae53a21d2f8cee3 Mon Sep 17 00:00:00 2001 From: David Holdeman Date: Sat, 12 Dec 2020 14:41:27 -0600 Subject: [PATCH] Fix table (#2062) * try * try * swap labels * switch axes in code --- firmware/controllers/simple_tcu.cpp | 2 +- firmware/integration/rusefi_config.txt | 2 +- firmware/tunerstudio/rusefi.input | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/controllers/simple_tcu.cpp b/firmware/controllers/simple_tcu.cpp index 10abce4854..26facb017d 100644 --- a/firmware/controllers/simple_tcu.cpp +++ b/firmware/controllers/simple_tcu.cpp @@ -15,7 +15,7 @@ void SimpleTransmissionController::init() { void SimpleTransmissionController::update(gear_e gear) { for (size_t i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) { #ifndef EFI_UNIT_TEST - tcuSolenoids[i].setValue(config->tcuSolenoidTable[static_cast(gear) + 1][i]); + tcuSolenoids[i].setValue(config->tcuSolenoidTable[i][static_cast(gear) + 1]); #endif } setCurrentGear(gear); diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index f3a8a6c2b4..4d95581b45 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -209,7 +209,7 @@ custom ve_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFS custom lambda_table_t @@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, U08, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"deg", {1/@@PACK_MULT_LAMBDA_CFG@@}, 0, 0.6, 1.5, 2 custom afr_table_t @@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, U08, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"deg", {1/@@PACK_MULT_AFR_CFG@@}, 0, 0, 25.0, 1 -custom tcubinary_table_t @@TCU_GEAR_COUNT@@x@@TCU_SOLENOID_COUNT@@ array, U08, @OFFSET@, [@@TCU_GEAR_COUNT@@x@@TCU_SOLENOID_COUNT@@],"onoff", 1, 0, 0, 1, 0 +custom tcubinary_table_t @@TCU_SOLENOID_COUNT@@x@@TCU_GEAR_COUNT@@ array, U08, @OFFSET@, [@@TCU_SOLENOID_COUNT@@x@@TCU_GEAR_COUNT@@],"onoff", 1, 0, 0, 1, 0 custom fsio_table_8x8_u8t @@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, U08, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 255.0, 0 custom fsio_table_8x8_f32t 4*@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@ array, F32, @OFFSET@, [@@FSIO_TABLE_8@@x@@FSIO_TABLE_8@@],"value", 1, 0, 0.0, 30000.0, 2 diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 1861aabc1a..101a9735b7 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -920,8 +920,8 @@ enable2ndByteCanID = false zBins = gppwm4_table table = tcuSolenoidTableTbl, tcuSolenoidTableMap, "Solenoids Active By Gear", 1 - yBins = gearCountArray, tcuCurrentGear xBins = solenoidCountArray, tcuCurrentGear + yBins = gearCountArray, tcuCurrentGear zBins = tcuSolenoidTable xyLabels = "Solenoid", "Gear"