From 7ca76b21f3c5515d1463f8de843eb5a8aacbc7eb Mon Sep 17 00:00:00 2001 From: Eric Katzfey Date: Sun, 6 Sep 2026 14:01:43 -0700 Subject: [PATCH] AP_Relay: add message to array size static_assert --- libraries/AP_Relay/AP_Relay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Relay/AP_Relay.cpp b/libraries/AP_Relay/AP_Relay.cpp index 4eaea850efd..99ac1618b56 100644 --- a/libraries/AP_Relay/AP_Relay.cpp +++ b/libraries/AP_Relay/AP_Relay.cpp @@ -345,7 +345,7 @@ void AP_Relay::set_defaults() { RELAY5_DEFAULT, RELAY6_DEFAULT }; - static_assert(ARRAY_SIZE(pins) == ARRAY_SIZE(default_states)); + static_assert(ARRAY_SIZE(pins) == ARRAY_SIZE(default_states), "Relay pin and default state counts must match"); for (uint8_t i = 0; i < MIN(ARRAY_SIZE(_params), ARRAY_SIZE(pins)); i++) { // set the default