add shift matrix and pin config (#1798)

* add shift matrix and pin config

* try
This commit is contained in:
David Holdeman 2020-09-15 03:34:09 -05:00 committed by GitHub
parent 837fd920e4
commit d761f523a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 9 deletions

View File

@ -99,6 +99,8 @@ typedef uint8_t iac_pid_mult_t[IAC_PID_MULT_SIZE][IAC_PID_MULT_SIZE];
typedef float baro_corr_table_t[BARO_CORR_SIZE][BARO_CORR_SIZE];
typedef bool tcubinary_table_t[TCU_SOLENOID_COUNT][TCU_GEAR_COUNT];
typedef float fsio_table_8x8_f32t[FSIO_TABLE_8][FSIO_TABLE_8];
typedef float tps_tps_table_t[TPS_TPS_ACCEL_TABLE][TPS_TPS_ACCEL_TABLE];
typedef uint8_t fsio_table_8x8_u8t[FSIO_TABLE_8][FSIO_TABLE_8];

View File

@ -117,7 +117,8 @@ struct_no_prefix engine_configuration_s
#define CLT_TIMING_CURVE_SIZE 8
#define IDLE_VE_CURVE_SIZE 8
#define TCU_SOLENOID_COUNT 8
#define TCU_SOLENOID_COUNT 6
#define TCU_GEAR_COUNT 10
#define ETB_COUNT 2
@ -205,6 +206,8 @@ custom fuel_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OF
custom ve_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"%", 1, 0, 0, 999.0, 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_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
custom tps_tps_table_t 4*@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@ array, F32, @OFFSET@, [@@TPS_TPS_ACCEL_TABLE@@x@@TPS_TPS_ACCEL_TABLE@@],"value", 1, 0, 0.0, 30000.0, 2
@ -944,6 +947,8 @@ custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:1], @@maf_sensor_type_e_enum@
output_pin_e[TCU_SOLENOID_COUNT iterate] tcu_solenoid;
uint8_t[2] solenoidPadding;;"units", 1, 0, -20, 100, 0
spi_device_e drv8860spiDevice;
brain_pin_e drv8860_cs;
pin_output_mode_e drv8860_csPinMode;
@ -1451,7 +1456,8 @@ angle_table_t injectionPhase;
float[FUEL_LOAD_COUNT] injPhaseLoadBins;;"Load", 1, 0.0, 0, 500.0, 2
float[FUEL_RPM_COUNT] injPhaseRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
uint8_t[1152] unused15136;;"units", 1, 0, -20, 100, 0
tcubinary_table_t tcuSolenoidTable;
uint8_t[1092] unused15136;;"units", 1, 0, -20, 100, 0
ignition_table_t ignitionTable;
float[IGN_LOAD_COUNT] ignitionLoadBins;;"Load", 1, 0.0, 0, 500.0, 2
@ -1461,7 +1467,7 @@ ve_table_t veTable;
float[FUEL_LOAD_COUNT] veLoadBins;;"kPa", 1, 0.0, 0, 400.0, 2
float[FUEL_RPM_COUNT] veRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
afr_table_t afrTable;
afr_table_t afrTable;
float[FUEL_LOAD_COUNT] afrLoadBins;;"", 1, 0.0, 0, 500.0, 2
float[FUEL_RPM_COUNT] afrRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
@ -1489,6 +1495,7 @@ fsio_table_8x8_u8t fsioTable4;
float[FSIO_TABLE_8] fsioTable4LoadBins;;"L", 1, 0, 0.0, 255, 0
float[FSIO_TABLE_8] fsioTable4RpmBins;RPM is float and not integer in order to use unified methods for interpolation;"RPM", 1, 0, 0.0, 25500.0, 2
end_struct
#define MOCK_IAT_COMMAND "mock_iat_voltage"

View File

