Skip to content

Commit

Permalink
Copter: remove pointless wrapper around proximity init
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and rmackay9 committed Jan 4, 2022
1 parent f443353 commit 6bfcf2f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion ArduCopter/Copter.h
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,6 @@ class Copter : public AP_Vehicle {
void rpm_update();
void update_optical_flow(void);
void compass_cal_update(void);
void init_proximity();

// RC_Channel.cpp
void save_trim();
Expand Down
9 changes: 0 additions & 9 deletions ArduCopter/sensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 3 additions & 1 deletion ArduCopter/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6bfcf2f

Please sign in to comment.