Skip to content

Commit

Permalink
Make the advance2 gauge work correctly in multiply mode
Browse files Browse the repository at this point in the history
  • Loading branch information
adbancroft committed Dec 31, 2024
1 parent 394ea31 commit 671d4d9
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions reference/speeduino.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@
algorithmUnits = bits, U08, [0:2], "kPa", "% TPS", "%", "% TPS", "INVALID", "INVALID", "INVALID", "INVALID"
algorithmLimits= array, U16, [8], "", 1.0, 0, 0, 511, 0, noMsqSave
fuel2SwitchUnits = bits, U08, [0:2], "rpm", "kPa", "% TPS", "%", "% TPS", "INVALID", "INVALID", "INVALID"
spark2ModeUnits = bits, U08, [0:2], "", "%", "deg", "deg", "deg","INVALID","INVALID","INVALID"

#define all_IO_Pins = "Board Default", "INVALID", "INVALID", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "INVALID", "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "INVALID"
#define IO_Pins_no_def = "INVALID", "INVALID", "INVALID", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "INVALID", "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "INVALID"
#define bitwise_def = "Disabled", "AND", "OR", "XOR"
Expand Down Expand Up @@ -5085,9 +5087,9 @@ cmdVSSratio6 = "E\x99\x06"
baroCorrectGauge = baroCorrection,"Baro Correction", "%", 0, 200, 130, 140, 140, 150, 0, 0
flexEnrich = flexFuelCor, "Flex Correction", "%", 0, 200, 130, 140, 140, 150, 0, 0
fuelTempCorGauge = fuelTempCor, "Fuel Temp Correction", "%", 0, 200, 130, 140, 140, 150, 0, 0
advanceGauge = advance, "Advance (Current)", "deg", 50, -10, 0, 0, 35, 45, 0, 0
advance1Gauge = advance1, "Advance1 (Spark Table 1)", "deg",50, -10, 0, 0, 35, 45, 0, 0
advance2Gauge = advance2, "Advance2 (Spark Table 2)", "deg",50, -10, 0, 0, 35, 45, 0, 0
advanceGauge = advance, "Advance (Current)", "deg", -10, 50, 0, 0, 35, 45, 0, 0
advance1Gauge = advance1, "Advance1 (Spark Table 1)", "deg",-10, 50, 0, 0, 35, 45, 0, 0
advance2Gauge = advance2ForGauge, "Advance2 (Spark Table 2)", { bitStringValue( spark2ModeUnits, spark2Mode ) }, { ign2ValuesMin }, { ign2ValuesMax }, { ign2ValueLoD }, { ign2ValueLoW }, { ign2ValueHiW }, { ign2ValueHiD }, 0, 0
dwellGauge = dwell, "Dwell (Requested)", "mSec", 0, 35.0, 1.0, 1.2, 20, 25, 3, 3
dwellActualGauge = dwellActual, "Dwell (Measured)", "mSec", 0, 35.0, 1.0, 1.2, 20, 25, 3, 3
boostTargetGauge = boostTarget, "Target Boost", "kPa", 0, {maphigh}, 0, 20, {mapwarn}, {mapdang}, 0, 0
Expand Down Expand Up @@ -5490,6 +5492,12 @@ cmdVSSratio6 = "E\x99\x06"
ign2LoadMax = { (spark2Algorithm == 0 || spark2Algorithm == 2) ? 511 : 100.0 }
ign2ValuesMin = { (spark2Mode == 1) ? 0 : -40 }
ign2ValuesMax = { (spark2Mode == 1) ? 215 : 70 }
; We have to pass a U08 through a S08 in multiply mode
advance2ForGauge = { (spark2Mode == 1) ? advance2+127 : advance2 }
ign2ValueLoD = { (spark2Mode == 1) ? ign2ValuesMin : (ign2ValuesMin/10)*9 }
ign2ValueHiD = { (spark2Mode == 1) ? ign2ValuesMax : (ign2ValuesMax/10)*9 }
ign2ValueLoW = { (spark2Mode == 1) ? ign2ValuesMin : (ign2ValuesMin/10)*8 }
ign2ValueHiW = { (spark2Mode == 1) ? ign2ValuesMax : (ign2ValuesMax/10)*8 }

fuelLoad2 = { fuel2Algorithm == 0 ? map : fuel2Algorithm == 1 ? tps : fuel2Algorithm == 2 ? 0 : 0 }
ignLoad2 = { spark2Algorithm == 0 ? map : spark2Algorithm == 1 ? tps : spark2Algorithm == 2 ? 0 : ignLoad }
Expand Down

0 comments on commit 671d4d9

Please sign in to comment.