Rover: pass sonar into ahrs constructor

This commit is contained in:
Randy Mackay 2015-04-24 11:22:16 +09:00
parent 94dc973c29
commit d5934343d4

View File

@ -212,9 +212,13 @@ AP_ADC_ADS7844 apm1_adc;
AP_InertialSensor ins;
////////////////////////////////////////////////////////////////////////////////
// SONAR
static RangeFinder sonar;
// Inertial Navigation EKF
#if AP_AHRS_NAVEKF_AVAILABLE
AP_AHRS_NavEKF ahrs(ins, barometer, gps);
AP_AHRS_NavEKF ahrs(ins, barometer, gps, sonar);
#else
AP_AHRS_DCM ahrs(ins, barometer, gps);
#endif
@ -253,10 +257,6 @@ static GCS_MAVLINK gcs[MAVLINK_COMM_NUM_BUFFERS];
// is to take the 0 to 1024 range down to an 8 bit range for MAVLink
AP_HAL::AnalogSource *rssi_analog_source;
////////////////////////////////////////////////////////////////////////////////
// SONAR
static RangeFinder sonar;
// relay support
AP_Relay relay;