AP_Relay: fixed formatting of pin arming check

This commit is contained in:
Andrew Tridgell 2021-08-04 10:24:17 +10:00
parent fe6ac6a581
commit a56db06efb
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ bool AP_Relay::arming_checks(size_t buflen, char *buffer) const
{ {
for (uint8_t i=0; i<AP_RELAY_NUM_RELAYS; i++) { for (uint8_t i=0; i<AP_RELAY_NUM_RELAYS; i++) {
if (_pin[i] != -1 && !hal.gpio->valid_pin(_pin[i])) { if (_pin[i] != -1 && !hal.gpio->valid_pin(_pin[i])) {
hal.util->snprintf(buffer, buflen, "Relay[%u] pin %d invalid", i + 1, _pin[i]); hal.util->snprintf(buffer, buflen, "Relay[%u] pin %d invalid", unsigned(i + 1), int(_pin[i].get()));
return false; return false;
} }
} }