This commit is contained in:
rusefi 2019-09-29 14:16:51 -04:00
commit 9425b714fc
6 changed files with 81 additions and 9 deletions

View File

@ -347,7 +347,9 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
boardConfiguration->ignitionPins[2] = GPIOC_9;
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
// set tps_min 90
engineConfiguration->tpsMin = 100; // convert 12to10 bit (ADC/4)
// set tps_max 540
engineConfiguration->tpsMax = 650; // convert 12to10 bit (ADC/4)

View File

@ -596,9 +596,12 @@ void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
if (!engine->engineState.hasEtbPedalPositionSensor) {
return;
}
#if 0
// not alive code
autoTune.SetOutputStep(0.1);
#endif
#if ! EFI_UNIT_TEST
#if 0 && ! EFI_UNIT_TEST
percent_t startupThrottlePosition = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE);
if (absF(startupThrottlePosition - engineConfiguration->etbNeutralPosition) > STARTUP_NEUTRAL_POSITION_ERROR_THRESHOLD) {
/**
@ -613,6 +616,22 @@ void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
startETBPins(PASS_ENGINE_PARAMETER_SIGNATURE);
if (engineConfiguration->etbCalibrationOnStart) {
etb1.dcMotor.Set(70);
chThdSleep(600);
grabTPSIsWideOpen();
etb1.dcMotor.Set(-70);
chThdSleep(600);
grabTPSIsClosed();
}
#if EFI_PROD_CODE
// manual duty cycle control without PID. Percent value from 0 to 100
addConsoleActionNANF(CMD_ETB_DUTY, setThrottleDutyCycle);
#endif
#if EFI_PROD_CODE && 0
tuneWorkingPidSettings.pFactor = 1;
tuneWorkingPidSettings.iFactor = 0;
tuneWorkingPidSettings.dFactor = 0;
@ -622,9 +641,6 @@ void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
tuneWorkingPidSettings.maxValue = 100;
tuneWorkingPidSettings.periodMs = 100;
#if EFI_PROD_CODE
// manual duty cycle control without PID. Percent value from 0 to 100
addConsoleActionNANF(CMD_ETB_DUTY, setThrottleDutyCycle);
// this is useful once you do "enable etb_auto"
addConsoleActionF("set_etbat_output", setTempOutput);
addConsoleActionF("set_etbat_step", setAutoStep);
@ -632,6 +648,7 @@ void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
addConsoleActionI("set_etbat_offset", setAutoOffset);
#endif /* EFI_PROD_CODE */
etbPid.reset();
etbController.Start();

View File

@ -739,6 +739,7 @@ bit useFSIO5ForCriticalIssueEngineStop;Sometimes we just have to shut the engine
bit useFSIO4ForSeriousEngineWarning;Sometimes we have to miss injection on purpose to attract driver's attention
bit useFSIO12ForIdleOffset;
bit useFSIO13ForIdleMinValue;
bit unusedBit31
adc_channel_e hipOutputChannel;
adc_channel_e acSwitchAdc;A/C button input handled as analogue input
@ -768,8 +769,18 @@ bit useFixedBaroCorrFromMap
bit useSeparateAdvanceForCranking;+This activates a separate advance table for cranking conditions, this allows cranking advance to be RPM dependant.
bit useAdvanceCorrectionsForCranking;+This enables the various ignition corrections during cranking (IAT, CLT, FSIO and PID idle).
bit useTPSAdvanceTable;+This flag allows to use TPS for ignition lookup while in Speed Density Fuel Mode
bit unused_1484_bit_20
bit etbCalibrationOnStart
bit unused_1484_bit_21
bit unused_1484_bit_22
bit unused_1484_bit_23
bit unused_1484_bit_24
bit unused_1484_bit_25
bit unused_1484_bit_26
bit unused_1484_bit_27
bit unused_1484_bit_28
bit unused_1484_bit_29
bit unused_1484_bit_30
bit unused_1484_bit_31
uint32_t engineChartSize;;"count", 1, 0, 0, 300, 0

View File

@ -2457,6 +2457,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
field = "Throttle Pedal Up", throttlePedalUpVoltage
field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage
field = "PWM Frequency", etbFreq, {throttlePedalPositionAdcChannel != 16}
field = etbCalibrationOnStart, etbCalibrationOnStart
field = "No1 Direction #1", etb1_directionPin1, {throttlePedalPositionAdcChannel != 16}
field = "No1 Direction #2", etb1_directionPin2, {throttlePedalPositionAdcChannel != 16}
field = "Two-wire mode", etb1_use_two_wires, {throttlePedalPositionAdcChannel != 16}

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Sep 24 18:34:53 EDT 2019
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Sep 29 11:56:14 EDT 2019
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
@ -353,6 +353,7 @@ public class Fields {
public static final int etb_pFactor_offset = 1736;
public static final int etbBiasBins_offset = 3888;
public static final int etbBiasValues_offset = 3920;
public static final int etbCalibrationOnStart_offset = 1476;
public static final int etbDeadband_offset = 3960;
public static final int etbFreq_offset = 2514;
public static final int etbIdleRange_offset = 972;
@ -1224,13 +1225,23 @@ public class Fields {
public static final int unrealisticRpmThreashold_offset = 760;
public static final int unused1133_offset = 676;
public static final int unused1234234_offset = 2042;
public static final int unused_1484_bit_20_offset = 1476;
public static final int unused_1484_bit_21_offset = 1476;
public static final int unused_1484_bit_22_offset = 1476;
public static final int unused_1484_bit_23_offset = 1476;
public static final int unused_1484_bit_24_offset = 1476;
public static final int unused_1484_bit_25_offset = 1476;
public static final int unused_1484_bit_26_offset = 1476;
public static final int unused_1484_bit_27_offset = 1476;
public static final int unused_1484_bit_28_offset = 1476;
public static final int unused_1484_bit_29_offset = 1476;
public static final int unused_1484_bit_30_offset = 1476;
public static final int unused_1484_bit_31_offset = 1476;
public static final int unused_board_984_31_offset = 744;
public static final int unused_former_warmup_target_afr_offset = 2096;
public static final int unused_former_warmup_target_afr_offset_hex = 830;
public static final int unusedAnotherOne_offset = 744;
public static final int unusedAtBoardConfigurationEnd_offset = 980;
public static final int unusedBit31_offset = 1464;
public static final int unusedErrorPin_offset = 2040;
public static final int unusedFlexFuelSensor_offset = 3100;
public static final int unusedFormerWarmupAfrPid_offset = 1760;
@ -1745,6 +1756,7 @@ public class Fields {
public static final Field USEFSIO4FORSERIOUSENGINEWARNING = Field.create("USEFSIO4FORSERIOUSENGINEWARNING", 1464, FieldType.BIT, 28);
public static final Field USEFSIO12FORIDLEOFFSET = Field.create("USEFSIO12FORIDLEOFFSET", 1464, FieldType.BIT, 29);
public static final Field USEFSIO13FORIDLEMINVALUE = Field.create("USEFSIO13FORIDLEMINVALUE", 1464, FieldType.BIT, 30);
public static final Field UNUSEDBIT31 = Field.create("UNUSEDBIT31", 1464, FieldType.BIT, 31);
public static final Field HIPOUTPUTCHANNEL = Field.create("HIPOUTPUTCHANNEL", 1468, FieldType.INT8, adc_channel_e);
public static final Field ACSWITCHADC = Field.create("ACSWITCHADC", 1469, FieldType.INT8, adc_channel_e);
public static final Field VREFADCCHANNEL = Field.create("VREFADCCHANNEL", 1470, FieldType.INT8, adc_channel_e);
@ -1770,8 +1782,18 @@ public class Fields {
public static final Field USESEPARATEADVANCEFORCRANKING = Field.create("USESEPARATEADVANCEFORCRANKING", 1476, FieldType.BIT, 17);
public static final Field USEADVANCECORRECTIONSFORCRANKING = Field.create("USEADVANCECORRECTIONSFORCRANKING", 1476, FieldType.BIT, 18);
public static final Field USETPSADVANCETABLE = Field.create("USETPSADVANCETABLE", 1476, FieldType.BIT, 19);
public static final Field UNUSED_1484_BIT_20 = Field.create("UNUSED_1484_BIT_20", 1476, FieldType.BIT, 20);
public static final Field ETBCALIBRATIONONSTART = Field.create("ETBCALIBRATIONONSTART", 1476, FieldType.BIT, 20);
public static final Field UNUSED_1484_BIT_21 = Field.create("UNUSED_1484_BIT_21", 1476, FieldType.BIT, 21);
public static final Field UNUSED_1484_BIT_22 = Field.create("UNUSED_1484_BIT_22", 1476, FieldType.BIT, 22);
public static final Field UNUSED_1484_BIT_23 = Field.create("UNUSED_1484_BIT_23", 1476, FieldType.BIT, 23);
public static final Field UNUSED_1484_BIT_24 = Field.create("UNUSED_1484_BIT_24", 1476, FieldType.BIT, 24);
public static final Field UNUSED_1484_BIT_25 = Field.create("UNUSED_1484_BIT_25", 1476, FieldType.BIT, 25);
public static final Field UNUSED_1484_BIT_26 = Field.create("UNUSED_1484_BIT_26", 1476, FieldType.BIT, 26);
public static final Field UNUSED_1484_BIT_27 = Field.create("UNUSED_1484_BIT_27", 1476, FieldType.BIT, 27);
public static final Field UNUSED_1484_BIT_28 = Field.create("UNUSED_1484_BIT_28", 1476, FieldType.BIT, 28);
public static final Field UNUSED_1484_BIT_29 = Field.create("UNUSED_1484_BIT_29", 1476, FieldType.BIT, 29);
public static final Field UNUSED_1484_BIT_30 = Field.create("UNUSED_1484_BIT_30", 1476, FieldType.BIT, 30);
public static final Field UNUSED_1484_BIT_31 = Field.create("UNUSED_1484_BIT_31", 1476, FieldType.BIT, 31);
public static final Field ENGINECHARTSIZE = Field.create("ENGINECHARTSIZE", 1480, FieldType.INT);
public static final Field IDLEPIDRPMUPPERLIMIT = Field.create("IDLEPIDRPMUPPERLIMIT", 1484, FieldType.INT16);
public static final Field PRIMEINJFALLOFFTEMPERATURE = Field.create("PRIMEINJFALLOFFTEMPERATURE", 1486, FieldType.INT16);
@ -2526,6 +2548,7 @@ public class Fields {
USEFSIO4FORSERIOUSENGINEWARNING,
USEFSIO12FORIDLEOFFSET,
USEFSIO13FORIDLEMINVALUE,
UNUSEDBIT31,
HIPOUTPUTCHANNEL,
ACSWITCHADC,
VREFADCCHANNEL,
@ -2551,8 +2574,18 @@ public class Fields {
USESEPARATEADVANCEFORCRANKING,
USEADVANCECORRECTIONSFORCRANKING,
USETPSADVANCETABLE,
UNUSED_1484_BIT_20,
ETBCALIBRATIONONSTART,
UNUSED_1484_BIT_21,
UNUSED_1484_BIT_22,
UNUSED_1484_BIT_23,
UNUSED_1484_BIT_24,
UNUSED_1484_BIT_25,
UNUSED_1484_BIT_26,
UNUSED_1484_BIT_27,
UNUSED_1484_BIT_28,
UNUSED_1484_BIT_29,
UNUSED_1484_BIT_30,
UNUSED_1484_BIT_31,
ENGINECHARTSIZE,
IDLEPIDRPMUPPERLIMIT,
PRIMEINJFALLOFFTEMPERATURE,

View File

@ -1,7 +1,10 @@
package com.rusefi.ui.etb;
import com.rusefi.config.generated.Fields;
import com.rusefi.core.Sensor;
import com.rusefi.ldmp.generated.ElectronicThrottleMeta;
import com.rusefi.ui.config.BitConfigField;
import com.rusefi.ui.config.ConfigField;
import com.rusefi.ui.livedocs.LiveDocPanel;
import com.rusefi.ui.storage.Node;
import com.rusefi.ui.util.UiUtils;
@ -42,6 +45,11 @@ public class EtbCommandsPanel {
testParameters.add(new JLabel("For example:"));
testParameters.add(new JLabel("set etb_p 1.1"));
testParameters.add(new BitConfigField(Fields.PAUSEETBCONTROL, "Pause").getContent());
testParameters.add(new ConfigField(Fields.ETB_PFACTOR, "pFactor").getContent());
testParameters.add(new ConfigField(Fields.ETB_IFACTOR, "iFactor").getContent());
testParameters.add(new ConfigField(Fields.ETB_DFACTOR, "dFactor").getContent());
content.setBorder(BorderFactory.createTitledBorder("Commands"));
content.add(testParameters);