AntennaTracker: move initialisation of serial and gcs to AP_Vehicle

This commit is contained in:
Peter Barker 2020-02-12 12:01:17 +11:00 committed by Andrew Tridgell
parent 727c12c388
commit 2f159288e2
3 changed files with 7 additions and 10 deletions

View File

@ -1,6 +1,11 @@
#include "GCS_Tracker.h"
#include "Tracker.h"
uint8_t GCS_Tracker::sysid_this_mav() const
{
return tracker.g.sysid_this_mav;
}
void GCS_Tracker::request_datastream_position(const uint8_t sysid, const uint8_t compid)
{
for (uint8_t i=0; i < num_gcs(); i++) {

View File

@ -33,6 +33,8 @@ public:
protected:
uint8_t sysid_this_mav() const override;
GCS_MAVLINK_Tracker *new_gcs_mavlink_backend(GCS_MAVLINK_Parameters &params,
AP_HAL::UARTDriver &uart) override {
return new GCS_MAVLINK_Tracker(params, uart);

View File

@ -8,16 +8,6 @@ void Tracker::init_ardupilot()
// initialise stats module
stats.init();
mavlink_system.sysid = g.sysid_this_mav;
// initialise serial ports
serial_manager.init();
// setup first port early to allow BoardConfig to report errors
gcs().setup_console();
register_scheduler_delay_callback();
BoardConfig.init();
#if HAL_WITH_UAVCAN
BoardConfig_CAN.init();