Additional work on knock control dialogs. Fix for aux in error appearing

This commit is contained in:
Josh Stewart 2018-08-02 15:25:12 +10:00
parent e941f39596
commit 6ad046c398
1 changed files with 84 additions and 49 deletions

View File

@ -722,39 +722,39 @@ page = 9
;wueAFRRates = array, U08, 107, [10], "%", 1.0, 0.0, 0.0, 255, 0
;wueAFRBins = array, U08, 117, [10], "C", 1.0, -40, -40, 102.0, 0
Auxin0pina = bits, U08, 121, [0:6], $ANALOG_PIN
Auxin1pina = bits, U08, 122, [0:6], $ANALOG_PIN
Auxin2pina = bits, U08, 123, [0:6], $ANALOG_PIN
Auxin3pina = bits, U08, 124, [0:6], $ANALOG_PIN
Auxin4pina = bits, U08, 125, [0:6], $ANALOG_PIN
Auxin5pina = bits, U08, 126, [0:6], $ANALOG_PIN
Auxin6pina = bits, U08, 127, [0:6], $ANALOG_PIN
Auxin7pina = bits, U08, 128, [0:6], $ANALOG_PIN
Auxin8pina = bits, U08, 129, [0:6], $ANALOG_PIN
Auxin9pina = bits, U08, 130, [0:6], $ANALOG_PIN
Auxin10pina = bits, U08, 131, [0:6], $ANALOG_PIN
Auxin11pina = bits, U08, 132, [0:6], $ANALOG_PIN
Auxin12pina = bits, U08, 133, [0:6], $ANALOG_PIN
Auxin13pina = bits, U08, 134, [0:6], $ANALOG_PIN
Auxin14pina = bits, U08, 135, [0:6], $ANALOG_PIN
Auxin15pina = bits, U08, 136, [0:6], $ANALOG_PIN
Auxin0pina = bits, U08, 121, [0:5], $ANALOG_PIN
Auxin1pina = bits, U08, 122, [0:5], $ANALOG_PIN
Auxin2pina = bits, U08, 123, [0:5], $ANALOG_PIN
Auxin3pina = bits, U08, 124, [0:5], $ANALOG_PIN
Auxin4pina = bits, U08, 125, [0:5], $ANALOG_PIN
Auxin5pina = bits, U08, 126, [0:5], $ANALOG_PIN
Auxin6pina = bits, U08, 127, [0:5], $ANALOG_PIN
Auxin7pina = bits, U08, 128, [0:5], $ANALOG_PIN
Auxin8pina = bits, U08, 129, [0:5], $ANALOG_PIN
Auxin9pina = bits, U08, 130, [0:5], $ANALOG_PIN
Auxin10pina = bits, U08, 131, [0:5], $ANALOG_PIN
Auxin11pina = bits, U08, 132, [0:5], $ANALOG_PIN
Auxin12pina = bits, U08, 133, [0:5], $ANALOG_PIN
Auxin13pina = bits, U08, 134, [0:5], $ANALOG_PIN
Auxin14pina = bits, U08, 135, [0:5], $ANALOG_PIN
Auxin15pina = bits, U08, 136, [0:5], $ANALOG_PIN
Auxin0pinb = bits, U08, 137, [0:6], $DIGITAL_PIN
Auxin1pinb = bits, U08, 138, [0:6], $DIGITAL_PIN
Auxin2pinb = bits, U08, 139, [0:6], $DIGITAL_PIN
Auxin3pinb = bits, U08, 140, [0:6], $DIGITAL_PIN
Auxin4pinb = bits, U08, 141, [0:6], $DIGITAL_PIN
Auxin5pinb = bits, U08, 142, [0:6], $DIGITAL_PIN
Auxin6pinb = bits, U08, 143, [0:6], $DIGITAL_PIN
Auxin7pinb = bits, U08, 144, [0:6], $DIGITAL_PIN
Auxin8pinb = bits, U08, 145, [0:6], $DIGITAL_PIN
Auxin9pinb = bits, U08, 146, [0:6], $DIGITAL_PIN
Auxin10pinb = bits, U08, 147, [0:6], $DIGITAL_PIN
Auxin11pinb = bits, U08, 148, [0:6], $DIGITAL_PIN
Auxin12pinb = bits, U08, 149, [0:6], $DIGITAL_PIN
Auxin13pinb = bits, U08, 150, [0:6], $DIGITAL_PIN
Auxin14pinb = bits, U08, 151, [0:6], $DIGITAL_PIN
Auxin15pinb = bits, U08, 152, [0:6], $DIGITAL_PIN
Auxin0pinb = bits, U08, 137, [0:5], $DIGITAL_PIN
Auxin1pinb = bits, U08, 138, [0:5], $DIGITAL_PIN
Auxin2pinb = bits, U08, 139, [0:5], $DIGITAL_PIN
Auxin3pinb = bits, U08, 140, [0:5], $DIGITAL_PIN
Auxin4pinb = bits, U08, 141, [0:5], $DIGITAL_PIN
Auxin5pinb = bits, U08, 142, [0:5], $DIGITAL_PIN
Auxin6pinb = bits, U08, 143, [0:5], $DIGITAL_PIN
Auxin7pinb = bits, U08, 144, [0:5], $DIGITAL_PIN
Auxin8pinb = bits, U08, 145, [0:5], $DIGITAL_PIN
Auxin9pinb = bits, U08, 146, [0:5], $DIGITAL_PIN
Auxin10pinb = bits, U08, 147, [0:5], $DIGITAL_PIN
Auxin11pinb = bits, U08, 148, [0:5], $DIGITAL_PIN
Auxin12pinb = bits, U08, 149, [0:5], $DIGITAL_PIN
Auxin13pinb = bits, U08, 150, [0:5], $DIGITAL_PIN
Auxin14pinb = bits, U08, 151, [0:5], $DIGITAL_PIN
Auxin15pinb = bits, U08, 152, [0:5], $DIGITAL_PIN
;unused10_137 = scalar, U08, 137, "", 1, 0, 0, 255, 0
;unused10_138 = scalar, U08, 138, "", 1, 0, 0, 255, 0
@ -876,12 +876,12 @@ page = 10
; Knock settings
knock_mode = bits , U08, 92, [0:1], "Off","Digital","Analog", "INVALID"
knock_pin = bits , U08, 92, [2:7], $IO_Pins_no_def
knock_pin = bits , U08, 92, [2:7], "INVALID", "INVALID", "2", "3", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "18", "19", "20", "21", "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", "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "INVALID"
knock_trigger = bits , U08, 93, [0:0], "HIGH", "LOW"
knock_pullup = bits , U08, 93, [1:1], "Off", "Internal pullup"
knock_limiterDisable= bits , U08, 93, [2:2], "No", "Yes"
knock_unused = bits , U08, 93, [3:4], "INVALID", "1", "2", "3",
knock_unused = bits , U08, 93, [3:4], "INVALID", "1", "2", "3"
;Knock detection / filters
knock_count = bits , U08, 93, [5:7], "INVALID", "1", "2", "3", "4", "5", "6", "INVALID"
@ -944,6 +944,10 @@ page = 10
requiresPowerCycle = n2o_enable
requiresPowerCycle = n2o_arming_pin
requiresPowerCycle = n2o_pin_polarity
requiresPowerCycle = knock_mode
requiresPowerCycle = knock_pin
requiresPowerCycle = knock_trigger
requiresPowerCycle = knock_pullup
defaultValue = pinLayout, 1
defaultValue = TrigPattern, 0
@ -1090,12 +1094,12 @@ menuDialog = main
subMenu = stagingTableDialog, "Staged Injection", 10, { nCylinders <= 4 } ; Can't do staging on more than 4 cylinder engines
menu = "&Spark"
subMenu = sparkSettings, "Spark Settings"
subMenu = sparkTbl, "Spark Table", 2
subMenu = dwellSettings, "Dwell settings"
subMenu = sparkSettings, "Spark Settings"
subMenu = sparkTbl, "Spark Table", 2
subMenu = dwellSettings, "Dwell settings"
subMenu = dwell_correction_curve, "Dwell Compensation"
subMenu = iat_retard_curve, "&IAT Retard"
subMenu = knockSettings, "Knock Settings"
subMenu = iat_retard_curve, "IAT Retard"
subMenu = knockSettings, "Knock Settings"
subMenu = rotary_ignition, "Rotary Ignition", { sparkMode == 4 }
menu = "&Starting/Idle"
@ -1189,7 +1193,7 @@ menuDialog = main
sparkMode = "Wasted Spark: Ignition outputs are on the channels <= half the number of cylinders. Eg 4 cylinder outputs on IGN1 and IGN2.\nSingle Channel: All ignition pulses are output on IGN1.\nWasted COP: Ignition pulses are output on all ignition channels up to the number of cylinders. Eg 4 cylinder outputs on all ignition channels. No valid for >4 cylinders"
IgInv = "Whether the spark fires when the ignition signal goes high or goes low. Nearly all ignition systems use 'Going Low' but please verify this as damage to coils can result from the incorrect selection. (NOTE: THIS IS NOT MEGASQUIRT. THIS SETTING IS USUALLY THE OPPOSITE OF WHAT THEY USE!)"
sparkDur = "The duration of the spark at full dwell. Typically around 1ms"
fixAngEnable= "If enabled, timing will be locked/fixed and the ignition map will be ignored"
fixAngEnable= "If enabled, timing will be locked/fixed and the ignition map will be ignored. Note that this value will be overriden by the fixed cranking value when cranking"
FixAng = "Timing will be locked at this value if the above is enabled"
crankRPM = "The cranking RPM threshold. When RPM is lower than this value (and above 0) the system will be considered to be cranking"
@ -1426,14 +1430,44 @@ menuDialog = main
panel = flexCurves, South
; Knock control settings
dialog = knock_windows, "", xAxis
panel = knock_window_angle_curve, West
panel = knock_window_duration_curve, East
dialog = knock_windows, "Knock Windows", xAxis
panel = knock_window_angle_curve, West, { knock_mode }
panel = knock_window_duration_curve, East, { knock_mode }
dialog = knockSettings
field = "Knock Mode", knock_mode
field = "Knock Pin", knock_pin, { knock_mode }
dialog = knock_settings_west, "Settings", yAxis
field = "Knock Mode", knock_mode
field = "Knock Pin", knock_pin, { knock_mode }
field = "Knock active when pin is", knock_trigger, { knock_mode == 1 }
field = "Use pullup", knock_pullup, { knock_mode == 1 }
dialog = knock_settings_east, "Detection and Response"
field = "#Detection"
field = "Knock count required", knock_count, { knock_mode == 1}
field = "Knock threshold required", knock_threshold, { knock_mode == 2}
field = "Maximum MAP", knock_maxMAP, { knock_mode }
field = "Maximum RPM", knock_maxRPM, { knock_mode }
;Retard and recovery
field = "#Retard"
field = "Total retard", knock_maxRetard, { knock_mode }
field = "First step size", knock_firstStep, { knock_mode }
field = "Other step size", knock_stepSize, { knock_mode }
field = "Step time", knock_stepTime, { knock_mode }
field = "#Recovery"
field = "Retard duration", knock_duration, { knock_mode } ;Time before retard starts ending
field = "Recovery step time", knock_recoveryStepTime, { knock_mode } ;Time between each recovery step
field = "Recovery step size", knock_recoveryStep, { knock_mode }
dialog = knock_settings_top, "", xAxis
panel = knock_settings_west, West
panel = knock_settings_east, East
dialog = knockSettings, "", border
topicHelp = "http://speeduino.com/wiki/index.php/Knock"
panel = knock_settings_top, North
panel = knock_windows, South
dialog = tacho, "Tacho"
@ -1610,6 +1644,7 @@ menuDialog = main
field = ""
field = "Enabled Fixed/Locked timing", fixAngEnable
field = "Fixed Angle", FixAng, { fixAngEnable }
field = "#Note: During cranking the fixed/locked timing angle is overriden by the Cranking advance angle value above"
dialog = dwellSettings, "Dwell Settings", 4
topicHelp = "http://speeduino.com/wiki/index.php/Dwell"
@ -2493,15 +2528,15 @@ cmdtestspk450dc = "E\x03\x0C"
;Knock sensor windows
curve = knock_window_angle_curve, "Knock Window"
columnLabel = "RPM", "Window Start"
xAxis = 0, 8000, 8
xAxis = 0, 8000, 9
yAxis = -100, 100, 11
xBins = knock_window_rpms, rpm
yBins = knock_window_angle
size = 400, 200
curve = knock_window_duration_curve, "Knock Duration"
curve = knock_window_duration_curve, "Knock Window Duration"
columnLabel = "RPM", "Window Duration"
xAxis = 0, 8000, 8
xAxis = 0, 8000, 9
yAxis = 0, 100, 10
xBins = knock_window_rpms, rpm
yBins = knock_window_dur