function >>> macro

This commit is contained in:
Matthew Kennedy 2023-04-12 19:32:52 -07:00
parent 540cf6c277
commit 489d016682
1 changed files with 4 additions and 5 deletions

View File

@ -50,11 +50,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()); \
}
}
/**