Better handling in case of ETB idle without ETB #1332
This commit is contained in:
parent
1ced7eafbc
commit
ad7c4f23bc
|
@ -154,6 +154,13 @@ static void applyIACposition(percent_t position) {
|
|||
float duty = PERCENT_TO_DUTY(position);
|
||||
|
||||
if (CONFIG(useETBforIdleControl)) {
|
||||
|
||||
if (!Sensor::hasSensor(SensorType::AcceleratorPedal)) {
|
||||
firmwareError(CUSTOM_NO_ETB_FOR_IDLE, "No ETB to use for idle");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
engine->engineState.idle.etbIdleAddition = duty * CONFIG(etbIdleThrottleRange);
|
||||
#if ! EFI_UNIT_TEST
|
||||
} if (CONFIG(useStepperIdle)) {
|
||||
|
|
|
@ -26,6 +26,8 @@ bool warning(obd_code_e code, const char *fmt, ...);
|
|||
typedef uint8_t critical_msg_t[ERROR_BUFFER_SIZE];
|
||||
/**
|
||||
* Something really bad had happened - firmware cannot function, we cannot run the engine
|
||||
* We definitely use this critical error approach in case of invalid configuration. If user sets a self-contradicting
|
||||
* configuration we have to just put a hard stop on this.
|
||||
*
|
||||
* see also warning()
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue