Browse Source

ArduPlane: implement HAL::Callbacks

Also removes includes for each board since they are not necessary
anymore.
master
Caio Marcelo de Oliveira Filho 9 years ago committed by Andrew Tridgell
parent
commit
db3e501aec
  1. 17
      ArduPlane/ArduPlane.cpp
  2. 16
      ArduPlane/Plane.h

17
ArduPlane/ArduPlane.cpp

@ -908,19 +908,4 @@ void Plane::update_optical_flow(void) @@ -908,19 +908,4 @@ void Plane::update_optical_flow(void)
}
#endif
/*
compatibility with old pde style build
*/
void setup(void);
void loop(void);
void setup(void)
{
plane.setup();
}
void loop(void)
{
plane.loop();
}
AP_HAL_MAIN();
AP_HAL_MAIN_CALLBACKS(&plane);

16
ArduPlane/Plane.h

@ -104,14 +104,6 @@ @@ -104,14 +104,6 @@
#include "Parameters.h"
#include <AP_HAL_AVR/AP_HAL_AVR.h>
#include <AP_HAL_SITL/AP_HAL_SITL.h>
#include <AP_HAL_PX4/AP_HAL_PX4.h>
#include <AP_HAL_FLYMAPLE/AP_HAL_FLYMAPLE.h>
#include <AP_HAL_Linux/AP_HAL_Linux.h>
#include <AP_HAL_Empty/AP_HAL_Empty.h>
#include <AP_HAL_VRBRAIN/AP_HAL_VRBRAIN.h>
/*
a plane specific arming class
*/
@ -134,15 +126,17 @@ protected: @@ -134,15 +126,17 @@ protected:
/*
main APM:Plane class
*/
class Plane {
class Plane : public AP_HAL::HAL::Callbacks {
public:
friend class GCS_MAVLINK;
friend class Parameters;
friend class AP_Arming_Plane;
Plane(void);
void setup();
void loop();
// HAL::Callbacks implementation.
void setup() override;
void loop() override;
private:
// key aircraft parameters passed to multiple libraries

Loading…
Cancel
Save