Skip to content

Commit

Permalink
Extended CLT range input for Aircooled Engines #6436
Browse files Browse the repository at this point in the history
  • Loading branch information
rusefillc committed May 1, 2024
1 parent 6f435fc commit 11d29d4
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion firmware/config/boards/hellen/hellen-honda-k/prepend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@
#define IGN_RPM_COUNT 24
#define IGN_LOAD_COUNT 24


#define CLT_UPPER_LIMIT 125
2 changes: 1 addition & 1 deletion firmware/config/boards/hellen/hellen121nissan/prepend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@




#define CLT_UPPER_LIMIT 125

#define show_Hellen121nissan_presets true
2 changes: 2 additions & 0 deletions firmware/config/boards/hellen/hellen154hyundai/prepend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@
#define ts_show_cylinder_12 false

#define show_Hellen_hyundai_154 true

#define CLT_UPPER_LIMIT 125
2 changes: 2 additions & 0 deletions firmware/config/boards/hellen/hellen154hyundai_f7/prepend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@
#define ts_show_cylinder_12 false

#define show_Hellen_hyundai_154 true

#define CLT_UPPER_LIMIT 125
2 changes: 1 addition & 1 deletion firmware/config/boards/subaru_eg33/prepend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
#define ts_show_output_diag true
#define ts_show_mc33810 true


#define CLT_UPPER_LIMIT 125

#define TS_BLOCK_READ_TIMEOUT 300
26 changes: 15 additions & 11 deletions firmware/integration/rusefi_config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ struct_no_prefix engine_configuration_s

#define TRACTION_CONTROL_ETB_DROP_SIZE 6

! air cooled engines go up to 250, see community board firmware which has that
! PnP boards for liquid cooled engines should override with '120'
#define CLT_UPPER_LIMIT 250

#define LUA_PWM_COUNT 8
#define LUA_DIGITAL_INPUT_COUNT 8

Expand Down Expand Up @@ -430,7 +434,7 @@ uint16_t engineSnifferRpmThreshold;Engine sniffer would be disabled above this r
uint8_t autoscale multisparkMaxRpm;Disable multispark above this engine speed.;"rpm", 50, 0, 0, 3000, 0
uint8_t autoscale maxAcRpm;Above this RPM, disable AC. Set to 0 to disable check.;"rpm", 50, 0, 0, 10000, 0
uint8_t maxAcTps;Above this TPS, disable AC. Set to 0 to disable check.;"%", 1, 0, 0, 100, 0
uint8_t maxAcClt;Above this CLT, disable AC to prevent overheating the engine. Set to 0 to disable check.;"deg C", 1, 0, 0, 150, 0
uint8_t maxAcClt;Above this CLT, disable AC to prevent overheating the engine. Set to 0 to disable check.;"deg C", 1, 0, 0, @@CLT_UPPER_LIMIT@@, 0

float compressionRatio;Just for reference really, not taken into account by any logic at this point;"CR", 1, 0, 0, 300, 1
uint16_t wastegatePositionMin;Voltage when the wastegate is closed.\nYou probably don't have one of these!;"mv", 1, 0, 0, 5000, 0
Expand Down Expand Up @@ -1316,7 +1320,7 @@ tle8888_mode_e tle8888mode;

float[CRANKING_ENRICH_COUNT x CRANKING_ENRICH_COUNT] postCrankingFactor;;"mult", 1, 0, 1, 3, 2
float[CRANKING_ENRICH_COUNT] postCrankingDurationBins;;"count", 1, 0, 0, 1000, 0
float[CRANKING_ENRICH_COUNT] postCrankingCLTBins;;"C", 1, 0, -100, 100, 0
float[CRANKING_ENRICH_COUNT] postCrankingCLTBins;;"C", 1, 0, -100, @@CLT_UPPER_LIMIT@@, 0

ThermistorConf auxTempSensor1
ThermistorConf auxTempSensor2
Expand Down Expand Up @@ -1359,7 +1363,7 @@ custom stepper_num_micro_steps_e 1 bits, U08, @OFFSET@, [0:3], @@stepper_num_mic
pid_s[CAMS_PER_BANK iterate] auxPid;VVT output PID\nTODO: rename to vvtPid
float[8 iterate] injectorCorrectionPolynomial;;"", 1, 0, -1000, 1000, 4
#define PRIME_CURVE_COUNT 8
int8_t[PRIME_CURVE_COUNT] primeBins;;"C", 1, 0, -40, 120, 0
int8_t[PRIME_CURVE_COUNT] primeBins;;"C", 1, 0, -40, @@CLT_UPPER_LIMIT@@, 0

linear_sensor_s oilPressure;

Expand All @@ -1384,7 +1388,7 @@ custom stepper_num_micro_steps_e 1 bits, U08, @OFFSET@, [0:3], @@stepper_num_mic
int16_t coastingFuelCutRpmHigh;This sets the RPM above which fuel cut is active.;"rpm", 1, 0, 0, 5000, 0
int16_t coastingFuelCutRpmLow;This sets the RPM below which fuel cut is deactivated, this prevents jerking or issues transitioning to idle;"rpm", 1, 0, 0, 5000, 0
int16_t coastingFuelCutTps;Throttle position below which fuel cut is active. With an electronic throttle enabled, this checks against pedal position.;"%", 1, 0, 0, 20, 0
int16_t coastingFuelCutClt;Fuel cutoff is disabled when the engine is cold.;"C", 1, 0, -100, 100, 0
int16_t coastingFuelCutClt;Fuel cutoff is disabled when the engine is cold.;"C", 1, 0, -100, @@CLT_UPPER_LIMIT@@, 0

