Move to custom WUE dialog

This commit is contained in:
Josh Stewart 2016-08-09 12:58:51 +10:00
parent 5e84d4cfc0
commit 6945d8570c
3 changed files with 57 additions and 22 deletions

View File

@ -225,7 +225,7 @@ This function returns the current values of a fixed group of variables
*/
void sendValues(int length)
{
byte packetSize = 34;
byte packetSize = 35;
byte response[packetSize];
response[0] = currentStatus.secl; //secl is simply a counter that increments each second. Used to track unexpected resets (Which will reset this count to 0)
@ -270,6 +270,7 @@ void sendValues(int length)
response[32] = highByte(currentStatus.rpmDOT);
response[33] = currentStatus.flex; //Flex sensor value (or 0 if not used)
response[34] = getNextError();
//cli();
Serial.write(response, (size_t)packetSize);

View File

@ -25,8 +25,8 @@ const int map_page_size = 288;
#define BIT_ENGINE_WARMUP 3 // Engine in warmup
#define BIT_ENGINE_ACC 4 // in acceleration mode (TPS accel)
#define BIT_ENGINE_DCC 5 // in deceleration mode
#define BIT_ENGINE_ERROR 6 // Error is detected
#define BIT_ENGINE_IDLE 7 // idle on
#define BIT_ENGINE_MAPACC 6 // MAP acceleration mode
#define BIT_ENGINE_MAPDCC 7 // MAP decelleration mode
//Define masks for Squirt
#define BIT_SQUIRT_INJ1 0 //inj1 Squirt
@ -44,8 +44,8 @@ const int map_page_size = 288;
#define BIT_SPARK_HRDLIM 2 //Hard limiter indicator
#define BIT_SPARK_SFTLIM 3 //Soft limiter indicator
#define BIT_SPARK_BOOSTCUT 4 //Spark component of MAP based boost cut out
#define BIT_SPARK_UNUSED3 5 //
#define BIT_SPARK_UNUSED4 6 //
#define BIT_SPARK_ERROR 5 // Error is detected
#define BIT_SPARK_IDLE 6 // idle on
#define BIT_SPARK_UNUSED5 7 //
#define VALID_MAP_MAX 1022 //The largest ADC value that is valid for the MAP sensor

View File

@ -25,6 +25,20 @@
settingGroup = boostUnits, "Boost table units"
settingOption = DEFAULT, "kPa"
settingOption = BOOSTPSI, "PSI"
[PcVariables]
; valid types: boolean, double, int, list
;
; no offset as they are local variables.
; entry format the same as Constants, except there is no offset.
; arrays are not yet supported.
; name = class, type, shape, units, scale, translate, lo, hi, digits
; name = type, min, max;
;
; type List: value will be index.
rpmhigh = scalar, U16, "rpm", 1, 0, 0, 30000, 0
rpmwarn = scalar, U16, "rpm", 1, 0, 0, 30000, 0
rpmdang = scalar, U16, "rpm", 1, 0, 0, 30000, 0
[Constants]
@ -98,11 +112,11 @@
;Page 1 is the fuel map and axis bins only
page = 1
; name = bits, type, offset, bits
; name = array, type, offset, shape, units, scale, translate, lo, hi, digits
; name = scalar, type, offset, units, scale, translate, lo, hi, digits
; name = bits, type, offset, bits
; name = array, type, offset, shape, units, scale, translate, lo, hi, digits
; name = scalar, type, offset, units, scale, translate, lo, hi, digits
veTable = array, U08, 0, [16x16],"%", 1.0, 0.0, 0.0, 255.0, 0
rpmBins = array, U08, 256, [ 16], "RPM", 100.0, 0.0, 100.0, 25500.0, 0
rpmBins = array, U08, 256, [ 16], "RPM", 100.0, 0.0, 100.0, 25500.0, 0
#if SPEED_DENSITY
mapBins = array, U08, 272, [ 16], "kPa", 1.0, 0.0, 0.0, 255.0, 0
#elif ALPHA_N
@ -122,7 +136,7 @@ page = 2
unused2-2 = scalar, U08, 1, "ms", 0.1, 0.0, 0.0, 25.5, 1
asePct = scalar, U08, 2, "%", 1.0, 0.0, 0.0, 95.0, 0
aseCount = scalar, U08, 3, "s", 1.0, 0.0, 0.0, 255, 0
wueBins = array, U08, 4, [ 10], "%", 1.0, 0.0, 0.0, 255, 0
wueRates = array, U08, 4, [10], "%", 1.0, 0.0, 0.0, 255, 0
crankingPct= scalar, U08, 14, "%", 1.0, 0.0, 0.0, 255, 0
pinLayout = bits, U08, 15, [0:7], "Speeduino v0.1", "Speeduino v0.2", "Speeduino v0.3", "Speeduino v0.4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Turtana PCB", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Plazomat I/O 0.1", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Daz V6 Shield 0.1", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID",
unused16 = scalar, U08, 16, "ms", 0.1, 0.0, 0.0, 25.5, 1
@ -266,10 +280,11 @@ page = 4
;TPS based acceleration enrichment
taeBins = array, U08, 23, [ 4], "%/s", 10.0, 0.0, 0.00, 2550.0, 0
taeRates = array, U08, 27, [ 4], "%", 1.0, 0.0, 0.00, 255.0, 0 ; 4 bytes
;WUE Bins (Needed somewhere to put these
#if CELSIUS
wueRates = array, U08, 31, [10], "C", 1.0, 0.0, 100.0, 255.0, 0
wueBins = array, U08, 31, [10], "C", 1.0, -40, -40, 102.0, 0
#else
wueRates = array, U08, 31, [10], "F", 1.8, 17.77, 100.0, 255.0, 0 ; No -40 degree offset here
wueBins = array, U08, 31, [10], "F", 1.8, -22.23, -40, 215.0, 0
#endif
;Dwell config options
dwellLim = scalar, U08, 41, "ms", 1, 0, 0, 32, 0
@ -544,7 +559,7 @@ page = 8
menu = "&Starting/Idle"
subMenu = crankPW, "Cranking Settings"
subMenu = std_warmup, "&Warmup Enrichment"
subMenu = warmup, "Warmup Enrichment"
subMenu = std_separator
subMenu = idleSettings, "Idle Control"
subMenu = iacClosedLoop_curve, "Idle - Closed loop targets", 7, { iacAlgorithm == 3 }
@ -880,6 +895,13 @@ page = 8
field = "VVT Control Enabled", vvtEnabled
field = "VVT solenoid freq.", vvtFreq
dialog = wc_note
field = "For 99% of engines, warmup must have 100% in the final row. Typical maximum is 255% (cold)."
dialog = warmup, "Warmup Enrichment (WUE) - Percent Multiplier"
panel = warmup_curve
panel = wc_note
;-------------------------------------------------------------------------------
; General help text
@ -987,6 +1009,16 @@ page = 8
yAxis = 0, 2000, 4
xBins = iacBins, coolant
yBins = iacCLValues
; Warmup enrichment curve
curve = warmup_curve, "Warmup Enrichment (WUE) Curve"
;topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt3_TunerStudio_MS_Lite_Reference-1.3.pdf#wue"
columnLabel = "Coolant", "WUE %"
xAxis = -40, 210, 9
yAxis = 0, 500, 6
xBins = wueBins, coolant
yBins = wueRates
gauge = cltGauge
[TableEditor]
@ -1152,8 +1184,10 @@ page = 8
indicator = { crank }, "Not Cranking", "Cranking", white, black, green, black
indicator = { startw }, "ASE OFF", "ASE", white, black, green, black
indicator = { warmup }, "WUE OFF", "WUE", white, black, green, black
indicator = { accaen }, "Accel", "Accel", white, black, green, black
indicator = { accden }, "Decel", "Decel", white, black, green, black
indicator = { tpsaccaen }, "Accel", "Accel", white, black, green, black
indicator = { tpsaccden }, "Decel", "Decel", white, black, green, black
indicator = { mapaccaen }, "MAP Accel", "MAP Accel", white, black, green, black
indicator = { mapaccden }, "MAP Decel", "MAP Decel", white, black, green, black
indicator = { error }, "No Errors", "ERROR", 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
@ -1240,7 +1274,7 @@ page = 8
ochGetCommand = "A"
ochBlockSize = 34
ochBlockSize = 35
secl = scalar, U08, 0, "sec", 1.000, 0.000
squirt = scalar, U08, 1, "bits", 1.000, 0.000
@ -1257,10 +1291,10 @@ page = 8
crank = bits, U08, 2, [1:1]
startw = bits, U08, 2, [2:2]
warmup = bits, U08, 2, [3:3]
accaen = bits, U08, 2, [4:4]
accden = bits, U08, 2, [5:5]
error = bits, U08, 2, [6:6]
idle = bits, U08, 2, [7:7]
tpsaccaen = bits, U08, 2, [4:4]
tpsaccden = bits, U08, 2, [5:5]
mapaccaen = bits, U08, 2, [6:6]
mapaccden = bits, U08, 2, [7:7]
dwell = scalar, U08, 3, "ms", 0.100, 0.000
map = scalar, U08, 4, "kpa", 2.000, 0.000
iatRaw = scalar, U08, 5, "°C", 1.000, 0.000
@ -1290,8 +1324,8 @@ page = 8
hardLimitOn = bits, U08, 29, [2:2]
softlimitOn = bits, U08, 29, [3:3]
boostCutSpark = bits, U08, 29, [4:4]
sparkUnusedf = bits, U08, 29, [5:5]
sparkUnusedg = bits, U08, 29, [6:6]
error = bits, U08, 2, [6:6]
idle = bits, U08, 2, [7:7]
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