APMrover2: implement HAL::Callbacks
Also removes includes for each board since they are not necessary anymore.
This commit is contained in:
parent
db3e501aec
commit
06b2c966c1
@ -505,16 +505,4 @@ void Rover::update_navigation()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup(void);
|
AP_HAL_MAIN_CALLBACKS(&rover);
|
||||||
void loop(void);
|
|
||||||
|
|
||||||
void setup(void)
|
|
||||||
{
|
|
||||||
rover.setup();
|
|
||||||
}
|
|
||||||
void loop(void)
|
|
||||||
{
|
|
||||||
rover.loop();
|
|
||||||
}
|
|
||||||
|
|
||||||
AP_HAL_MAIN();
|
|
||||||
|
@ -73,13 +73,6 @@
|
|||||||
#include <AP_BoardConfig/AP_BoardConfig.h>
|
#include <AP_BoardConfig/AP_BoardConfig.h>
|
||||||
#include <AP_Frsky_Telem/AP_Frsky_Telem.h>
|
#include <AP_Frsky_Telem/AP_Frsky_Telem.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_VRBRAIN/AP_HAL_VRBRAIN.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 "compat.h"
|
#include "compat.h"
|
||||||
|
|
||||||
#include <AP_Notify/AP_Notify.h> // Notify library
|
#include <AP_Notify/AP_Notify.h> // Notify library
|
||||||
@ -97,16 +90,16 @@
|
|||||||
|
|
||||||
#include <AP_Declination/AP_Declination.h> // ArduPilot Mega Declination Helper Library
|
#include <AP_Declination/AP_Declination.h> // ArduPilot Mega Declination Helper Library
|
||||||
|
|
||||||
class Rover {
|
class Rover : public AP_HAL::HAL::Callbacks {
|
||||||
public:
|
public:
|
||||||
friend class GCS_MAVLINK;
|
friend class GCS_MAVLINK;
|
||||||
friend class Parameters;
|
friend class Parameters;
|
||||||
|
|
||||||
Rover(void);
|
Rover(void);
|
||||||
|
|
||||||
// public member functions
|
// HAL::Callbacks implementation.
|
||||||
void setup(void);
|
void setup(void) override;
|
||||||
void loop(void);
|
void loop(void) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AP_HAL::BetterStream* cliSerial;
|
AP_HAL::BetterStream* cliSerial;
|
||||||
|
Loading…
Reference in New Issue
Block a user