|
|
|
@ -264,7 +264,6 @@ GCS_MAVLINK gcs3;
@@ -264,7 +264,6 @@ GCS_MAVLINK gcs3;
|
|
|
|
|
// PITOT selection |
|
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
|
|
|
|
// |
|
|
|
|
ModeFilterInt16_Size5 sonar_mode_filter(2); |
|
|
|
|
|
|
|
|
|
#if CONFIG_PITOT_SOURCE == PITOT_SOURCE_ADC |
|
|
|
|
AP_AnalogSource_ADC pitot_analog_source( &adc, |
|
|
|
@ -273,14 +272,6 @@ AP_AnalogSource_ADC pitot_analog_source( &adc,
@@ -273,14 +272,6 @@ AP_AnalogSource_ADC pitot_analog_source( &adc,
|
|
|
|
|
AP_AnalogSource_Arduino pitot_analog_source(CONFIG_PITOT_SOURCE_ANALOG_PIN, 4.0); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#if SONAR_TYPE == MAX_SONAR_XL |
|
|
|
|
AP_RangeFinder_MaxsonarXL sonar(&pitot_analog_source, &sonar_mode_filter); |
|
|
|
|
#elif SONAR_TYPE == MAX_SONAR_LV |
|
|
|
|
// XXX honestly I think these output the same values |
|
|
|
|
// If someone knows, can they confirm it? |
|
|
|
|
AP_RangeFinder_MaxsonarXL sonar(&pitot_analog_source, &sonar_mode_filter); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#if RECEIVER_RSSI_PIN != -1 |
|
|
|
|
AP_AnalogSource_Arduino RSSI_pin(RECEIVER_RSSI_PIN, 0.25); |
|
|
|
|
#endif |
|
|
|
@ -483,9 +474,6 @@ AP_Airspeed airspeed(&pitot_analog_source);
@@ -483,9 +474,6 @@ AP_Airspeed airspeed(&pitot_analog_source);
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
|
|
|
|
// Altitude Sensor variables |
|
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
|
|
|
|
// Altitude from the sonar sensor. Meters. Not yet implemented. |
|
|
|
|
static int16_t sonar_alt; |
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
|
|
|
|
// flight mode specific |
|
|
|
@ -886,7 +874,6 @@ static void medium_loop()
@@ -886,7 +874,6 @@ static void medium_loop()
|
|
|
|
|
// Read altitude from sensors |
|
|
|
|
// ------------------ |
|
|
|
|
update_alt(); |
|
|
|
|
if(g.sonar_enabled) sonar_alt = sonar.read(); |
|
|
|
|
|
|
|
|
|
// altitude smoothing |
|
|
|
|
// ------------------ |
|
|
|
|