Browse Source

ArduSub: remove pointless init_optflow wrapper

Hiding a one-line call in a wrapper just adds size to the build
zr-v5.1
Peter Barker 4 years ago committed by Randy Mackay
parent
commit
26d1e34c19
  1. 3
      ArduSub/Sub.h
  2. 9
      ArduSub/sensors.cpp
  3. 4
      ArduSub/system.cpp

3
ArduSub/Sub.h

@ -550,9 +550,6 @@ private: @@ -550,9 +550,6 @@ private:
void init_rangefinder(void);
void read_rangefinder(void);
bool rangefinder_alt_ok(void) const;
#if OPTFLOW == ENABLED
void init_optflow();
#endif
void terrain_update();
void terrain_logging();
void init_ardupilot() override;

9
ArduSub/sensors.cpp

@ -86,15 +86,6 @@ void Sub::rpm_update(void) @@ -86,15 +86,6 @@ void Sub::rpm_update(void)
}
#endif
// initialise optical flow sensor
#if OPTFLOW == ENABLED
void Sub::init_optflow()
{
// initialise optical flow sensor
optflow.init(MASK_LOG_OPTFLOW);
}
#endif // OPTFLOW == ENABLED
void Sub::accel_cal_update()
{
if (hal.util->get_soft_armed()) {

4
ArduSub/system.cpp

@ -94,9 +94,9 @@ void Sub::init_ardupilot() @@ -94,9 +94,9 @@ void Sub::init_ardupilot()
wp_nav.set_terrain(&terrain);
#endif
// init the optical flow sensor
#if OPTFLOW == ENABLED
init_optflow();
// initialise optical flow sensor
optflow.init(MASK_LOG_OPTFLOW);
#endif
#if HAL_MOUNT_ENABLED

Loading…
Cancel
Save