788 lines
27 KiB
INI
788 lines
27 KiB
INI
;-------------------------------------------------------------------------------
|
|
; Set all config variables are visible
|
|
#set USE_CRC_DATA_CHECK
|
|
#set CAN_PASSTHROUGH
|
|
|
|
|
|
|
|
|
|
[MegaTune]
|
|
|
|
MTversion = 2.25 ; MegaTune itself; needs to match exec version.
|
|
|
|
#if CAN_PASSTHROUGH
|
|
; Big endian format for CAN comms!!!!!
|
|
versionInfo = "r\$tsCanId\x0e\x00\x00\x00\x14" ; Title bar
|
|
queryCommand = "r\$tsCanId\x0f\x00\x00\x00\x14" ; Verify against signature.
|
|
;signature = "DMLab DBW V2.00 " ; ECU sends a null at 20th byte.
|
|
|
|
#else
|
|
; little endian format for serial comms
|
|
versionInfo = "r\$tsCanId\x0e\x00\x00\x14\x00" ; Title bar
|
|
queryCommand = "r\$tsCanId\x0f\x00\x00\x14\x00" ; Verify against signature.
|
|
|
|
;using valid signature for development purpose only. MUST BE DELETED OR CORRECTED in realese
|
|
;signature = "speeduino dbw_v0.80" ; ECU sends a null at 20th byte.
|
|
|
|
#endif
|
|
|
|
signature = "speeduino DBW 2.0.0"
|
|
;signature = "MS3 test signature "
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
[TunerStudio]
|
|
iniSpecVersion = 3.0
|
|
|
|
[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.
|
|
|
|
;tsCanId = bits, U08, [0:3] ; The short one, just numbers
|
|
tsCanId = bits, U08, [0:3], "CAN ID 0", "CAN ID 1", "CAN ID 2", "CAN ID 3", "CAN ID 4", "CAN ID 5", "CAN ID 6", "CAN ID 7", "CAN ID 8", "CAN ID 9", "CAN ID 10","CAN ID 11","CAN ID 12","CAN ID 13","CAN ID 14","INVALID"
|
|
|
|
[ReferenceTables]
|
|
|
|
|
|
|
|
[Constants]
|
|
|
|
|
|
pageActivationDelay = 256
|
|
blockReadTimeout = 256
|
|
tsWriteBlocks = on
|
|
writeBlocks = on
|
|
interWriteDelay = 0
|
|
|
|
|
|
|
|
|
|
endianness = little
|
|
nPages = 1
|
|
pageSize = 856
|
|
|
|
|
|
pageIdentifier = "\$tsCanId\x01"
|
|
burnCommand = "b\$tsCanId\x01"
|
|
pageReadCommand = "r\$tsCanId\x01%2o%2c"
|
|
pageValueWrite = "w\$tsCanId\x01\%2o%2c%v"
|
|
#if USE_CRC_DATA_CHECK
|
|
crc32CheckCommand = "k\$tsCanId\x01\x00\x00\x00\x00"
|
|
#endif
|
|
|
|
|
|
|
|
|
|
blockingFactor = 2048
|
|
|
|
|
|
page = 1
|
|
; name =class, type, offset, shape, units, scale, translate, lo, hi, digits
|
|
|
|
|
|
pps_calc_option =bits, U08, 0, [0:0], "Linear","Polynomal";
|
|
tps_calc_option =bits, U08, 1, [0:0], "Linear","Polynomal";
|
|
|
|
pps1_min =scalar, U16, 2, "ADC", 1, 0, 0, 4095, 0;
|
|
pps1_max =scalar, U16, 4, "ADC", 1, 0, 0, 4095, 0;
|
|
pps2_min =scalar, U16, 6, "ADC", 1, 0, 0, 4095, 0;
|
|
pps2_mid =scalar, U16, 8, "ADC", 1, 0, 0, 4095, 0;
|
|
pps2_mid_pct =scalar, U16, 10, "%", 0.1, 0, 0, 100, 1;
|
|
pps2_max =scalar, U16, 12, "ADC", 1, 0, 0, 4095, 0;
|
|
|
|
tps1_min =scalar, U16, 14, "ADC", 1, 0, 0, 4095, 0;
|
|
tps1_max =scalar, U16, 16, "ADC", 1, 0, 0, 4095, 0;
|
|
tps2_min =scalar, U16, 18, "ADC", 1, 0, 0, 4095, 0;
|
|
tps2_mid =scalar, U16, 20, "ADC", 1, 0, 0, 4095, 0;
|
|
tps2_mid_pct =scalar, U16, 22, "%", 0.1, 0, 0, 100, 1;
|
|
tps2_max =scalar, U16, 24, "ADC", 1, 0, 0, 4095, 0;
|
|
|
|
pps2tps_option =bits, U08, 26, [0:0], "Curve","MS3 CAN bus";
|
|
idle_input_option =bits, U08, 27, [0:1], "Disabled","PWM input 1", "PWM input 2", "MS2/3 CAN Advanced BSCT";
|
|
|
|
|
|
pps_bins =array, S16, 28, [16], "%", 0.1, 0, -10, 110, 1;
|
|
tps_bins =array, S16, 60, [16], "%", 0.1, 0, -10, 110, 1;
|
|
|
|
|
|
idle_input_bins=array, S16, 92, [8], "%", 0.1, 0, 0, 100, 1;
|
|
idle_tps_adder_bins=array, S16, 108, [8], "%", 0.1, 0, -30, 30, 1;
|
|
|
|
;124
|
|
motor_pwm_fq =scalar, U16, 124, "Hz", 1, 0, 300, 5000, 0;
|
|
motor_ctl_period=scalar, U16, 126, "mS", 1, 0, 1, 100, 0;
|
|
motor_pid_option=bits, U16, 128, [0:1], "STATIC", "STATIC FW-RW", "TABLE", "INVALID" ;
|
|
|
|
|
|
|
|
motor_fw_p =scalar, S16, 130, "", 0.001, 0, -1, 5, 3
|
|
motor_fw_i =scalar, S16, 132, "", 0.001, 0, -1, 5, 3
|
|
motor_fw_d =scalar, S16, 134, "", 0.001, 0, -1, 5, 3
|
|
motor_rw_p =scalar, S16, 136, "", 0.001, 0, -1, 5, 3
|
|
motor_rw_i =scalar, S16, 138, "", 0.001, 0, -1, 5, 3
|
|
motor_rw_d =scalar, S16, 140, "", 0.001, 0, -1, 5, 3
|
|
|
|
|
|
|
|
|
|
motor_p_tps_bins=array, S16, 142, [16], "%", 0.1, 0, -10, 110, 1;
|
|
motor_p_error_bins=array, S16, 174, [16], "%", 0.1, 0, -100, 100, 1;
|
|
motor_p_table =array, S16, 206, [16x16], "", 0.001, 0, -1; 5, 3;
|
|
;720
|
|
|
|
i_limmit =scalar, S16, 718, "%", 0.01, 0, 0, 100, 1;
|
|
motor_dc_max =scalar, S16, 720, "%", 0.01, 0, 0, 100, 1;
|
|
motor_dc_min =scalar, S16, 722, "%", 0.01, 0, -100, 0, 1;
|
|
|
|
|
|
|
|
|
|
tps_dc_tps_bins=array, S16, 724, [16], "%", 0.1, 0, -10, 110, 1;
|
|
tps_dc_offset_bins=array, S16, 756, [16], "%", 0.01, 0, -50, 70, 1;
|
|
;790
|
|
|
|
vbat_bins =array, U16, 788, [8], "V", 0.0062842, 0, 0, 25, 1;
|
|
motor_pwm_corr_bins=array, S16, 804, [8], "%", 0.1, 0, -100, 200, 1;
|
|
pwm_deadtime =scalar, U16, 820, "uS", 1, 0, 0, 500, 0;
|
|
|
|
can_dbw_id =scalar, U16, 822, "", 1, 0, 1, 2040, 0;
|
|
can_idle_base_id=scalar, U16, 824, "", 1, 0, 1, 1983, 0;
|
|
|
|
config_bits_agreement =bits, U16, 826, [0:0], "Disagree", "Agree";
|
|
config_bits_calibrated =bits, U16, 826, [1:1], "Not calibrated", "Calibrated";
|
|
config_bits_safety =bits, U16, 826, [3:3], "Disabled", "Enabled";
|
|
|
|
pps1_margin =scalar, U16, 828, "ADC", 1, 0, 0, 500, 0;
|
|
pps2_margin =scalar, U16, 830, "ADC", 1, 0, 0, 500, 0;
|
|
pps_delta_margin =scalar, S16, 832, "%", 0.1, 0, 0, 500, 1;
|
|
|
|
|
|
tps1_margin =scalar, U16, 834, "ADC", 1, 0, 0, 500, 0;
|
|
tps2_margin =scalar, U16, 836, "ADC", 1, 0, 0, 500, 0;
|
|
tps_delta_margin =scalar, S16, 838, "%", 0.1, 0, 0, 500, 1;
|
|
|
|
|
|
tps_error_margin1 =scalar, S16, 840, "%", 0.1, 0, 0, 200, 1;
|
|
tps_error_time1 =scalar, U16, 842, "mS", 1, 0, 0, 10000, 0;
|
|
|
|
|
|
tps_error_margin2 =scalar, S16, 844, "%", 0.1, 0, 0, 200, 1;
|
|
tps_error_time2 =scalar, U16, 846, "mS", 1, 0, 0, 10000, 0;
|
|
|
|
;848
|
|
|
|
can_dbw_poll_perod =scalar, U16, 848, "mS", 1, 0, 3, 50, 0;
|
|
|
|
|
|
can_ms29bit_id =scalar, U08, 850, "", 1, 0, 1, 14, 0;
|
|
can_ms29bit_options =bits, U08, 851, [0:0], "Disabled", "Enabled" ;
|
|
|
|
|
|
can_bcst_data_enable=bits, U08, 852, [0:0], "Disabled", "Enabled" ;
|
|
can_bcst_data_period=scalar, U08, 853, "mS", 1, 0, 10, 200, 0;
|
|
can_bcst_canid =scalar, U16, 854, "", 1, 0, 1, 2047, 0;
|
|
|
|
;856
|
|
|
|
|
|
|
|
[Menu]
|
|
|
|
menuDialog = main
|
|
menu = "Controller Calibration"
|
|
subMenu = setup_c, "Configure this first !!!!"
|
|
subMenu =pps_cal, "PPS Calibration"
|
|
subMenu =tps_cal, "TPS Calibration"
|
|
subMenu =gen, "General Settings"
|
|
subMenu =pps2tps_c, "TPS Target"
|
|
subMenu = Ptable,"Proportional gain table", {motor_pid_option ==2}
|
|
subMenu =idle_c, "Idle Control TPS adder", {idle_input_option !=0}
|
|
subMenu = dc_c, "DC Bias correction"
|
|
subMenu = vbat_c, "Battery voltage compensation"
|
|
subMenu = can, "CAN bus settings"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[ControllerCommands]
|
|
;
|
|
cmd_apply = "z\$tsCanId\x01\x00\x00\x00\x01"
|
|
cmd_tesmode_on = "z\$tsCanId\x01\x00\x00\x00\x02"
|
|
cmd_tesmode_off = "z\$tsCanId\x01\x00\x00\x00\x03"
|
|
cmd_autocal = "z\$tsCanId\x01\x00\x00\x00\x04"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
[UserDefined]
|
|
; define a MegaTune compatible version here
|
|
; no need to for std_enrichments, it is built in.
|
|
|
|
;Testmode
|
|
;------------------------------------------------------------------------------
|
|
|
|
;dialog = outputTestbuttons1a, "", xAxis
|
|
;commandButton = "Label Text", command, { Enabled Condition }, optionalFlags
|
|
; The rem > 0 expression is just for testing.. It works when the MS is on the Stim with rpm.
|
|
; a status bit there would be the expected real expression
|
|
;commandButton = "Enable Test Mode", cmdEnterTestMode, { (!(status3 & 8)) && (rpm == 0)}
|
|
|
|
; if clickOnCloseIfEnabled is set, then the command assigned to this button will be run on the
|
|
; dialog close, but only if the enable condition is true
|
|
; valid click flags are:
|
|
; clickOnCloseIfEnabled - the command will be sent on dialog close if active condition is true
|
|
; clickOnCloseIfDisabled - the command will be sent on dialog close if active condition is false
|
|
; clickOnClose - the command will be sent on dialog close always
|
|
|
|
|
|
|
|
|
|
dialog = can_dbw, "Megasquirt 3 DBW integration"
|
|
|
|
field= "Tuning using MS CAN 29bit protocol", can_ms29bit_options
|
|
field= "Device ID on MS CAN [1..14]", can_ms29bit_id, {can_ms29bit_options==1}
|
|
|
|
dialog = can_bcst, "Data broadcast to CAN"
|
|
|
|
field = "Broadcast my data to CAN",can_bcst_data_enable
|
|
field = "Data broadcast period",can_bcst_data_period, {can_bcst_data_enable==1}
|
|
field = "Base ID for broadcast",can_bcst_canid , {can_bcst_data_enable==1}
|
|
|
|
|
|
dialog = can, "CAN bus settings"
|
|
panel = can_dbw
|
|
panel = can_bcst
|
|
|
|
|
|
;#################################
|
|
;PPS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dialog = safety_c, "Safety Functions"
|
|
field = "Safety Functions include TPS and PPS"
|
|
field = "ADC range checking. As well calculated position difference checking"
|
|
field = "on out of bound conditions DBW motor is unpowered"
|
|
field = "and controller enters in fault state."
|
|
field = "Configure PID regulator properly, "
|
|
field = "incorrect PID coeficients can led to uncontroled "
|
|
field = "throttle movement, which currently is not checked"
|
|
field = "However You can specify time and precision for throttle to"
|
|
field = "achieve target position"
|
|
field = "Safety features", config_bits_safety
|
|
|
|
dialog = agreement_c, "Agreement"
|
|
field = "This is experimental device!!!"
|
|
field = "This device cannot be used in safety critical applications"
|
|
field = "NOT TO BE USED ON PUBLIC ROAD VEHICLES!!!"
|
|
field = "NO ANY WARRANTY OR LIABILITY !!!"
|
|
field = "Select if You acept these terms"
|
|
field = "You are using this device on YOUR OWN LIABILITY"
|
|
field = "Please be responsible for what You are doing."
|
|
field = "Configure device properly and turn on safety functions"
|
|
field = "", config_bits_agreement;
|
|
|
|
|
|
dialog = setup_c, ""
|
|
panel = agreement_c
|
|
panel = safety_c
|
|
|
|
dialog = pps1_g,"", xAxis
|
|
gauge = pps1_adc_g
|
|
gauge = pps1_g
|
|
|
|
dialog = pps2_g,"", xAxis
|
|
gauge = pps2_adc_g
|
|
gauge = pps2_g
|
|
|
|
dialog = pps_g,"", xAxis
|
|
gauge = pps_delta_g
|
|
gauge = pps_g
|
|
|
|
dialog = pps_gauges, "", yAxis
|
|
panel = pps1_g
|
|
panel = pps2_g
|
|
panel = pps_g
|
|
|
|
dialog = pps_s, "Safety Settings"
|
|
field = "ADC count permitted above PPS1 100% adc count"
|
|
field = "or below PPS1 0% count"
|
|
field = "",pps1_margin
|
|
field = "ADC count permitted above PPS2 100% adc count"
|
|
field = "or below PPS2 0% count"
|
|
field = "",pps2_margin
|
|
;field = Maximum difference % between PPS1 and PPS2
|
|
field = "Maximum difference % between PPS1 and PPS2",pps_delta_margin
|
|
|
|
|
|
dialog = pps_p,""
|
|
field = "PPS1 0% ADC count", pps1_min;
|
|
field = "PPS1 100% ADC count", pps1_max;
|
|
;field = "PPS2 calculation method", pps_calc_option;
|
|
field = "PPS2 0% ADC count", pps2_min;
|
|
;field = "PPS2 middle position", pps2_mid_pct, {pps_calc_option == 1};
|
|
;field = "PPS2 middle ADC count", pps2_mid, {pps_calc_option == 1};
|
|
field = "PPS2 100% ADC count", pps2_max;
|
|
commandButton = "Apply", cmd_apply
|
|
field = "Switch on test mode to enable sensors"
|
|
commandButton = "TEST MODE ON", cmd_tesmode_on , {}
|
|
commandButton = "TEST MODE OFF", cmd_tesmode_off
|
|
panel = pps_s
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dialog = pps_cal, "PPS Calibration",xAxis
|
|
panel = pps_p
|
|
panel = pps_gauges
|
|
|
|
|
|
|
|
dialog = tps_s, "Safety Settings"
|
|
field = "ADC count permitted above TPS1 100% adc count"
|
|
field = "or below TPS1 0% count"
|
|
field = "",tps1_margin
|
|
field = "ADC count permitted above TPS2 100% adc count"
|
|
field = "or below TPS2 0% count"
|
|
field = "",tps2_margin
|
|
;field = Maximum difference % between TPS1 and TPS2
|
|
field = "Maximum difference % between TPS1 and TPS2",tps_delta_margin
|
|
field = "Movement control 1"
|
|
field = "Time to reach target position", tps_error_time1
|
|
field = "Precision to be achieved in specified time", tps_error_margin1
|
|
field = "Movement control 2"
|
|
field = "Time to reach target position", tps_error_time2
|
|
field = "Precision to be achieved in specified time", tps_error_margin2
|
|
|
|
|
|
|
|
|
|
;#################################
|
|
;TPS
|
|
|
|
dialog = tps1_g,"", xAxis
|
|
gauge = tps1_adc_g
|
|
gauge = tps1_g
|
|
|
|
dialog = tps2_g,"", xAxis
|
|
gauge = tps2_adc_g
|
|
gauge = tps2_g
|
|
|
|
dialog = tps_g,"", xAxis
|
|
gauge = tps_delta_g
|
|
gauge = tps_g
|
|
|
|
dialog = tps_gauges, "", yAxis
|
|
panel = tps1_g
|
|
panel = tps2_g
|
|
panel = tps_g
|
|
|
|
dialog = tps_p, "TPS Calibration",
|
|
|
|
field = "TPS1 0% ADC count", tps1_min;
|
|
field = "TPS1 100% ADC count", tps1_max;
|
|
;field = "TPS2 calculation method", tps_calc_option;
|
|
field = "TPS2 0% ADC count", tps2_min;
|
|
;field = "TPS2 middle position", tps2_mid_pct;
|
|
;field = "TPS2 middle ADC count", tps2_mid;
|
|
field = "TPS2 100% ADC count", tps2_max;
|
|
commandButton = "Apply", cmd_apply
|
|
commandButton = "TEST MODE ON", cmd_tesmode_on
|
|
commandButton = "TEST MODE OFF", cmd_tesmode_off
|
|
commandButton = "Autocalibrate TPS", cmd_autocal ,
|
|
panel = tps_s
|
|
|
|
|
|
dialog = tps_cal, "TPS Calibration",xAxis
|
|
panel = tps_p
|
|
panel = tps_gauges
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dialog = gen, "General Settings"
|
|
field = "PPS and TPS sensors are", config_bits_calibrated
|
|
field = "TPS target calculation", pps2tps_option
|
|
field = "MS3 DBW base CAN ID [decimal]", can_dbw_id, {pps2tps_option==1}
|
|
field = "TPS target poll period",can_dbw_poll_perod,, {pps2tps_option==1}
|
|
field = "Idle Control",idle_input_option
|
|
field = "MS2/MS3 BCST base CAN ID [decimal]", can_idle_base_id, {idle_input_option == 3}
|
|
field = "Motor PWM Frequency",motor_pwm_fq
|
|
field = "PID Control Period", motor_ctl_period
|
|
field = "PID Coefiicients",motor_pid_option
|
|
field = "Static/Forward P", motor_fw_p,{motor_pid_option <2}
|
|
field = "Static/Forward I",motor_fw_i
|
|
field = "Static/Forward D",motor_fw_d
|
|
field = "Backward P",motor_rw_p,{motor_pid_option ==1}
|
|
field = "Backward I",motor_rw_i,{motor_pid_option ==1}
|
|
field = "Backward D",motor_rw_d,{motor_pid_option ==1}
|
|
field = "Integral limit +/-",i_limmit
|
|
field = "Maximum PWM",motor_dc_max
|
|
field = "Minimum PWM",motor_dc_min
|
|
field = "Motor freewheel time", pwm_deadtime
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[UserDefinedTS]
|
|
|
|
|
|
[CurveEditor]
|
|
|
|
|
|
curve = pps2tps_c, "TPS Target"
|
|
columnLabel = "Pedal position", "Throttle Position"
|
|
xAxis = -10, 110, 12
|
|
yAxis = -10, 110, 12
|
|
xBins = pps_bins, pps
|
|
yBins = tps_bins
|
|
|
|
curve = idle_c, "Idle TPS Target adder"
|
|
columnLabel = "Idle input", "TPS target modifier"
|
|
xAxis = 0, 100, 10
|
|
yAxis = -10, 10, 10
|
|
xBins = idle_input_bins, idle_dc
|
|
yBins = idle_tps_adder_bins
|
|
|
|
curve = dc_c, "DC Bias"
|
|
columnLabel = "Throttle Position", "DC Bias"
|
|
xAxis = 0, 100, 10
|
|
yAxis = -10, 10, 10
|
|
xBins = tps_dc_tps_bins, tps
|
|
yBins = tps_dc_offset_bins
|
|
|
|
curve = vbat_c, "Battery voltage correction"
|
|
columnLabel = "Battery Voltage", "Correction"
|
|
xAxis = 0, 25, 10
|
|
yAxis = -200, 200, 10
|
|
xBins = vbat_bins, vbat
|
|
yBins = motor_pwm_corr_bins
|
|
|
|
|
|
|
|
|
|
|
|
[TableEditor]
|
|
; table_id, map3d_id, "title", page
|
|
|
|
; table = tKnockNoiceRefTable, mKnockNoiceRefTable, "Knock Noice Refference Table", 1 ; constant, variable
|
|
; xBins = KnockNoiceRpmBins, rpm
|
|
; yBins = KnockNoiceLoadBins, ignload
|
|
; zBins = KnockNoiceRefTable
|
|
|
|
; upDownLabel = "RICHER", "LEANER"
|
|
; gridHeight = 2.0
|
|
; gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
|
|
|
|
|
|
; table_id, map3d_id, "title", page
|
|
|
|
table = Ptable, Ptablemap, "P table", 1
|
|
xBins = motor_p_tps_bins, tps
|
|
yBins = motor_p_error_bins, tps_error
|
|
zBins = motor_p_table
|
|
gridHeight = 1.0
|
|
gridOrient = 250, 0, 340 ;
|
|
upDownLabel = "(More)", "(Less)"
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
[GaugeConfigurations]
|
|
|
|
;-------------------------------------------------------------------------------
|
|
; Notes on some of the gauges.
|
|
;
|
|
; The accelEnrichGauge is now a composite of both acceleration enrichment
|
|
; and deceleration enleanment numbers. See the definition of the variable
|
|
; accDecEnrich in the OutputChannels section.
|
|
;
|
|
; David Hooke contributed the lambda gauge and associated transfer
|
|
; function files.
|
|
;
|
|
; "The lambda gauge is the best way (my opinion) to report data from a
|
|
; wide band EGO gauge, it standardizes the output irrespective of fuel
|
|
; or mix of fuels, so you needn't do any brainwork to know if your 75%
|
|
; gasoline and 25% methanol is rich at 10:1 or not.
|
|
;
|
|
; "Use the file WBlambda100AVR.inc, if using a standard ADC (e.g., AVR cpu).
|
|
; Use the file WBlambda100MOT.inc, if using a biased ADC (e.g., MOT cpu)."
|
|
;-------------------------------------------------------------------------------
|
|
; Define a gauge's characteristics here, then go to a specific layout
|
|
; block (Tuning or FrontPage) and use the name you've defined here to
|
|
; display that gauge in a particular position.
|
|
;
|
|
; Name = Case-sensitive, user-defined name for this gauge configuration.
|
|
; Var = Case-sensitive name of variable to be displayed, see the
|
|
; OutputChannels block in this file for possible values.
|
|
; Title = Title displayed at the top of the gauge.
|
|
; Units = Units displayed below value on gauge.
|
|
; Lo = Lower scale limit of gauge.
|
|
; Hi = Upper scale limit of gauge.
|
|
; LoD = Lower limit at which danger color is used for gauge background.
|
|
; LoW = Lower limit at which warning color is used.
|
|
; HiW = Upper limit at which warning color is used.
|
|
; HiD = Upper limit at which danger color is used.
|
|
; vd = Decimal places in displayed value
|
|
; ld = Label decimal places for display of Lo and Hi, above.
|
|
|
|
;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld
|
|
|
|
|
|
|
|
; uptime_gauge =uptime, "Uptime Gauge", "S", 0, 3600, 0, 0, 100000, 100000, 0, 0;
|
|
|
|
; lambda_gauge =lambda, "Lambda", "", 0.6, 1.15, 0.7, 0.8, 1.3, 1.5, 3, 3;
|
|
; afr_gague =AFR, "AFR Gauge", "", 10, 20, 10.5, 11.5, 15.5, 16, 2, 2;
|
|
; s_AFR_gauge =s_AFR, "AFR Gauge", "", 10, 20, 10.5, 11.5, 15.5, 16, 2, 2;
|
|
|
|
|
|
clock_g =clock, "Uptime", "S", 0, 3600, 0, 0, 100000, 100000, 1, 1;
|
|
|
|
status0_g =status0, "STATUS 0", "", 0, 10000, 0, 0, 10000, 10000, 0, 0;
|
|
status1_g =status1, "STATUS 1", "", 0, 10000, 0, 0, 10000, 10000, 0, 0;
|
|
status2_g =status2, "STATUS 2", "", 0, 10000, 0, 0, 10000, 10000, 0, 0;
|
|
status3_g =status3, "STATUS 3", "", 0, 10000, 0, 0, 10000, 10000, 0, 0;
|
|
|
|
pps1_adc_g =pps1_adc, "PPS1 ADC", "", 0, 4095, 0, 0, 4095, 4095, 0, 0;
|
|
pps2_adc_g =pps2_adc, "PPS2 ADC", "", 0, 4095, 0, 0, 4095, 4095, 0, 0;
|
|
tps1_adc_g =tps1_adc, "TPS1 ADC", "", 0, 4095, 0, 0, 4095, 4095, 0, 0;
|
|
tps2_adc_g =tps2_adc, "TPS1 ADC", "", 0, 4095, 0, 0, 4095, 4095, 0, 0;
|
|
motor_current_adc_g=motor_current_adc, "Motor Current ADC","", 0, 4095, 0, 0, 4095, 4095, 0, 0;
|
|
motor_current_g =motor_current, "Motor Current","A", 0, 8, 0, 0, 5, 6.5, 2, 2;
|
|
vbat_adc_g =vbat_adc, "PPS1 ADC", "", 0, 4095, 0, 0, 4095, 4095, 0, 0;
|
|
vbat_g =vbat, "Battery Voltage","V", 5, 20, 0, 6.5, 15.5, 18, 1, 1;
|
|
|
|
|
|
|
|
pps1_g =pps1, "PPS1", "%", 0, 100, 0, 0, 100, 100, 1, 1;
|
|
pps2_g =pps2, "PPS2", "%", 0, 100, 0, 0, 100, 100, 1, 1;
|
|
tps1_g =tps1, "TPS1", "%", 0, 100, 0, 0, 100, 100, 1, 1;
|
|
tps2_g =tps2, "TPS2", "%", 0, 100, 0, 0, 100, 100, 1, 1;
|
|
pps_g =pps, "PPS", "%", 0, 100, 0, 0, 100, 100, 1, 1;
|
|
tps_g =tps, "TPS", "%", 0, 100, 0, 0, 100, 100, 1, 1;
|
|
tps_error_g =tps_error, "TPS ERROR", "%", -30,30, -30,-10,10, 30, 1, 1;
|
|
motor_pwm_g =motor_pwm, "Motor PWM", "%", -100,100, -100, -100,100,100, 1, 1;
|
|
idle_dc_g =idle_dc, "Idle input", "%", 0,100, 5, 7, 92, 97, 1, 1;
|
|
pps_delta_g =pps_delta, "PPS delta", "%", -10, 10, -7, -3, 3, 7, 1, 1;
|
|
tps_delta_g =tps_delta, "TPS Delta", "%", -10, 10, -7, -3, 3, 7, 1, 1;
|
|
tps_target_g =tps_target, "TPS Target", "%", 0, 100, 0, 0, 100, 100, 1, 1;
|
|
;-------------------------------------------------------------------------------
|
|
|
|
[FrontPage]
|
|
|
|
gauge1 = pps1_g
|
|
gauge2 = pps2_g
|
|
gauge3 = pps_g
|
|
gauge4 = tps1_g
|
|
gauge5 = tps2_g
|
|
gauge6 = tps_g
|
|
gauge7 = vbat_g
|
|
gauge8 = motor_current_g
|
|
|
|
;----------------------------------------------------------------------------
|
|
; Indicators
|
|
; expr off-label on-label, off-bg, off-fg, on-bg, on-fg
|
|
; indicator = { tpsaen }, "Not Accelerating", "AE", cyan, white, red, black
|
|
;
|
|
|
|
;indicator = { controller_status & 1} , "OK", "OK", white, black, green, black
|
|
; indicator = { controller_status & 2} , "FAULT", "FAULT", white, black, green, black
|
|
|
|
;controller_error_code =scalar, U16, 8, "", 1, 0;
|
|
;controller_status =scalar, U32, 0, "", 1, 0;
|
|
|
|
;#define DBW_STATUS0_READY_F 0x1
|
|
;#define DBW_STATUS0_AGREEMENT_F 0x2
|
|
;#define DBW_STATUS0_SENSOR_CAL_F 0x4
|
|
;#define DBW_STATUS0_FAULT_F 0x8
|
|
;#define DBW_STATUS0_CAN_MSDBW_F 0x10
|
|
;#define DBW_STATUS0_CAN_RX_BCST_F 0x20
|
|
;#define DBW_STATUS0_PWM_IDLE_F 0x40
|
|
;#define DBW_STATUS0_GPI1_F 0x80
|
|
;#define DBW_STATUS0_GPI2_F 0x100
|
|
;#define DBW_STATUS0_GPO1_F 0x200
|
|
;#define DBW_STATUS0_GPO2_F 0x400
|
|
;#define DBW_STATUS0_PPSTPS_CAL_F 0x800
|
|
;#define DBW_STATUS0_UNPROTECTED_F 0x1000
|
|
;#define DBW_STATUS0_CONF_ERROR_F 0x2000
|
|
;#define DBW_STATUS0_SENSOR_FAULT_F 0x4000
|
|
|
|
|
|
|
|
|
|
|
|
indicator = { status0 & 1} , "READY", "NOT READY", white, black, red, black ;
|
|
|
|
indicator = { status0 & 8} , "DRIVER FAULT", "DRIVER OK", white, black, red, black
|
|
indicator = { status0 & 16} , "MS3 DBW CAN OK", "MS3 DBW CAN FAULT", white, black, red, black
|
|
indicator = { status0 & 32} , "IDLE CAN OK", "IDLE CAN FAULT", white, black, red, black
|
|
indicator = { status0 & 64} , "PWM IDLE INPUT", "PWM IDLE INPUT FAULT", white, black, red, black
|
|
indicator = { status0 & 128} , "GPI1", "GPI1", white, black, red, black
|
|
indicator = { status0 & 256} , "GPI2", "GPI2", white, black, red, black
|
|
indicator = { status0 & 512} , "GPO1", "GPO1", white, black, red, black
|
|
indicator = { status0 & 1024} , "GPO2", "GPO2", white, black, red, black
|
|
indicator = { status0 & 2048} , "Autocalicration", "Autocalicration", white, black, red, black
|
|
indicator = { status0 & 4096} , "Protected", "Unprotected", white, black, red, black ;
|
|
indicator = { status0 & 8192} , "Config Error", "Config Error", white, black, red, black
|
|
indicator = { status0 & 16384} , "Sensors OK", "Sensor Fault", white, black, red, black
|
|
;indicator = { status0 & 32768} , "GPO2", "GPO2", white, black, red, black
|
|
|
|
|
|
indicator = { status1 & 0x0001} , "Saftey Disabled", "Safety Enabled", red, red, green, green;
|
|
indicator = { status0 & 2} , "NO AGGEEMENT", "AGREEMENT OK", white, red, white, green
|
|
indicator = { status0 & 4} , "NOT CALIBRATED", "CALIBRATED", white, black, red, black
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
[RunTime]
|
|
; barHysteresis = 2.5 ; Seconds
|
|
;#if CELSIUS
|
|
; coolantBar = -40, 100
|
|
; matBar = -40, 100
|
|
;#else
|
|
; coolantBar = -40, 215
|
|
; matBar = -40, 215
|
|
;#endif
|
|
;
|
|
; batteryBar = 6, 15
|
|
; dutyCycleBar = 0, 100
|
|
;#if NARROW_BAND_EGO
|
|
; egoBar = 0, 1.0
|
|
;#else
|
|
; egoBar = 0, 5.0
|
|
;#endif
|
|
; gammaEBar = 0, 200
|
|
; mapBar = 0, 255
|
|
; pulseWidthBar = 0, 25.5
|
|
; rpmBar = 0, 8000
|
|
; throttleBar = 0, 100;
|
|
;
|
|
; egoCorrBar = 0, 200
|
|
; baroCorrBar = 0, 200
|
|
; warmupCorrBar = 0, 200
|
|
; airdenCorrBar = 0, 200
|
|
; veCorrBar = 0, 200
|
|
; accCorrBar = 0, 100
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
;[Tuning]
|
|
;-------------------------------------------------------------------------------
|
|
|
|
[OutputChannels]
|
|
; The number of bytes MegaTune should expect as a result
|
|
; of sending the "A" command to MegaSquirt is determined
|
|
; by the value of ochBlockSize, so be very careful when
|
|
; you change it.
|
|
|
|
deadValue = { 0 } ; Convenient unchanging value.
|
|
|
|
#if CAN_PASSTHROUGH
|
|
ochGetCommand = "r\$tsCanId\x07%2o%2c" ; leave this alone
|
|
#else
|
|
; fast get via serial
|
|
ochGetCommand = "A"
|
|
#endif
|
|
|
|
|
|
ochBlockSize = 48
|
|
|
|
|
|
|
|
clock =scalar, U32, 0, "S", 0.001, 0;
|
|
status0 =scalar, U16, 4, "", 1, 0;
|
|
status1 =scalar, U16, 6, "", 1, 0;
|
|
status2 =scalar, U16, 8, "", 1, 0;
|
|
status3 =scalar, U16, 10, "", 1, 0;
|
|
|
|
pps1_adc =scalar, U16, 12, "", 1, 0;
|
|
pps2_adc =scalar, U16, 14, "", 1, 0;
|
|
tps1_adc =scalar, U16, 16, "", 1, 0;
|
|
tps2_adc =scalar, U16, 18, "", 1, 0;
|
|
motor_current_adc =scalar, U16, 20, "", 1, 0;
|
|
motor_current =scalar, U16, 20, "", 0.0028727, 0;
|
|
vbat_adc =scalar, U16, 22, "", 1, 0;
|
|
vbat =scalar, U16, 22, "V", 0.0062842, 0;
|
|
|
|
|
|
|
|
pps1 =scalar, S16, 24, "%", 0.1, 0;
|
|
pps2 =scalar, S16, 26, "%", 0.1, 0;
|
|
tps1 =scalar, S16, 28, "%", 0.1, 0;
|
|
tps2 =scalar, S16, 30, "%", 0.1, 0;
|
|
pps =scalar, S16, 32, "%", 0.1, 0;
|
|
tps =scalar, S16, 34, "%", 0.1, 0;
|
|
tps_error =scalar, S16, 36, "%", 0.1, 0;
|
|
motor_pwm =scalar, S16, 38, "%", 0.01, 0;
|
|
idle_dc =scalar, U16, 40, "%", 0.1, 0;
|
|
pps_delta =scalar, S16, 42, "%", 0.1, 0;
|
|
tps_delta =scalar, S16, 44, "%", 0.1, 0;
|
|
tps_target =scalar, S16, 46, "%", 0.1, 0;
|
|
|
|
|
|
;48
|
|
;-------------------------------------------------------------------------------
|
|
|
|
[Datalog]
|
|
; Full datalog.
|
|
;
|
|
; Default user-defined log emulates the full datalog.
|
|
;
|
|
; The entries are saved in the datalog file in the order in
|
|
; which they appear in the list below.
|
|
;
|
|
; Channel - Case sensitive name of output channel to be logged.
|
|
; Label - String written to header line of log. Be careful
|
|
; about changing these, as programs like MSLVV and
|
|
; MSTweak key off specific column names.
|
|
; Type - Data type of output, converted before writing.
|
|
; Format - C-style output format of data.
|
|
;
|
|
; Channel Label Type Format
|
|
; -------------- ---------- ----- ------
|
|
;entry = uptime, "Up_time", float, "%.3f"
|
|
;entry =controller_status, "Controller Status", decimal, "%d"
|
|
;entry =uptime, "Time", float, "%f"
|
|
|
|
|