mirror of https://github.com/rusefi/rusefi-1.git
This commit is contained in:
parent
587acbe96e
commit
78b032806e
|
@ -673,7 +673,7 @@ typedef enum {
|
||||||
DBG_ALTERNATOR_PID = 0,
|
DBG_ALTERNATOR_PID = 0,
|
||||||
DBG_TPS_ACCEL = 1,
|
DBG_TPS_ACCEL = 1,
|
||||||
DBG_WARMUP_ENRICH = 2,
|
DBG_WARMUP_ENRICH = 2,
|
||||||
DBG_IDLE = 3,
|
DBG_IDLE_CONTROL = 3,
|
||||||
DBG_EL_ACCEL = 4,
|
DBG_EL_ACCEL = 4,
|
||||||
DBG_TRIGGER_INPUT = 5,
|
DBG_TRIGGER_INPUT = 5,
|
||||||
FSIO_ADC = 6,
|
FSIO_ADC = 6,
|
||||||
|
@ -689,8 +689,8 @@ typedef enum {
|
||||||
DBG_SD_CARD = 13,
|
DBG_SD_CARD = 13,
|
||||||
DBG_SR5_PROTOCOL = 14,
|
DBG_SR5_PROTOCOL = 14,
|
||||||
DBG_KNOCK = 15,
|
DBG_KNOCK = 15,
|
||||||
DGB_TRIGGER_SYNC = 16,
|
DBG_TRIGGER_SYNC = 16,
|
||||||
DM_17 = 17,
|
DBG_ELECTRONIC_THROTTLE = 17,
|
||||||
DM_18 = 18,
|
DM_18 = 18,
|
||||||
DM_19 = 19,
|
DM_19 = 19,
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,6 @@ static void showIdleInfo(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (engineConfiguration->idleMode == IM_AUTO) {
|
if (engineConfiguration->idleMode == IM_AUTO) {
|
||||||
scheduleMsg(logger, "idle P=%f I=%f D=%f dT=%d", engineConfiguration->idleRpmPid.pFactor,
|
scheduleMsg(logger, "idle P=%f I=%f D=%f dT=%d", engineConfiguration->idleRpmPid.pFactor,
|
||||||
engineConfiguration->idleRpmPid.iFactor,
|
engineConfiguration->idleRpmPid.iFactor,
|
||||||
|
@ -103,18 +102,6 @@ static void applyIACposition(percent_t position) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Adjusts cra
|
|
||||||
*
|
|
||||||
* @param target percentage of manual-controlled IAC or RPM for auto idle
|
|
||||||
*/
|
|
||||||
static float adjustIdleTarget(float target) {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return target;
|
|
||||||
}
|
|
||||||
|
|
||||||
static float manualIdleController(float cltCorrection) {
|
static float manualIdleController(float cltCorrection) {
|
||||||
|
|
||||||
percent_t correctedPosition = cltCorrection * boardConfiguration->manIdlePosition;
|
percent_t correctedPosition = cltCorrection * boardConfiguration->manIdlePosition;
|
||||||
|
@ -173,7 +160,7 @@ percent_t getIdlePosition(void) {
|
||||||
|
|
||||||
static float autoIdle(float cltCorrection) {
|
static float autoIdle(float cltCorrection) {
|
||||||
|
|
||||||
int targetRpm = 1400 * cltCorrection;
|
int targetRpm = engineConfiguration->targetIdleRpm * cltCorrection;
|
||||||
|
|
||||||
percent_t newValue = idlePid.getValue(targetRpm, getRpmE(engine));
|
percent_t newValue = idlePid.getValue(targetRpm, getRpmE(engine));
|
||||||
|
|
||||||
|
@ -229,8 +216,17 @@ static msg_t ivThread(int param) {
|
||||||
continue; // value is pretty close, let's leave the poor valve alone
|
continue; // value is pretty close, let's leave the poor valve alone
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engineConfiguration->debugMode == DBG_IDLE) {
|
if (engineConfiguration->debugMode == DBG_IDLE_CONTROL) {
|
||||||
tsOutputChannels.debugFloatField1 = iacPosition;
|
tsOutputChannels.debugFloatField1 = iacPosition;
|
||||||
|
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||||
|
if (engineConfiguration->idleMode == IM_AUTO) {
|
||||||
|
idlePid.postState(&tsOutputChannels);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if (engineConfiguration->isVerboseIAC) {
|
||||||
|
scheduleMsg(logger, "rpm=%d position=%f", getRpmE(engine), iacPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
actualIdlePosition = iacPosition;
|
actualIdlePosition = iacPosition;
|
||||||
|
|
|
@ -223,7 +223,7 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no
|
||||||
if (TRIGGER_SHAPE(isSynchronizationNeeded)) {
|
if (TRIGGER_SHAPE(isSynchronizationNeeded)) {
|
||||||
// this is getting a little out of hand, any ideas?
|
// this is getting a little out of hand, any ideas?
|
||||||
|
|
||||||
if (engineConfiguration->debugMode == DGB_TRIGGER_SYNC) {
|
if (engineConfiguration->debugMode == DBG_TRIGGER_SYNC) {
|
||||||
float currentGap = 1.0 * currentDuration / toothed_previous_duration;
|
float currentGap = 1.0 * currentDuration / toothed_previous_duration;
|
||||||
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||||
tsOutputChannels.debugFloatField1 = currentGap;
|
tsOutputChannels.debugFloatField1 = currentGap;
|
||||||
|
@ -321,7 +321,7 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no
|
||||||
|
|
||||||
enginePins.triggerDecoderErrorPin.setValue(isDecodingError);
|
enginePins.triggerDecoderErrorPin.setValue(isDecodingError);
|
||||||
if (isDecodingError && !isInitializingTrigger) {
|
if (isDecodingError && !isInitializingTrigger) {
|
||||||
if (engineConfiguration->debugMode == DGB_TRIGGER_SYNC) {
|
if (engineConfiguration->debugMode == DBG_TRIGGER_SYNC) {
|
||||||
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||||
|
|
||||||
tsOutputChannels.debugIntField1 = currentCycle.eventCount[0];
|
tsOutputChannels.debugIntField1 = currentCycle.eventCount[0];
|
||||||
|
|
Loading…
Reference in New Issue