diff --git a/ArduPlane/ArduPlane.cpp b/ArduPlane/ArduPlane.cpp index 45503027ad..46f580200e 100644 --- a/ArduPlane/ArduPlane.cpp +++ b/ArduPlane/ArduPlane.cpp @@ -861,9 +861,6 @@ void Plane::set_flight_stage(AP_Vehicle::FixedWing::FlightStage fs) void Plane::update_alt() { barometer.update(); - if (should_log(MASK_LOG_IMU)) { - Log_Write_Baro(); - } // calculate the sink rate. float sink_rate; diff --git a/ArduPlane/Log.cpp b/ArduPlane/Log.cpp index 67876e3cc5..865f59fceb 100644 --- a/ArduPlane/Log.cpp +++ b/ArduPlane/Log.cpp @@ -294,13 +294,6 @@ void Plane::Log_Write_RC(void) Log_Write_AETR(); } -void Plane::Log_Write_Baro(void) -{ - if (!ahrs.have_ekf_logging()) { - DataFlash.Log_Write_Baro(); - } -} - // Write a AIRSPEED packet void Plane::Log_Write_Airspeed(void) { @@ -406,7 +399,6 @@ void Plane::Log_Arm_Disarm() {} void Plane::Log_Write_GPS(uint8_t instance) {} void Plane::Log_Write_IMU() {} void Plane::Log_Write_RC(void) {} -void Plane::Log_Write_Baro(void) {} void Plane::Log_Write_Airspeed(void) {} void Plane::Log_Write_Home_And_Origin() {} diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index ad5ce37a24..19f6c620f3 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -815,7 +815,6 @@ private: void Log_Write_GPS(uint8_t instance); void Log_Write_IMU(); void Log_Write_RC(void); - void Log_Write_Baro(void); void Log_Write_Airspeed(void); void Log_Write_Home_And_Origin(); void Log_Write_Vehicle_Startup_Messages(); diff --git a/ArduPlane/system.cpp b/ArduPlane/system.cpp index 1597d4302a..c0a6422a65 100644 --- a/ArduPlane/system.cpp +++ b/ArduPlane/system.cpp @@ -587,6 +587,7 @@ void Plane::startup_INS_ground(void) // read Baro pressure at ground //----------------------------- + barometer.set_log_baro_bit(MASK_LOG_IMU); barometer.calibrate(); if (airspeed.enabled()) {