APMrover2: implement HAL::Callbacks

Also removes includes for each board since they are not necessary
anymore.
This commit is contained in:
Caio Marcelo de Oliveira Filho 2015-10-19 16:32:24 -02:00 committed by Andrew Tridgell
parent db3e501aec
commit 06b2c966c1
2 changed files with 5 additions and 24 deletions

View File

@ -505,16 +505,4 @@ void Rover::update_navigation()
}
}
void setup(void);
void loop(void);
void setup(void)
{
rover.setup();
}
void loop(void)
{
rover.loop();
}
AP_HAL_MAIN();
AP_HAL_MAIN_CALLBACKS(&rover);

View File

@ -73,13 +73,6 @@
#include <AP_BoardConfig/AP_BoardConfig.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 <AP_Notify/AP_Notify.h> // Notify library
@ -97,16 +90,16 @@
#include <AP_Declination/AP_Declination.h> // ArduPilot Mega Declination Helper Library
class Rover {
class Rover : public AP_HAL::HAL::Callbacks {
public:
friend class GCS_MAVLINK;
friend class Parameters;
Rover(void);
// public member functions
void setup(void);
void loop(void);
// HAL::Callbacks implementation.
void setup(void) override;
void loop(void) override;
private:
AP_HAL::BetterStream* cliSerial;