function >>> macro

(cherry picked from commit 489d016682)
This commit is contained in:
Matthew Kennedy 2023-04-12 19:32:52 -07:00 committed by Andrey
parent 3d3873235b
commit d488ed5858
1 changed files with 4 additions and 5 deletions

View File

@ -60,11 +60,10 @@ static void fireSparkBySettingPinLow(IgnitionEvent *event, IgnitionOutputPin *ou
output->setLow();
}
// todo: make this a class method?
#define assertPinAssigned(output) { \
if (!output->isInitialized()) { \
warning(CUSTOM_OBD_COIL_PIN_NOT_ASSIGNED, "Pin Not Assigned check configuration #%s", (output)->getName()); \
} \
static void assertPinAssigned(IgnitionOutputPin* output) {
if (!output->isInitialized()) {
warning(CUSTOM_OBD_COIL_PIN_NOT_ASSIGNED, "Pin Not Assigned check configuration #%s", output->getName()); \
}
}
/**