refactoring: OOP

This commit is contained in:
rusefi 2017-07-10 21:47:51 -04:00
parent 99a78ed8af
commit e3384235b0
2 changed files with 2 additions and 3 deletions

View File

@ -177,7 +177,7 @@ bool FuelSchedule::addFuelEventsForCylinder(int i DECLARE_ENGINE_PARAMETER_SUFF
InjectorOutputPin *output = &enginePins.injectors[index]; InjectorOutputPin *output = &enginePins.injectors[index];
if (!isSimultanious && !isPinAssigned(output)) { if (!isSimultanious && !output->isInitialized()) {
// todo: extract method for this index math // todo: extract method for this index math
warning(CUSTOM_OBD_INJECTION_NO_PIN_ASSIGNED, "no_pin_inj #%s", output->name); warning(CUSTOM_OBD_INJECTION_NO_PIN_ASSIGNED, "no_pin_inj #%s", output->name);
} }

View File

@ -211,12 +211,11 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI
} }
#define assertPinAssigned(output) { \ #define assertPinAssigned(output) { \
if (!isPinAssigned(output)) { \ if (!output->isInitialized()) { \
warning(CUSTOM_OBD_COIL_PIN_NOT_ASSIGNED, "no_pin_cl #%s", (output)->name); \ warning(CUSTOM_OBD_COIL_PIN_NOT_ASSIGNED, "no_pin_cl #%s", (output)->name); \
} \ } \
} }
void prepareIgnitionSchedule(IgnitionEvent *event DECLARE_ENGINE_PARAMETER_SUFFIX) { void prepareIgnitionSchedule(IgnitionEvent *event DECLARE_ENGINE_PARAMETER_SUFFIX) {
// todo: clean up this implementation? does not look too nice as is. // todo: clean up this implementation? does not look too nice as is.