From 7c68d7a30495e9df148e75689b0e201ea7e31f3c Mon Sep 17 00:00:00 2001 From: rusefillc Date: Fri, 24 Nov 2023 14:35:56 -0500 Subject: [PATCH] only:minor simplification --- firmware/hw_layer/pin_repository.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/hw_layer/pin_repository.cpp b/firmware/hw_layer/pin_repository.cpp index 987fbc6c26..b1c60dee06 100644 --- a/firmware/hw_layer/pin_repository.cpp +++ b/firmware/hw_layer/pin_repository.cpp @@ -57,12 +57,12 @@ bool brain_pin_markUsed(Gpio brainPin, const char *msg) { if (index < 0) return true; - if (engine->pinRepository.getBrainUsedPin(index) != NULL) { + if (engine->pinRepository.getBrainUsedPin(index) != nullptr) { // hwPortname and share a buffer behind the scenes, even while they probably never use it for different // values here let's have an explicit second buffer to make this more reliable char physicalPinName[32]; strncpy(physicalPinName, hwPhysicalPinName(brainPin), sizeof(physicalPinName) - 1); - firmwareError(ObdCode::CUSTOM_ERR_PIN_ALREADY_USED_1, "Pin \"%s\" (%s) required by \"%s\" but is used by \"%s\"", + criticalError("Pin \"%s\" (%s) required by \"%s\" but is used by \"%s\"", hwPortname(brainPin), physicalPinName, msg,