ew indicators for launch control and rev limiters

This commit is contained in:
Josh Stewart 2016-03-30 21:34:55 +11:00
parent a06939f4be
commit 85157f052e
3 changed files with 45 additions and 26 deletions

View File

@ -231,7 +231,7 @@ void sendValues(int length)
response[27] = highByte(currentStatus.freeRAM);
response[28] = currentStatus.batCorrection; //Battery voltage correction (%)
response[29] = (byte)(currentStatus.dwell / 100);
response[29] = currentStatus.spark; //Spark related bitfield
response[30] = currentStatus.O2_2; //O2
//rpmDOT must be sent as a signed integer

View File

@ -33,6 +33,16 @@ const int map_page_size = 288;
#define BIT_SQUIRT_TOOTHLOG1READY 6 //Used to flag if tooth log 1 is ready
#define BIT_SQUIRT_TOOTHLOG2READY 7 //Used to flag if tooth log 2 is ready (Log is not currently used)
//Define masks for spark variable
#define BIT_SPARK_LAUNCH 0 //Launch indicator
#define BIT_SPARK_SFTLIM 1 //Soft limiter indicator
#define BIT_SPARK_HRDLIM 2 //Hard limiter indicator
#define BIT_SPARK_UNUSED1 3 //
#define BIT_SPARK_UNUSED2 4 //
#define BIT_SPARK_UNUSED3 5 //
#define BIT_SPARK_UNUSED4 6 //
#define BIT_SPARK_UNUSED5 7 //
#define VALID_MAP_MAX 1022 //The largest ADC value that is valid for the MAP sensor
#define VALID_MAP_MIN 2 //The smallest ADC value that is valid for the MAP sensor
@ -174,8 +184,8 @@ struct config1 {
byte nCylinders : 4; //Number of cylinders
//config2 in ini
byte cltType : 2;
byte matType : 2;
byte cltType1 : 2;
byte matType1 : 2;
byte nInjectors : 4; //Number of injectors
@ -344,15 +354,12 @@ struct config4 {
byte iacStepHyster; //Hysteresis temperature (*10). Eg 2.2C = 22
byte fanInv : 1; // Fan output inversion bit
byte fanEnable : 1; // Fan enable bit
byte unused : 6;
byte fanEnable : 2; // Fan enable bit. 0=Off, 1=On/Off, 2=PWM
byte unused : 5;
byte fanSP; // Cooling fan start temperature
byte fanHyster; // Fan hysteresis
byte unused59;
byte unused60;
byte unused61;
byte unused62;
byte unused63;
byte fanFreq; // Fan PWM frequency
byte fanPWMBins[4]; //Temperature Bins for the PWM fan control
};
byte pinInjector1; //Output pin injector 1

View File

@ -380,25 +380,25 @@ page = 7
; Begin fan control vairables
fanInv = bits, U08, 56, [0:0], "No", "Yes"
fanEnable = bits, U08, 56, [1:1], "No", "Yes"
unused7-55a = bits, U08, 56, [2:2], "No", "Yes"
fanEnable = bits, U08, 56, [1:2], "Off", "On/Off", "PWM", "INVALID"
unused7-55b = bits, U08, 56, [3:3], "No", "Yes"
unused7-55c = bits, U08, 56, [4:4], "No", "Yes"
unused7-55d = bits, U08, 56, [5:5], "No", "Yes"
unused7-55e = bits, U08, 56, [6:6], "No", "Yes"
unused7-55f = bits, U08, 56, [7:7], "No", "Yes"
#if CELSIUS
fanSP = scalar, U08, 57, "°C", 1.0, -40, -40, 215.0, 0
fanHyster = scalar, U08, 58, "°C", 1.0, -40, -40, 215.0, 0
fanSP = scalar, U08, 57, "°C", 1.0, -40, -40, 215.0, 0
fanHyster = scalar, U08, 58, "°C", 1.0, -40, -40, 215.0, 0
#else
fanSP = scalar, U08, 57, "°F", 1.8, -22.23, -40, 215.0, 0
fanHyster = scalar, U08, 58, "°F", 1.8, -22.23, -40, 215.0, 0
fanSP = scalar, U08, 57, "°F", 1.8, -22.23, -40, 215.0, 0
fanHyster = scalar, U08, 58, "°F", 1.8, -22.23, -40, 215.0, 0
#endif
fanFreq = scalar, U08 , 59, "Hz", 2.0, 0.0, 10, 511, 0
#if CELSIUS
fanPWMBins = array, U08, 60, [4], "C", 1.0, -40, -40, 215, 0
#else
fanPWMBins = array, U08, 60, [4], "F", 1.8, -22.23, -40, 215, 0
#endif
unused7-59 = scalar, U08, 59, "RPM", 100.0, 0.0, 100, 25500, 0
unused7-60 = scalar, U08, 60, "RPM", 100.0, 0.0, 100, 25500, 0
unused7-61 = scalar, U08, 61, "RPM", 100.0, 0.0, 100, 25500, 0
unused7-62 = scalar, U08, 62, "RPM", 100.0, 0.0, 100, 25500, 0
unused7-63 = scalar, U08, 63, "RPM", 100.0, 0.0, 100, 25500, 0
;--------------------------------------------------
;Boost and vvt maps (Page 8)
@ -658,7 +658,7 @@ page = 8
field = "PID Derivative", egoKD, { egoType && (egoAlgorithm == 2) }
dialog = fanSettings,"Fan Settings",7
field = "Fan Enabled", fanEnable
field = "Fan Mode", fanEnable
field = "Fan Output Inverted (see F1)", fanInv
field = "Fan temperature SP", fanSP
field = "Fan hysteresis", fanHyster
@ -1063,7 +1063,11 @@ page = 8
indicator = { tpsaccden }, "TPS Decel", "TPS Decel", white, black, green, black
indicator = { mapaccden }, "MAP Decel", "MAP Decel", white, black, green, black
indicator = { (tps > tpsflood) && (rpm < crankRPM) }, "FLOOD OFF", "FLOOD CLEAR", white, black, red, black
indicator = { DFCOOn }, "DFCO OFF", "DFCO On", white, black, red, black
indicator = { DFCOOn }, "DFCO OFF", "DFCO On", white, black, red, black
indicator = { launchOn }, "Launch OFF", "Launch Active", white, black, green, black
indicator = { softlimitOn }, "Soft Limiter OFF", "Soft Limiter",white, black, red, black
indicator = { hardlimitOn }, "Hard Limiter OFF", "Hard Limiter",white, black, red, black
;-------------------------------------------------------------------------------
@ -1185,7 +1189,15 @@ page = 8
loopsPerSecond = scalar, S16, 24, "loops", 1.000, 0.000
freeRAM = scalar, S16, 26, "bytes", 1.000, 0.000
batCorrection = scalar, U08, 28, "%", 1.000, 0.000
dwell = scalar, U08, 29, "ms", 0.1, 0.000
spark = scalar, U08, 29, "bits", 1.000, 0.000
launchOn = bits, U08, 29, [0:0]
softlimitOn = bits, U08, 29, [1:1]
hardLimitOn = bits, U08, 29, [2:2]
sparkUnusedd = bits, U08, 29, [3:3]
sparkUnusede = bits, U08, 29, [4:4]
sparkUnusedf = bits, U08, 29, [5:5]
sparkUnusedg = bits, U08, 29, [6:6]
sparkUnusedh = bits, U08, 29, [7:7]
afr2 = scalar, U08, 30, "O2", 0.100, 0.000
rpmDOT = scalar, S16, 31, "rpm/s", 1.000, 0.000
@ -1205,7 +1217,6 @@ page = 8
afrtarget = { 0 }
; throttle = { table(tpsADC, "throttlefactor.inc") }
throttle = { tps }, "%"
;cycleTime = { 60000.0 / rpm * (2.0-twoStroke) }
@ -1213,7 +1224,7 @@ page = 8
nSquirts = { nCylinders/divider }
dutyCycle = { 100.0*pulseWidth/cycleTime }
#if EXPANDED_CLT_TEMP
#if EXPANDED_CLT_TEMP
clt_exp = { 1 }
#else
clt_exp = { 0 }
@ -1281,6 +1292,7 @@ page = 8
entry = dutyCycle, "DutyCycle2", float, "%.1f"
entry = TPSdot, "TPS DOT", int, "%d"
entry = advance, "Ignition Advance", int,"%d"
entry = dwell, "Dwell", int, "%d"
entry = batteryVoltage, "Battery V", float, "%.1f"
entry = rpmDOT, "rpm/s", int, "%d"