From d488ed5858fff3565d871bc0c7df44d81c37dcb3 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Wed, 12 Apr 2023 19:32:52 -0700 Subject: [PATCH] function >>> macro (cherry picked from commit 489d016682d1c3eb4eb707cd1686686e40175dcd) --- firmware/controllers/engine_cycle/spark_logic.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/firmware/controllers/engine_cycle/spark_logic.cpp b/firmware/controllers/engine_cycle/spark_logic.cpp index 8d8b5cde23..0e6cedc625 100644 --- a/firmware/controllers/engine_cycle/spark_logic.cpp +++ b/firmware/controllers/engine_cycle/spark_logic.cpp @@ -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()); \ + } } /**