From 9b78fa7fb890837714460ff7fcbbcbf355dfaf76 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 20 Jul 2021 14:19:51 +1000 Subject: [PATCH] HAL_SITL: implement valid_pin() --- libraries/AP_HAL_SITL/GPIO.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_SITL/GPIO.h b/libraries/AP_HAL_SITL/GPIO.h index d165215630..fdf571b526 100644 --- a/libraries/AP_HAL_SITL/GPIO.h +++ b/libraries/AP_HAL_SITL/GPIO.h @@ -18,6 +18,8 @@ public: /* return true if USB cable is connected */ bool usb_connected(void) override; + bool valid_pin(uint8_t pin) const override { return pin < 16; } + private: SITL_State *_sitlState; @@ -35,4 +37,4 @@ public: private: uint8_t _pin; }; -#endif \ No newline at end of file +#endif