diff --git a/AntennaTracker/AntennaTracker.cpp b/AntennaTracker/AntennaTracker.cpp index b69eca0be7..4fb3c2d711 100644 --- a/AntennaTracker/AntennaTracker.cpp +++ b/AntennaTracker/AntennaTracker.cpp @@ -127,19 +127,4 @@ Tracker::Tracker(void) Tracker tracker; -/* - compatibility with old pde style build - */ -void setup(void); -void loop(void); - -void setup(void) -{ - tracker.setup(); -} -void loop(void) -{ - tracker.loop(); -} - -AP_HAL_MAIN(); +AP_HAL_MAIN_CALLBACKS(&tracker); diff --git a/AntennaTracker/Tracker.h b/AntennaTracker/Tracker.h index feaec24521..c4a198575e 100644 --- a/AntennaTracker/Tracker.h +++ b/AntennaTracker/Tracker.h @@ -76,21 +76,16 @@ #include "Parameters.h" #include -#include -#include -#include -#include -#include -#include - -class Tracker { +class Tracker : public AP_HAL::HAL::Callbacks { public: friend class GCS_MAVLINK; friend class Parameters; Tracker(void); - void setup(); - void loop(); + + // HAL::Callbacks implementation. + void setup() override; + void loop() override; private: const AP_InertialSensor::Sample_rate ins_sample_rate = AP_InertialSensor::RATE_50HZ;