Add settings to select pins for fuel pump and fan
This commit is contained in:
parent
0a1a390a98
commit
48712c12fa
|
@ -274,6 +274,7 @@ struct config2 {
|
||||||
byte TrigPattern : 4;
|
byte TrigPattern : 4;
|
||||||
|
|
||||||
byte TrigEdgeSec : 1;
|
byte TrigEdgeSec : 1;
|
||||||
|
byte fuelPumpPin : 5;
|
||||||
byte unused4_6b : 7;
|
byte unused4_6b : 7;
|
||||||
|
|
||||||
byte unused4_7;
|
byte unused4_7;
|
||||||
|
@ -401,8 +402,8 @@ struct config4 {
|
||||||
byte iacStepHyster; //Hysteresis temperature (*10). Eg 2.2C = 22
|
byte iacStepHyster; //Hysteresis temperature (*10). Eg 2.2C = 22
|
||||||
|
|
||||||
byte fanInv : 1; // Fan output inversion bit
|
byte fanInv : 1; // Fan output inversion bit
|
||||||
byte fanEnable : 2; // Fan enable bit. 0=Off, 1=On/Off, 2=PWM
|
byte fanEnable : 1; // Fan enable bit. 0=Off, 1=On/Off
|
||||||
byte unused : 5;
|
byte fanPin : 5;
|
||||||
byte fanSP; // Cooling fan start temperature
|
byte fanSP; // Cooling fan start temperature
|
||||||
byte fanHyster; // Fan hysteresis
|
byte fanHyster; // Fan hysteresis
|
||||||
byte fanFreq; // Fan PWM frequency
|
byte fanFreq; // Fan PWM frequency
|
||||||
|
|
|
@ -242,19 +242,14 @@ page = 4
|
||||||
FixAng = scalar, U08, 2, "Deg", 1, 0, 0, 80, 0
|
FixAng = scalar, U08, 2, "Deg", 1, 0, 0, 80, 0
|
||||||
CrankAng = scalar, U08, 3, "Deg", 1, 0, -10, 80, 0
|
CrankAng = scalar, U08, 3, "Deg", 1, 0, -10, 80, 0
|
||||||
TrigAngMul = scalar, U08, 4, "", 1, 0, 0, 88, 0 ; Multiplier for tooth counts that don't evenly divide into 360
|
TrigAngMul = scalar, U08, 4, "", 1, 0, 0, 88, 0 ; Multiplier for tooth counts that don't evenly divide into 360
|
||||||
TrigEdge = bits, U08, 5[0:0], "Leading", "Trailing"
|
TrigEdge = bits, U08, 5,[0:0], "Leading", "Trailing"
|
||||||
TrigSpeed = bits, U08, 5[1:1], "Crank Speed", "Cam Speed"
|
TrigSpeed = bits, U08, 5,[1:1], "Crank Speed", "Cam Speed"
|
||||||
IgInv = bits, U08, 5[2:2], "Going Low", "Going High"
|
IgInv = bits, U08, 5,[2:2], "Going Low", "Going High"
|
||||||
oddfire = bits, U08, 5[3:3], "No", "Yes"
|
oddfire = bits, U08, 5,[3:3], "No", "Yes"
|
||||||
TrigPattern= bits, U08, 5[4:7], "Missing Tooth", "Basic Distributor", "Dual Wheel", "GM 7X", "4G63 / Miata", "GM 24X", "Jeep 2000", "Audi 135", "Honda D17", "Miata 99-05", "Mazda AU", "Non-360 Dual", "INVALID", "INVALID", "INVALID", "INVALID"
|
TrigPattern= bits, U08, 5,[4:7], "Missing Tooth", "Basic Distributor", "Dual Wheel", "GM 7X", "4G63 / Miata", "GM 24X", "Jeep 2000", "Audi 135", "Honda D17", "Miata 99-05", "Mazda AU", "Non-360 Dual", "INVALID", "INVALID", "INVALID", "INVALID"
|
||||||
TrigEdgeSec= bits, U08, 6[0:0], "Leading", "Trailing"
|
TrigEdgeSec= bits, U08, 6,[0:0], "Leading", "Trailing"
|
||||||
unused4-6b = bits, U08, 6[1:1], "No", "Yes"
|
fuelPumpPin= bits , U08, 6,[1:6], "Board Default", "1", "2", "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", "54", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
|
||||||
unused4-6c = bits, U08, 6[2:2], "No", "Yes"
|
unused4-6h = bits, U08, 6,[7:7], "No", "Yes"
|
||||||
unused4-6d = bits, U08, 6[3:3], "No", "Yes"
|
|
||||||
unused4-6e = bits, U08, 6[4:4], "No", "Yes"
|
|
||||||
unused4-6f = bits, U08, 6[5:5], "No", "Yes"
|
|
||||||
unused4-6g = bits, U08, 6[6:6], "No", "Yes"
|
|
||||||
unused4-6h = bits, U08, 6[7:7], "No", "Yes"
|
|
||||||
unused4-7 = scalar, U08, 7, "ADC", 1, 0, 0, 255, 0
|
unused4-7 = scalar, U08, 7, "ADC", 1, 0, 0, 255, 0
|
||||||
IdleAdvRPM = scalar, U08, 8, "RPM", 100, 0, 0, 1200, 0
|
IdleAdvRPM = scalar, U08, 8, "RPM", 100, 0, 0, 1200, 0
|
||||||
#if CELSIUS
|
#if CELSIUS
|
||||||
|
@ -442,12 +437,8 @@ page = 7
|
||||||
|
|
||||||
; Begin fan control vairables
|
; Begin fan control vairables
|
||||||
fanInv = bits, U08, 56, [0:0], "No", "Yes"
|
fanInv = bits, U08, 56, [0:0], "No", "Yes"
|
||||||
fanEnable = bits, U08, 56, [1:2], "Off", "On/Off", "INVALID", "INVALID"
|
fanEnable = bits, U08, 56, [1:1], "Off", "On/Off"
|
||||||
unused7-55b = bits, U08, 56, [3:3], "No", "Yes"
|
fanPin = bits , U08, 56, [2:7], "Board Default", "1", "2", "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", "54", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
|
||||||
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
|
#if CELSIUS
|
||||||
fanSP = scalar, U08, 57, "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
|
fanHyster = scalar, U08, 58, "C", 1.0, -40, -40, 215.0, 0
|
||||||
|
@ -570,6 +561,8 @@ page = 9
|
||||||
defaultValue = flexFuelHigh, 163
|
defaultValue = flexFuelHigh, 163
|
||||||
defaultValue = flexAdvLow, 0
|
defaultValue = flexAdvLow, 0
|
||||||
defaultValue = flexAdvHigh, 13
|
defaultValue = flexAdvHigh, 13
|
||||||
|
defaultValue = fuelPumpPin, 0
|
||||||
|
defaultValue = fanPin, 0
|
||||||
|
|
||||||
|
|
||||||
[Menu]
|
[Menu]
|
||||||
|
@ -646,6 +639,7 @@ menuDialog = main
|
||||||
menu = "&Accessories"
|
menu = "&Accessories"
|
||||||
subMenu = fanSettings, "Thermo Fan"
|
subMenu = fanSettings, "Thermo Fan"
|
||||||
subMenu = LaunchControl, "Launch Control"
|
subMenu = LaunchControl, "Launch Control"
|
||||||
|
subMenu = fuelpump, "Fuel Pump"
|
||||||
subMenu = std_separator
|
subMenu = std_separator
|
||||||
subMenu = boostSettings, "Boost Control"
|
subMenu = boostSettings, "Boost Control"
|
||||||
subMenu = boostTbl, "Boost target", 8, { boostEnabled }
|
subMenu = boostTbl, "Boost target", 8, { boostEnabled }
|
||||||
|
@ -914,9 +908,10 @@ menuDialog = main
|
||||||
|
|
||||||
dialog = fanSettings,"Fan Settings",7
|
dialog = fanSettings,"Fan Settings",7
|
||||||
field = "Fan Mode", fanEnable
|
field = "Fan Mode", fanEnable
|
||||||
field = "Fan Output Inverted", fanInv
|
field = "Fan output pin", fanPin, { fanEnable }
|
||||||
field = "Fan temperature SP", fanSP
|
field = "Fan Output Inverted", fanInv , { fanEnable }
|
||||||
field = "Fan hysteresis", fanHyster
|
field = "Fan temperature SP", fanSP, { fanEnable }
|
||||||
|
field = "Fan hysteresis", fanHyster, { fanEnable }
|
||||||
|
|
||||||
dialog = stepper_idle, "Stepper Idle"
|
dialog = stepper_idle, "Stepper Idle"
|
||||||
field = "Step time (ms)", iacStepTime, { iacAlgorithm == 4 || iacAlgorithm == 5 }
|
field = "Step time (ms)", iacStepTime, { iacAlgorithm == 4 || iacAlgorithm == 5 }
|
||||||
|
@ -942,6 +937,8 @@ menuDialog = main
|
||||||
panel = stepper_idle
|
panel = stepper_idle
|
||||||
panel = closedloop_idle
|
panel = closedloop_idle
|
||||||
|
|
||||||
|
dialog = fuelpump, "Fuel pump"
|
||||||
|
field = "Fuel pump pin", fuelPumpPin
|
||||||
|
|
||||||
dialog = crankPW, "Cranking Pulsewidths (ms)"
|
dialog = crankPW, "Cranking Pulsewidths (ms)"
|
||||||
field = "Cranking RPM (Max)", crankRPM
|
field = "Cranking RPM (Max)", crankRPM
|
||||||
|
|
|
@ -329,6 +329,8 @@ void setPinMapping(byte boardID)
|
||||||
if(configPage3.launchPin != 0) { pinLaunch = configPage3.launchPin; }
|
if(configPage3.launchPin != 0) { pinLaunch = configPage3.launchPin; }
|
||||||
if(configPage2.ignBypassPin != 0) { pinIgnBypass = configPage2.ignBypassPin; }
|
if(configPage2.ignBypassPin != 0) { pinIgnBypass = configPage2.ignBypassPin; }
|
||||||
if(configPage1.tachoPin != 0) { pinTachOut = configPage1.tachoPin; }
|
if(configPage1.tachoPin != 0) { pinTachOut = configPage1.tachoPin; }
|
||||||
|
if(configPage2.fuelPumpPin != 0) { pinFuelPump = configPage2.fuelPumpPin; }
|
||||||
|
if(configPage4.fanPin != 0) { pinFan = configPage4.fanPin; }
|
||||||
|
|
||||||
//Finally, set the relevant pin modes for outputs
|
//Finally, set the relevant pin modes for outputs
|
||||||
pinMode(pinCoil1, OUTPUT);
|
pinMode(pinCoil1, OUTPUT);
|
||||||
|
|
Loading…
Reference in New Issue