mirror of https://github.com/ArduPilot/ardupilot
Tracker: move setup method up to AP_Vehicle base class
This commit is contained in:
parent
0728514f74
commit
dfc274e547
|
@ -55,18 +55,13 @@ const AP_Scheduler::Task Tracker::scheduler_tasks[] = {
|
|||
SCHED_TASK(accel_cal_update, 10, 100)
|
||||
};
|
||||
|
||||
/**
|
||||
setup the sketch - called once on startup
|
||||
*/
|
||||
void Tracker::setup()
|
||||
void Tracker::get_scheduler_tasks(const AP_Scheduler::Task *&tasks,
|
||||
uint8_t &task_count,
|
||||
uint32_t &log_bit)
|
||||
{
|
||||
// load the default values of variables listed in var_info[]
|
||||
AP_Param::setup_sketch_defaults();
|
||||
|
||||
init_tracker();
|
||||
|
||||
// initialise the main loop scheduler
|
||||
scheduler.init(&scheduler_tasks[0], ARRAY_SIZE(scheduler_tasks), (uint32_t)-1);
|
||||
tasks = &scheduler_tasks[0];
|
||||
task_count = ARRAY_SIZE(scheduler_tasks);
|
||||
log_bit = (uint32_t)-1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -77,7 +77,6 @@ public:
|
|||
static const AP_FWVersion fwver;
|
||||
|
||||
// HAL::Callbacks implementation.
|
||||
void setup() override;
|
||||
void loop() override;
|
||||
|
||||
private:
|
||||
|
@ -174,7 +173,10 @@ private:
|
|||
// true if the compass's initial location has been set
|
||||
bool compass_init_location;
|
||||
|
||||
// AntennaTracker.cpp
|
||||
// Tracker.cpp
|
||||
void get_scheduler_tasks(const AP_Scheduler::Task *&tasks,
|
||||
uint8_t &task_count,
|
||||
uint32_t &log_bit) override;
|
||||
void one_second_loop();
|
||||
void ten_hz_logging_loop();
|
||||
void stats_update();
|
||||
|
@ -215,7 +217,7 @@ private:
|
|||
void update_yaw_cr_servo(float yaw);
|
||||
|
||||
// system.cpp
|
||||
void init_tracker();
|
||||
void init_ardupilot() override;
|
||||
bool get_home_eeprom(struct Location &loc);
|
||||
bool set_home_eeprom(const Location &temp) WARN_IF_UNUSED;
|
||||
bool set_home(const Location &temp) WARN_IF_UNUSED;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// mission storage
|
||||
static const StorageAccess wp_storage(StorageManager::StorageMission);
|
||||
|
||||
void Tracker::init_tracker()
|
||||
void Tracker::init_ardupilot()
|
||||
{
|
||||
// initialise console serial port
|
||||
serial_manager.init_console();
|
||||
|
|
Loading…
Reference in New Issue