@ -129,6 +129,7 @@ enable2ndByteCanID = false
; it seems that TS also needs to know the diff.size of a tooth
calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) }
[VeAnalyze]
; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition
@ -382,6 +383,9 @@ enable2ndByteCanID = false
wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1;
wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0
gearCountArray = array, S08, [@@TCU_GEAR_COUNT@@], "Gear", 1, 0, -1, { @@TCU_GEAR_COUNT@@ - 2 }, 0, noMsqSave
solenoidCountArray = array, U08, [@@TCU_SOLENOID_COUNT@@], "Solenoid", 1, 0, 1, @@TCU_SOLENOID_COUNT@@, 0, noMsqSave
; These are inverted (false = "Yes") so that they default to enabled
enableLogDebugChannels = bits, U08, [0:0], "Yes", "No"
enableLogErrorList = bits, U08, [0:0], "Yes", "No"
@ -490,6 +494,11 @@ enable2ndByteCanID = false
readOnly = warning_message
defaultValue = gearCountArray, -1 0 1 2 3 4 5 6 7 8
readOnly = gearCountArray
defaultValue = solenoidCountArray, 1 2 3 4 5 6 7 8
readOnly = solenoidCountArray
[CurveEditor]
; xAxis = leftValue, rightValue, step
@ -723,7 +732,7 @@ enable2ndByteCanID = false
; move table into a panel? or find a way to add a link to https://rusefi.com//wiki/index.php?title=Manual:Software:TPSTPS
table = tpsTpsAccelTbl, tpsTpsAccelMap, "TPS/TPS Acceleration Extra Fuel(ms)", 1
topicHelp = "tpstpsHelp"
topicHelp = "tpstpsHelp"
xBins = tpsTpsAccelFromRpmBins, TPSValue
yBins = tpsTpsAccelToRpmBins, TPSValue
zBins = tpsTpsAccelTable
@ -765,7 +774,7 @@ enable2ndByteCanID = false
xBins = baroCorrRpmBins, RPMValue
yBins = baroCorrPressureBins, baroPressure
zBins = baroCorrTable
; gridHeight = 2.0
; gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(RICHER)", "(LEANER)"
@ -798,7 +807,7 @@ enable2ndByteCanID = false
table = injPhaseTableTbl, injPhaseTableMap, "Injection Phase", 1
topicHelp = "fuelHelp"
topicHelp = "fuelHelp"
; constant, variable
xBins = injPhaseRpmBins, RPMValue
yBins = injPhaseLoadBins, fuelingLoad
@ -859,6 +868,12 @@ enable2ndByteCanID = false
yBins = gppwm4_loadBins, gppwm4_load
zBins = gppwm4_table
table = tcuSolenoidTableTbl, tcuSolenoidTableMap, "Solenoids Active By Gear", 1
yBins = gearCountArray, tcuCurrentGear
xBins = solenoidCountArray, tcuCurrentGear
zBins = tcuSolenoidTable
xyLabels = "Solenoid", "Gear"
[GaugeConfigurations]
gaugeCategory = Sensors - Extra 2
@ -1341,6 +1356,7 @@ menuDialog = main
subMenu = std_separator
subMenu = tcuControls, "Transmission Settings"
subMenu = tcuSolenoidTableTbl, "TCU Solenoids"
menu = "&Sensors"
# Base analog input settings
@ -2891,15 +2907,27 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
field = "ADC #3", fsioAdc3
field = "ADC #4", fsioAdc4
dialog = shiftInputPanel
dialog = transmissionPanel
field = "TCU Enabled" tcuEnabled
dialog = solenoidPanel, "Shift Solenoids"
field = "Solenoid 1 Pin" tcu_solenoid1, { tcuEnabled }
field = "Solenoid 2 Pin" tcu_solenoid2, { tcuEnabled }
field = "Solenoid 3 Pin" tcu_solenoid3, { tcuEnabled }
field = "Solenoid 4 Pin" tcu_solenoid4, { tcuEnabled }
field = "Solenoid 5 Pin" tcu_solenoid5, { tcuEnabled }
field = "Solenoid 6 Pin" tcu_solenoid6, { tcuEnabled }
dialog = buttonShiftInputPanel
field = "Upshift Pin" tcuUpshiftButtonPin, { tcuEnabled }
field = "Upshift Pin Mode" tcuUpshiftButtonPinMode, { tcuEnabled }
field = "Downshift Pin" tcuDownshiftButtonPin, { tcuEnabled }
field = "Downshift Pin Mode" tcuDownshiftButtonPinMode, { tcuEnabled }
dialog = tcuControls, "Transmission Settings"
panel = shiftInputPanel
panel = transmissionPanel
panel = solenoidPanel
panel = buttonShiftInputPanel
;Boost Open Loop
@ -3238,4 +3266,3 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
;addTool = toolName, PanelName
addTool = veTableGenerator, "VE Table Generator", veTableTbl
addTool = afrTableGenerator, "AFR Table Generator", afrTableTbl