AP_Relay: add message to array size static_assert

This commit is contained in:
Eric Katzfey
2026-09-07 11:37:23 +10:00
committed by Peter Barker
parent da0a1391bf
commit 7ca76b21f3
+1 -1
View File
@@ -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