From c42fb6d79796f1ffa6aa34740297d82da02946e7 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 3 Jul 2018 19:02:03 +1000 Subject: [PATCH] Plane: remove pointless rangefinder_init shim function --- ArduPlane/Plane.h | 1 - ArduPlane/sensors.cpp | 5 ----- ArduPlane/system.cpp | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index 286e9fa973..80e8d49b06 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -912,7 +912,6 @@ private: void control_failsafe(); bool trim_radio(); bool rc_failsafe_active(void); - void init_rangefinder(void); void read_rangefinder(void); void read_airspeed(void); void rpm_update(void); diff --git a/ArduPlane/sensors.cpp b/ArduPlane/sensors.cpp index 0e4a82b83a..74f576e8b8 100644 --- a/ArduPlane/sensors.cpp +++ b/ArduPlane/sensors.cpp @@ -1,11 +1,6 @@ #include "Plane.h" #include -void Plane::init_rangefinder(void) -{ - rangefinder.init(); -} - /* read the rangefinder and update height estimate */ diff --git a/ArduPlane/system.cpp b/ArduPlane/system.cpp index 5d544d9155..c4096650bf 100644 --- a/ArduPlane/system.cpp +++ b/ArduPlane/system.cpp @@ -103,7 +103,7 @@ void Plane::init_ardupilot() barometer.init(); // initialise rangefinder - init_rangefinder(); + rangefinder.init(); // initialise battery monitoring battery.init();