From 7fca4607dbb805edc70d67c3c7927a95d99106e8 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Sat, 10 Dec 2022 17:43:20 +0000 Subject: [PATCH] AP_RangeFinder: skip GPIO arming check on analog backend --- libraries/AP_RangeFinder/AP_RangeFinder.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_RangeFinder/AP_RangeFinder.cpp b/libraries/AP_RangeFinder/AP_RangeFinder.cpp index 2d731ff335..b349ced519 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder.cpp @@ -854,6 +854,11 @@ bool RangeFinder::prearm_healthy(char *failure_msg, const uint8_t failure_msg_le hal.util->snprintf(failure_msg, failure_msg_len, "RNGFND%u_PIN not set", unsigned(i + 1)); return false; } + if (drivers[i]->allocated_type() == Type::ANALOG) { + // Analog backend does not use GPIO pin + break; + } + // ensure that the pin we're configured to use is available if (!hal.gpio->valid_pin(params[i].pin)) { uint8_t servo_ch;