ArduPlane: implement HAL::Callbacks
Also removes includes for each board since they are not necessary anymore.
This commit is contained in:
parent
3e3f13659d
commit
db3e501aec
@ -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);
|
||||
|
@ -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:
|
||||
/*
|
||||
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…
Reference in New Issue
Block a user