removing dead code - function never returns nullptr
This commit is contained in:
parent
ec05edd55a
commit
7e95c2c672
|
@ -966,18 +966,14 @@ void doInitElectronicThrottle() {
|
|||
}
|
||||
auto motor = initDcMotor(engineConfiguration->etbIo[i], i, engineConfiguration->etb_use_two_wires);
|
||||
|
||||
// If this motor is actually set up, init the etb
|
||||
if (motor)
|
||||
{
|
||||
auto controller = engine->etbControllers[i];
|
||||
if (!controller) {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto pid = getEtbPidForFunction(func);
|
||||
|
||||
anyEtbConfigured |= controller->init(func, motor, pid, &pedal2tpsMap, shouldInitThrottles);
|
||||
auto controller = engine->etbControllers[i];
|
||||
if (!controller) {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto pid = getEtbPidForFunction(func);
|
||||
|
||||
anyEtbConfigured |= controller->init(func, motor, pid, &pedal2tpsMap, shouldInitThrottles);
|
||||
}
|
||||
|
||||
if (!anyEtbConfigured) {
|
||||
|
@ -1019,7 +1015,6 @@ void initElectronicThrottle() {
|
|||
}
|
||||
#endif
|
||||
|
||||
efiAssertVoid(OBD_PCM_Processor_Fault, engine->etbControllers != NULL, "etbControllers NULL");
|
||||
#if EFI_PROD_CODE
|
||||
addConsoleAction("ethinfo", showEthInfo);
|
||||
addConsoleAction("etbreset", etbReset);
|
||||
|
|
|
@ -102,13 +102,11 @@ void initIdleHardware() {
|
|||
auto motorB = initDcMotor(engineConfiguration->stepper_raw_output[2],
|
||||
engineConfiguration->stepper_raw_output[3], ETB_COUNT + 1);
|
||||
|
||||
if (motorA && motorB) {
|
||||
iacHbridgeHw.initialize(
|
||||
motorA,
|
||||
motorB,
|
||||
engineConfiguration->idleStepperReactionTime
|
||||
);
|
||||
}
|
||||
iacHbridgeHw.initialize(
|
||||
motorA,
|
||||
motorB,
|
||||
engineConfiguration->idleStepperReactionTime
|
||||
);
|
||||
|
||||
hw = &iacHbridgeHw;
|
||||
} else if (engineConfiguration->useHbridgesToDriveIdleStepper) {
|
||||
|
@ -117,13 +115,11 @@ void initIdleHardware() {
|
|||
auto motorB = initDcMotor(engineConfiguration->stepperDcIo[1],
|
||||
ETB_COUNT + 1, /*useTwoWires*/ true);
|
||||
|
||||
if (motorA && motorB) {
|
||||
iacHbridgeHw.initialize(
|
||||
motorA,
|
||||
motorB,
|
||||
engineConfiguration->idleStepperReactionTime
|
||||
);
|
||||
}
|
||||
iacHbridgeHw.initialize(
|
||||
motorA,
|
||||
motorB,
|
||||
engineConfiguration->idleStepperReactionTime
|
||||
);
|
||||
|
||||
hw = &iacHbridgeHw;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue