mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
AP_Relay: add message to array size static_assert
This commit is contained in:
committed by
Peter Barker
parent
da0a1391bf
commit
7ca76b21f3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user