From 197c09fcd8f1b557e4070d8483152b8ae7dd70d3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 5 Jan 2015 22:29:01 +1100 Subject: [PATCH] AP_Baro: added num_instances() API --- libraries/AP_Baro/AP_Baro.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_Baro/AP_Baro.h b/libraries/AP_Baro/AP_Baro.h index 9825b835b2..185de9bddc 100644 --- a/libraries/AP_Baro/AP_Baro.h +++ b/libraries/AP_Baro/AP_Baro.h @@ -115,6 +115,9 @@ public: // slots it will panic uint8_t register_sensor(void); + // return number of registered sensors + uint8_t num_instances(void) const { return _num_sensors; } + private: // how many drivers do we have? uint8_t _num_drivers;