Browse Source

Plane: use ins singleton

mission-4.1.18
Peter Barker 7 years ago committed by Lucas De Marchi
parent
commit
7c86c4fe61
  1. 2
      ArduPlane/ArduPlane.cpp
  2. 6
      ArduPlane/Log.cpp
  3. 4
      ArduPlane/Plane.h

2
ArduPlane/ArduPlane.cpp

@ -262,7 +262,7 @@ void Plane::update_logging2(void) @@ -262,7 +262,7 @@ void Plane::update_logging2(void)
Log_Write_RC();
if (should_log(MASK_LOG_IMU))
DataFlash.Log_Write_Vibration(ins);
DataFlash.Log_Write_Vibration();
}

6
ArduPlane/Log.cpp

@ -158,7 +158,7 @@ void Plane::Log_Write_Status() @@ -158,7 +158,7 @@ void Plane::Log_Write_Status()
,armed : hal.util->get_soft_armed()
,safety : static_cast<uint8_t>(hal.util->safety_switch_state())
,is_crashed : crash_state.is_crashed
,is_still : plane.ins.is_still()
,is_still : AP::ins().is_still()
,stage : static_cast<uint8_t>(flight_stage)
,impact : crash_state.impact_detected
};
@ -279,9 +279,9 @@ void Plane::Log_Write_GPS(uint8_t instance) @@ -279,9 +279,9 @@ void Plane::Log_Write_GPS(uint8_t instance)
}
}
void Plane::Log_Write_IMU()
void Plane::Log_Write_IMU()
{
DataFlash.Log_Write_IMU(ins);
DataFlash.Log_Write_IMU();
}
void Plane::Log_Write_RC(void)

4
ArduPlane/Plane.h

@ -216,9 +216,9 @@ private: @@ -216,9 +216,9 @@ private:
#if AP_AHRS_NAVEKF_AVAILABLE
NavEKF2 EKF2{&ahrs, rangefinder};
NavEKF3 EKF3{&ahrs, rangefinder};
AP_AHRS_NavEKF ahrs{ins, EKF2, EKF3};
AP_AHRS_NavEKF ahrs{EKF2, EKF3};
#else
AP_AHRS_DCM ahrs{ins};
AP_AHRS_DCM ahrs;
#endif
AP_TECS TECS_controller{ahrs, aparm, landing, g2.soaring_controller};

Loading…
Cancel
Save