From fb86e5fca6e32d0f3bb3e2ea091f853fed5ccc5f Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Sat, 21 Mar 2015 10:41:53 +1100 Subject: [PATCH] Add injector vs voltage compensation curve --- globals.h | 12 +++++++++++- reference/Speeduino base tune v0.3.msq | 23 +++++++++++++++-------- reference/speeduino 0.2.ini | 22 +++++++++++++--------- 3 files changed, 39 insertions(+), 18 deletions(-) diff --git a/globals.h b/globals.h index eb69b704..511bd74c 100644 --- a/globals.h +++ b/globals.h @@ -123,7 +123,7 @@ struct config1 { byte injOCfuel; byte injPwmP; byte injPwmT; - byte battFac; //Whether to compensate pulsewidth for battery voltage (ms/v) + byte unused113; int rpmk; //2 bytes //36 //config1 in ini @@ -223,6 +223,16 @@ struct config3 { byte egoLoadMax; //Load (TPS or MAP) must be below this for closed loop to function byte egoLoadMin; //Load (TPS or MAP) must be above this for closed loop to function byte dwellCorrectionBins[6]; //Correction table for dwell vs battery voltage + byte injVoltageCorrectionBins[6]; //Correction table for injector PW vs battery voltage + byte unused107; + byte unused108; + byte unused109; + byte unused110; + byte unused111; + byte unused112; + byte unused113; + byte unused114; + byte unused115; byte unused116; byte unused117; byte unused118; diff --git a/reference/Speeduino base tune v0.3.msq b/reference/Speeduino base tune v0.3.msq index a5320b6c..2b57c3f8 100644 --- a/reference/Speeduino base tune v0.3.msq +++ b/reference/Speeduino base tune v0.3.msq @@ -1,7 +1,7 @@ - - + + "0" @@ -112,7 +112,6 @@ 0.0 0.0 0.0 -0.0 3000.0 "250 kPa" "Four-stroke" @@ -273,11 +272,19 @@ 20.0 6.0 - 8.0 - 10.0 - 13.0 - 15.0 - 19.0 + 9.0 + 12.0 + 14.0 + 18.0 + 21.0 + + + 221.0 + 151.0 + 107.0 + 100.0 + 95.0 + 92.0 diff --git a/reference/speeduino 0.2.ini b/reference/speeduino 0.2.ini index f98fea8c..3d7a59d6 100644 --- a/reference/speeduino 0.2.ini +++ b/reference/speeduino 0.2.ini @@ -119,7 +119,7 @@ page = 1 injOCfuel = scalar, U08, 110, "ms", 0.1, 0.0, 0.0, 0.0, 0 injPwmP = scalar, U08, 111, "%", 1.0, 0.0, 0.0, 100.0, 0 injPwmT = scalar, U08, 112, "ms", 0.1, 0.0, 0.0, 25.5, 1 - battFac = scalar, U08, 113, "ms/v",0.0166667, 0.0, 0.0, 1.0, 2 + unused113 = scalar, U08, 113, "ms/v",0.0166667, 0.0, 0.0, 1.0, 2 rpmk = scalar, U16, 114, "", 1.0, 0.0 ; Config1 @@ -252,12 +252,7 @@ page = 3 egoLoadMax = scalar, U08, 93, "%", 1, 0, 0, 120, 0 egoLoadMin = scalar, U08, 94, "%", 1, 0, 0, 120, 0 brvBins = array, U08, 95, [6], "V", 1.0, 0, 6, 24, 0 ; Bins for the battery reference voltage - ;unused101 = scalar, U08, 101, "none", 0, 0, 0, 0, 0 - ;unused102 = scalar, U08, 102, "none", 0, 0, 0, 0, 0 - ;unused103 = scalar, U08, 103, "none", 0, 0, 0, 0, 0 - ;unused104 = scalar, U08, 104, "none", 0, 0, 0, 0, 0 - ;unused105 = scalar, U08, 105, "none", 0, 0, 0, 0, 0 - ;unused106 = scalar, U08, 106, "none", 0, 0, 0, 0, 0 + injBatRates = array, U08, 101, [6], "%", 1.0, 0.0, 0.00, 255.0, 0 ;Values for injector pulsewidth vs voltage ;unused107 = scalar, U08, 107, "none", 0, 0, 0, 0, 0 ;unused108 = scalar, U08, 108, "none", 0, 0, 0, 0, 0 ; unused109 = scalar, U08, 109, "none", 0, 0, 0, 0, 0 @@ -410,7 +405,7 @@ page = 3 dialog = injChars, "Injector Characteristics" field = "Injector Open Time", injOpen - field = "Battery Voltage Correction", battFac + panel = injector_voltage_curve dialog = egoControl, "" field = "Sensor Type", egoType @@ -630,12 +625,21 @@ help = helpEnrichments, "Enrichments Help" ; Correction curve for dwell vs battery voltage curve = dwell_correction_curve, "Dwell voltage correction" - columnLabel = "Voltage", "Dwell %" + columnLabel = "Voltage", "Dwell" xAxis = 6, 22, 6 yAxis = 0, 255, 6 xBins = brvBins, batteryVoltage yBins = dwellRates +; Correction curve for injectors vs battery voltage + curve = injector_voltage_curve, "Injector voltage correction" + columnLabel = "Voltage", "%" + xAxis = 6, 22, 6 + yAxis = 0, 255, 6 + xBins = brvBins, batteryVoltage + yBins = injBatRates + + [TableEditor] ; table_id, map3d_id, "title", page table = veTable1Tbl, veTable1Map, "VE Table", 1