Browse Source

Copter: re-order init_sonar

No functional change.
mission-4.1.18
Randy Mackay 10 years ago
parent
commit
5104d5f0fe
  1. 16
      ArduCopter/sensors.pde

16
ArduCopter/sensors.pde

@ -1,12 +1,5 @@ @@ -1,12 +1,5 @@
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#if CONFIG_SONAR == ENABLED
static void init_sonar(void)
{
sonar.init();
}
#endif
static void init_barometer(bool full_calibration)
{
gcs_send_text_P(SEVERITY_LOW, PSTR("Calibrating barometer"));
@ -41,6 +34,13 @@ static void read_barometer(void) @@ -41,6 +34,13 @@ static void read_barometer(void)
}
}
#if CONFIG_SONAR == ENABLED
static void init_sonar(void)
{
sonar.init();
}
#endif
// return sonar altitude in centimeters
static int16_t read_sonar(void)
{
@ -77,6 +77,7 @@ static int16_t read_sonar(void) @@ -77,6 +77,7 @@ static int16_t read_sonar(void)
#endif
}
// initialise compass
static void init_compass()
{
if (!compass.init() || !compass.read()) {
@ -88,6 +89,7 @@ static void init_compass() @@ -88,6 +89,7 @@ static void init_compass()
ahrs.set_compass(&compass);
}
// initialise optical flow sensor
static void init_optflow()
{
#if OPTFLOW == ENABLED

Loading…
Cancel
Save