From f5b1191d853ec18cd9dda99ae21c54ed14ba56d8 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 3 Jan 2022 16:46:15 -0500 Subject: [PATCH] smart diag into bench test --- firmware/controllers/bench_test.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/bench_test.cpp b/firmware/controllers/bench_test.cpp index 8a5459c595..9bb4db0599 100644 --- a/firmware/controllers/bench_test.cpp +++ b/firmware/controllers/bench_test.cpp @@ -71,13 +71,15 @@ void benchOn(OutputPin* output) { static char pin_error[64]; void benchOff(OutputPin* output) { +#if EFI_PROD_CODE brain_pin_diag_e diag = gpiochips_getDiag(output->brainPin); - if (diag == PIN_OK) { - efiPrintf("Diag says OK"); + if (diag == PIN_INVALID) { + efiPrintf("No Diag on this pin"); } else { pinDiag2string(pin_error, sizeof(pin_error), diag); efiPrintf("Diag says %s", pin_error); } +#endif // EFI_PROD_CODE output->setValue(false); }