int16_t pidExtraForLowRpm;Increases PID reaction for RPM<target by adding extra percent to PID-error;"%", 1, 0, 0, 100, 0
int16_t coastingFuelCutMap;MAP value above which fuel injection is re-enabled.;"kPa", 1, 0, 0, 250, 0
Expand Down Expand Up @@ -1688,9 +1692,9 @@ engine_configuration_s engineConfiguration;
uint16_t[DWELL_CURVE_SIZE] sparkDwellRpmBins;On Single Coil or Wasted Spark setups you have to lower dwell at high RPM;"RPM", 1, 0, 0, 25000, 0
uint16_t[DWELL_CURVE_SIZE] autoscale sparkDwellValues;;"ms", 0.01, 0, 0, 30, 2

int8_t[CLT_CURVE_SIZE] autoscale cltIdleRpmBins;CLT-based target RPM for automatic idle controller;"C", 2, 0, -40, 200, 0
int8_t[CLT_CURVE_SIZE] autoscale cltIdleRpmBins;CLT-based target RPM for automatic idle controller;"C", 2, 0, -40, @@CLT_UPPER_LIMIT@@, 0
uint8_t[CLT_CURVE_SIZE] autoscale cltIdleRpm;See idleRpmPid;"RPM", 20, 0, 0, 5000, 0
float[CLT_TIMING_CURVE_SIZE] cltTimingBins;CLT-based timing correction;"C", 1, 0, -100, 250, 1
float[CLT_TIMING_CURVE_SIZE] cltTimingBins;CLT-based timing correction;"C", 1, 0, -100, @@CLT_UPPER_LIMIT@@, 1
float[CLT_TIMING_CURVE_SIZE] cltTimingExtra;;"degree", 1, 0, -400, 400, 0


Expand Down Expand Up @@ -1736,7 +1740,7 @@ uint8_t[PEDAL_TO_TPS_SIZE x PEDAL_TO_TPS_SIZE] pedalToTpsTable;;"%", 1, 0, 0, 10
uint8_t[PEDAL_TO_TPS_SIZE] pedalToTpsPedalBins;;"%", 1, 0, 0, 120, 0
uint8_t[PEDAL_TO_TPS_SIZE] autoscale pedalToTpsRpmBins;;"RPM", 100, 0, 0, 25000, 0

float[CLT_CRANKING_CURVE_SIZE] cltCrankingCorrBins;CLT-based cranking position multiplier for simple manual idle controller;"C", 1, 0, -100, 250, 2
float[CLT_CRANKING_CURVE_SIZE] cltCrankingCorrBins;CLT-based cranking position multiplier for simple manual idle controller;"C", 1, 0, -100, @@CLT_UPPER_LIMIT@@, 2
float[CLT_CRANKING_CURVE_SIZE] cltCrankingCorr ;CLT-based cranking position multiplier for simple manual idle controller;"%", 1, 0, 0, 500, 2

uint8_t[IDLE_ADVANCE_CURVE_SIZE] autoscale idleAdvanceBins;Optional timing advance table for Idle (see useSeparateAdvanceForIdle);"RPM", 50, 0, 0, 12000, 0
Expand All @@ -1749,19 +1753,19 @@ uint16_t[IDLE_VE_SIZE x IDLE_VE_SIZE] autoscale idleVeTable;;"%", 0.1, 0, 0, 999
custom lua_script_t @@LUA_SCRIPT_SIZE@@ string, ASCII, @OFFSET@, @@LUA_SCRIPT_SIZE@@
lua_script_t luaScript;

float[CLT_CURVE_SIZE] cltFuelCorrBins;;"C", 1, 0, -100, 250, 2
float[CLT_CURVE_SIZE] cltFuelCorrBins;;"C", 1, 0, -100, @@CLT_UPPER_LIMIT@@, 2
float[CLT_CURVE_SIZE] cltFuelCorr;;"ratio", 1, 0, 0, 5, 2

float[IAT_CURVE_SIZE] iatFuelCorrBins;;"C", 1, 0, -100, 250, 2
float[IAT_CURVE_SIZE] iatFuelCorrBins;;"C", 1, 0, -100, @@CLT_UPPER_LIMIT@@, 2
float[IAT_CURVE_SIZE] iatFuelCorr;;"ratio", 1, 0, 0, 5, 2

float[CRANKING_CURVE_SIZE] crankingFuelCoef;;"ratio", 1, 0, 0, 50, 2
float[CRANKING_CURVE_SIZE] crankingFuelBins;;"C", 1, 0, -80, 170, 2
float[CRANKING_CURVE_SIZE] crankingFuelBins;;"C", 1, 0, -80, @@CLT_UPPER_LIMIT@@, 2

float[CRANKING_CURVE_SIZE] crankingCycleCoef;;"ratio", 1, 0, 0, 5, 2
float[CRANKING_CURVE_SIZE] crankingCycleBins;;"counter", 1, 0, -80, 170, 0

float[CLT_CURVE_SIZE] cltIdleCorrBins;CLT-based idle position multiplier for simple manual idle controller;"C", 1, 0, -100, 250, 2
float[CLT_CURVE_SIZE] cltIdleCorrBins;CLT-based idle position multiplier for simple manual idle controller;"C", 1, 0, -100, @@CLT_UPPER_LIMIT@@, 2
float[CLT_CURVE_SIZE] cltIdleCorr; CLT-based idle position multiplier for simple manual idle controller;"ratio", 1, 0, 0, 10, 2

float[MAF_DECODING_COUNT] mafDecoding;Also known as MAF transfer function.\nkg/hour value.\nBy the way 2.081989116 kg/h = 1 ft3/m;"kg/hour", 1, 0, -500, 4000, 2
Expand Down

0 comments on commit 11d29d4

Please sign in to comment.