ETB is sticky around zero and does not want to close all the way #943
This commit is contained in:
parent
0c8f143595
commit
97e0270b1c
|
@ -104,6 +104,10 @@ static pedal2tps_t pedal2tpsMap("Pedal2Tps", 1);
|
|||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
static bool startupPositionError = false;
|
||||
|
||||
#define STARTUP_NEUTRAL_POSITION_ERROR_THRESHOLD 1
|
||||
|
||||
class EtbControl {
|
||||
private:
|
||||
OutputPin m_pinEnable;
|
||||
|
@ -193,6 +197,11 @@ static percent_t currentEtbDuty;
|
|||
#endif /* EFI_TUNER_STUDIO */
|
||||
}
|
||||
|
||||
if (startupPositionError) {
|
||||
etb1.dcMotor.Set(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (shouldResetPid) {
|
||||
etbPid.reset();
|
||||
shouldResetPid = false;
|
||||
|
@ -572,6 +581,17 @@ void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
autoTune.SetOutputStep(0.1);
|
||||
|
||||
percent_t startupThrottlePosition = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
if (absF(startupThrottlePosition - engineConfiguration->etbNeutralPosition) > STARTUP_NEUTRAL_POSITION_ERROR_THRESHOLD) {
|
||||
/**
|
||||
* Unexpected electronic throttle start-up position is worth a fatal error
|
||||
*/
|
||||
firmwareError(OBD_Throttle_Actuator_Control_Range_Performance_Bank_1, "startup ETB position %.2f not %d",
|
||||
startupThrottlePosition,
|
||||
engineConfiguration->etbNeutralPosition);
|
||||
startupPositionError = true;
|
||||
}
|
||||
|
||||
startETBPins(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
tuneWorkingPidSettings.pFactor = 1;
|
||||
|
|
|
@ -668,7 +668,7 @@ typedef enum {
|
|||
//P0635 Power Steering Control Circuit
|
||||
//P0636 Power Steering Control Circuit Low
|
||||
//P0637 Power Steering Control Circuit High
|
||||
//P0638 Throttle Actuator Control Range/Performance (Bank 1)
|
||||
OBD_Throttle_Actuator_Control_Range_Performance_Bank_1 = 638,
|
||||
//P0639 Throttle Actuator Control Range/Performance (Bank 2)
|
||||
//P0640 Intake Air Heater Control Circuit
|
||||
//P0641 Sensor Reference Voltage “A” Circuit/Open
|
||||
|
|
|
@ -743,7 +743,7 @@ bit useFSIO13ForIdleMinValue;
|
|||
adc_channel_e hipOutputChannel;
|
||||
adc_channel_e acSwitchAdc;A/C button input handled as analogue input
|
||||
adc_channel_e vRefAdcChannel;
|
||||
uint8_t[1] unusedh;
|
||||
uint8_t etbNeutralPosition;+Expected neutral position;"%", 1, 0, 0, 100, 0
|
||||
|
||||
custom idle_mode_e 4 bits, U32, @OFFSET@, [0:0], "Automatic", "Manual"
|
||||
idle_mode_e idleMode;See also idleRpmPid;
|
||||
|
|
|
@ -2467,6 +2467,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
|
|||
|
||||
dialog = etbDialogRight
|
||||
field = "!https://rusefi.com/s/debugmode"
|
||||
field = "Neutral Position", etbNeutralPosition
|
||||
field = "Debug mode", debugMode
|
||||
field = "use ETB for idle", useETBforIdleControl
|
||||
field = "ETB idle maximum angle", etbIdleRange
|
||||
|
|
|
@ -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 Sat Sep 21 21:56:11 EDT 2019
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Sep 22 22:54:07 EDT 2019
|
||||
|
||||
// by class com.rusefi.output.FileJavaFieldsConsumer
|
||||
import com.rusefi.config.*;
|
||||
|
@ -356,6 +356,7 @@ public class Fields {
|
|||
public static final int etbFreq_offset = 2514;
|
||||
public static final int etbIdleRange_offset = 972;
|
||||
public static final int etbIdleThrottleRange_offset = 4012;
|
||||
public static final int etbNeutralPosition_offset = 1471;
|
||||
public static final int externalKnockSenseAdc_offset = 3103;
|
||||
public static final int extraInjectionOffset_offset = 432;
|
||||
public static final int fanOffTemperature_offset = 472;
|
||||
|
@ -1232,7 +1233,6 @@ public class Fields {
|
|||
public static final int unusedErrorPin_offset = 2040;
|
||||
public static final int unusedFlexFuelSensor_offset = 3100;
|
||||
public static final int unusedFormerWarmupAfrPid_offset = 1756;
|
||||
public static final int unusedh_offset = 1471;
|
||||
public static final int unusedMa2_offset = 711;
|
||||
public static final int unusedOldWarmupAfr_offset = 744;
|
||||
public static final int unusedSpiPadding2_offset = 806;
|
||||
|
@ -1747,7 +1747,7 @@ public class Fields {
|
|||
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);
|
||||
public static final Field UNUSEDH = Field.create("UNUSEDH", 1471, FieldType.INT8);
|
||||
public static final Field ETBNEUTRALPOSITION = Field.create("ETBNEUTRALPOSITION", 1471, FieldType.INT8);
|
||||
public static final Field IDLEMODE = Field.create("IDLEMODE", 1472, FieldType.INT);
|
||||
public static final Field ISINJECTIONENABLED = Field.create("ISINJECTIONENABLED", 1476, FieldType.BIT, 0);
|
||||
public static final Field ISIGNITIONENABLED = Field.create("ISIGNITIONENABLED", 1476, FieldType.BIT, 1);
|
||||
|
@ -2527,7 +2527,7 @@ public class Fields {
|
|||
HIPOUTPUTCHANNEL,
|
||||
ACSWITCHADC,
|
||||
VREFADCCHANNEL,
|
||||
UNUSEDH,
|
||||
ETBNEUTRALPOSITION,
|
||||
IDLEMODE,
|
||||
ISINJECTIONENABLED,
|
||||
ISIGNITIONENABLED,
|
||||
|
|
|
@ -24,7 +24,8 @@ public class EtbReturnToNeutral {
|
|||
|
||||
private JButton button = new JButton("ETB Spring Test");
|
||||
|
||||
private final static float SHUT_CLOSED = -30;
|
||||
private final static float SHUT_OPEN = 70;
|
||||
private final static float SHUT_CLOSED = -70;
|
||||
|
||||
public EtbReturnToNeutral() {
|
||||
button.addActionListener(new ActionListener() {
|
||||
|
@ -65,6 +66,8 @@ public class EtbReturnToNeutral {
|
|||
if (isError)
|
||||
errorCount++;
|
||||
|
||||
CommandQueue.getInstance().write(CMD_ETB_DUTY + " " + SHUT_OPEN);
|
||||
Thread.sleep((long) (0.5 * SECOND));
|
||||
|
||||
CommandQueue.getInstance().write(CMD_ETB_DUTY + " " + SHUT_CLOSED);
|
||||
Thread.sleep(SECOND);
|
||||
|
|
Loading…
Reference in New Issue