useFSIO6ForRevLimiter
This commit is contained in:
parent
26925e5917
commit
0b5bb7c0cf
|
@ -481,6 +481,13 @@ operation_mode_e Engine::getOperationMode(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
return doesTriggerImplyOperationMode(engineConfiguration->trigger.type) ? triggerCentral.triggerShape.getOperationMode() : engineConfiguration->ambiguousOperationMode;
|
return doesTriggerImplyOperationMode(engineConfiguration->trigger.type) ? triggerCentral.triggerShape.getOperationMode() : engineConfiguration->ambiguousOperationMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Engine::getRpmHardLimit(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
if (engineConfiguration->useFSIO6ForRevLimiter) {
|
||||||
|
return fsioState.fsioRpmHardLimit;
|
||||||
|
}
|
||||||
|
return CONFIG(rpmHardLimit);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The idea of this method is to execute all heavy calculations in a lower-priority thread,
|
* The idea of this method is to execute all heavy calculations in a lower-priority thread,
|
||||||
* so that trigger event handler/IO scheduler tasks are faster.
|
* so that trigger event handler/IO scheduler tasks are faster.
|
||||||
|
|
|
@ -241,6 +241,7 @@ public:
|
||||||
|
|
||||||
bool isRunningPwmTest = false;
|
bool isRunningPwmTest = false;
|
||||||
|
|
||||||
|
int getRpmHardLimit(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
FsioState fsioState;
|
FsioState fsioState;
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,8 @@ public:
|
||||||
float fsioIdleOffset = 0;
|
float fsioIdleOffset = 0;
|
||||||
float fsioIdleMinValue = 0;
|
float fsioIdleMinValue = 0;
|
||||||
|
|
||||||
|
float fsioRpmHardLimit;
|
||||||
|
|
||||||
#if EFI_UNIT_TEST
|
#if EFI_UNIT_TEST
|
||||||
float mockFan = 0;
|
float mockFan = 0;
|
||||||
float mockRpm = 0;
|
float mockRpm = 0;
|
||||||
|
|
|
@ -516,6 +516,10 @@ void runFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
updateValueOrWarning(MAGIC_OFFSET_FOR_TIMING_FSIO, "timing", &ENGINE(fsioState.fsioTimingAdjustment) PASS_ENGINE_PARAMETER_SUFFIX);
|
updateValueOrWarning(MAGIC_OFFSET_FOR_TIMING_FSIO, "timing", &ENGINE(fsioState.fsioTimingAdjustment) PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (engineConfiguration->useFSIO6ForRevLimiter) {
|
||||||
|
updateValueOrWarning(6 - 1, "rpm limit", &ENGINE(fsioState.fsioRpmHardLimit) PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
}
|
||||||
|
|
||||||
if (engineConfiguration->useFSIO8ForServo1) {
|
if (engineConfiguration->useFSIO8ForServo1) {
|
||||||
useFsioForServo(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
useFsioForServo(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
}
|
}
|
||||||
|
|
|
@ -717,6 +717,6 @@ int getRusEfiVersion(void) {
|
||||||
if (initBootloader() != 0)
|
if (initBootloader() != 0)
|
||||||
return 123;
|
return 123;
|
||||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||||
return 20200531;
|
return 20200601;
|
||||||
}
|
}
|
||||||
#endif /* EFI_UNIT_TEST */
|
#endif /* EFI_UNIT_TEST */
|
||||||
|
|
|
@ -391,8 +391,8 @@ static void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t trgEvent
|
||||||
// TODO: add 'pin shutdown' invocation somewhere - coils might be still open here!
|
// TODO: add 'pin shutdown' invocation somewhere - coils might be still open here!
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool limitedSpark = rpm > CONFIG(rpmHardLimit);
|
bool limitedSpark = rpm > engine->getRpmHardLimit(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
bool limitedFuel = rpm > CONFIG(rpmHardLimit);
|
bool limitedFuel = rpm > engine->getRpmHardLimit(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
if (CONFIG(boostCutPressure) != 0) {
|
if (CONFIG(boostCutPressure) != 0) {
|
||||||
if (getMap(PASS_ENGINE_PARAMETER_SIGNATURE) > CONFIG(boostCutPressure)) {
|
if (getMap(PASS_ENGINE_PARAMETER_SIGNATURE) > CONFIG(boostCutPressure)) {
|
||||||
|
|
Loading…
Reference in New Issue