Browse Source

Plane: let AP_Vehicle handle loop()

zr-v5.1
Peter Barker 5 years ago committed by Peter Barker
parent
commit
58d45ef04a
  1. 6
      ArduPlane/ArduPlane.cpp
  2. 11
      ArduPlane/Plane.h

6
ArduPlane/ArduPlane.cpp

@ -123,12 +123,6 @@ void Plane::get_scheduler_tasks(const AP_Scheduler::Task *&tasks,
constexpr int8_t Plane::_failsafe_priorities[7]; constexpr int8_t Plane::_failsafe_priorities[7];
void Plane::loop()
{
scheduler.loop();
G_Dt = scheduler.get_loop_period_s();
}
// update AHRS system // update AHRS system
void Plane::ahrs_update() void Plane::ahrs_update()
{ {

11
ArduPlane/Plane.h

@ -160,9 +160,6 @@ public:
Plane(void); Plane(void);
// HAL::Callbacks implementation.
void loop() override;
private: private:
// key aircraft parameters passed to multiple libraries // key aircraft parameters passed to multiple libraries
@ -172,9 +169,6 @@ private:
Parameters g; Parameters g;
ParametersG2 g2; ParametersG2 g2;
// main loop scheduler
AP_Scheduler scheduler;
// mapping between input channels // mapping between input channels
RCMapper rcmap; RCMapper rcmap;
@ -726,11 +720,6 @@ private:
float relative_altitude; float relative_altitude;
// INS variables
// The main loop execution time. Seconds
// This is the time between calls to the DCM algorithm and is the Integration time for the gyros.
float G_Dt = 0.02f;
// loop performance monitoring: // loop performance monitoring:
AP::PerfInfo perf_info; AP::PerfInfo perf_info;
struct { struct {

Loading…
Cancel
Save