Browse Source

Plane: move sending of airspeed_autocal into AP_AirSpeed

mission-4.1.18
Peter Barker 6 years ago committed by Peter Barker
parent
commit
bd444d97dc
  1. 1
      ArduPlane/ArduPlane.cpp
  2. 8
      ArduPlane/GCS_Mavlink.cpp
  3. 11
      ArduPlane/GCS_Plane.cpp
  4. 2
      ArduPlane/GCS_Plane.h
  5. 2
      ArduPlane/Plane.h

1
ArduPlane/ArduPlane.cpp

@ -347,7 +347,6 @@ void Plane::airspeed_ratio_update(void) @@ -347,7 +347,6 @@ void Plane::airspeed_ratio_update(void)
}
const Vector3f &vg = gps.velocity();
airspeed.update_calibration(vg, aparm.airspeed_max);
gcs_send_airspeed_calibration(vg);
}

8
ArduPlane/GCS_Mavlink.cpp

@ -1416,14 +1416,6 @@ void Plane::mavlink_delay_cb() @@ -1416,14 +1416,6 @@ void Plane::mavlink_delay_cb()
logger.EnableWrites(true);
}
/*
send airspeed calibration data
*/
void Plane::gcs_send_airspeed_calibration(const Vector3f &vg)
{
gcs().send_airspeed_calibration(vg);
}
void GCS_MAVLINK_Plane::handle_mission_set_current(AP_Mission &mission, mavlink_message_t *msg)
{
plane.auto_state.next_wp_crosstrack = false;

11
ArduPlane/GCS_Plane.cpp

@ -1,17 +1,6 @@ @@ -1,17 +1,6 @@
#include "GCS_Plane.h"
#include "Plane.h"
void GCS_Plane::send_airspeed_calibration(const Vector3f &vg)
{
for (uint8_t i=0; i<num_gcs(); i++) {
if (_chan[i].initialised) {
if (HAVE_PAYLOAD_SPACE((mavlink_channel_t)i, AIRSPEED_AUTOCAL)) {
plane.airspeed.log_mavlink_send((mavlink_channel_t)i, vg);
}
}
}
}
// update error mask of sensors and subsystems. The mask
// uses the MAV_SYS_STATUS_* values from mavlink. If a bit is set
// then it indicates that the sensor or subsystem is present but

2
ArduPlane/GCS_Plane.h

@ -20,8 +20,6 @@ public: @@ -20,8 +20,6 @@ public:
return _chan[ofs];
};
void send_airspeed_calibration(const Vector3f &vg);
protected:
void update_sensor_status_flags(void) override;

2
ArduPlane/Plane.h

@ -796,8 +796,6 @@ private: @@ -796,8 +796,6 @@ private:
void send_aoa_ssa(mavlink_channel_t chan);
void gcs_send_airspeed_calibration(const Vector3f &vg);
void Log_Write_Fast(void);
void Log_Write_Attitude(void);
void Log_Write_Performance();

Loading…
Cancel
Save