From a93fc588668c3661697ccc0c9c69472038a2452f Mon Sep 17 00:00:00 2001 From: Stefan de Bruijn Date: Fri, 30 Oct 2020 14:11:26 +0100 Subject: [PATCH] Re-instated assertion. --- Grbl_Esp32/src/Pins/PinLookup.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Grbl_Esp32/src/Pins/PinLookup.h b/Grbl_Esp32/src/Pins/PinLookup.h index a61483a5..df1db6fc 100644 --- a/Grbl_Esp32/src/Pins/PinLookup.h +++ b/Grbl_Esp32/src/Pins/PinLookup.h @@ -48,8 +48,8 @@ namespace Pins { } PinDetail* GetPin(uint8_t index) const { - // This assertion causes message spewing making debugging impossible - // Assert(_pins[index] != nullptr, "Pin is not defined. Cannot use this pin."); + // This assertion shouldn't be hit. If it is, undefined behavior will follow. + Assert(_pins[index] != nullptr, "Pin %d is not defined. Cannot use this pin.", index); return _pins[index]; }