refactoring: OOP
This commit is contained in:
parent
804378801a
commit
9beef0f0ae
|
@ -177,7 +177,7 @@ bool FuelSchedule::addFuelEventsForCylinder(int i DECLARE_ENGINE_PARAMETER_SUFF
|
|||
|
||||
InjectorOutputPin *output = &enginePins.injectors[index];
|
||||
|
||||
if (!isSimultanious && !isPinAssigned(output)) {
|
||||
if (!isSimultanious && !output->isInitialized()) {
|
||||
// todo: extract method for this index math
|
||||
warning(CUSTOM_OBD_INJECTION_NO_PIN_ASSIGNED, "no_pin_inj #%s", output->name);
|
||||
}
|
||||
|
|
|
@ -211,12 +211,11 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI
|
|||
}
|
||||
|
||||
#define assertPinAssigned(output) { \
|
||||
if (!isPinAssigned(output)) { \
|
||||
if (!output->isInitialized()) { \
|
||||
warning(CUSTOM_OBD_COIL_PIN_NOT_ASSIGNED, "no_pin_cl #%s", (output)->name); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
void prepareIgnitionSchedule(IgnitionEvent *event DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
// todo: clean up this implementation? does not look too nice as is.
|
||||
|
||||
|
|
Loading…
Reference in New Issue