Copter: remove pointless wrapper around proximity init

This commit is contained in:
Peter Barker 2021-12-30 12:14:22 +11:00 committed by Randy Mackay
parent f44335371f
commit 6bfcf2fb53
3 changed files with 3 additions and 11 deletions

View File

@ -864,7 +864,6 @@ private:
void rpm_update();
void update_optical_flow(void);
void compass_cal_update(void);
void init_proximity();
// RC_Channel.cpp
void save_trim();

View File

@ -159,12 +159,3 @@ void Copter::rpm_update(void)
}
#endif
}
// initialise proximity sensor
void Copter::init_proximity(void)
{
#if HAL_PROXIMITY_ENABLED
g2.proximity.init();
#endif
}

View File

@ -149,8 +149,10 @@ void Copter::init_ardupilot()
// initialise rangefinder
init_rangefinder();
#if HAL_PROXIMITY_ENABLED
// init proximity sensor
init_proximity();
g2.proximity.init();
#endif
#if BEACON_ENABLED == ENABLED
// init beacons used for non-gps position estimation