mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AntennaTracker: move initialisation of serial and gcs to AP_Vehicle
This commit is contained in:
parent
727c12c388
commit
2f159288e2
@ -1,6 +1,11 @@
|
|||||||
#include "GCS_Tracker.h"
|
#include "GCS_Tracker.h"
|
||||||
#include "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)
|
void GCS_Tracker::request_datastream_position(const uint8_t sysid, const uint8_t compid)
|
||||||
{
|
{
|
||||||
for (uint8_t i=0; i < num_gcs(); i++) {
|
for (uint8_t i=0; i < num_gcs(); i++) {
|
||||||
|
@ -33,6 +33,8 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
uint8_t sysid_this_mav() const override;
|
||||||
|
|
||||||
GCS_MAVLINK_Tracker *new_gcs_mavlink_backend(GCS_MAVLINK_Parameters ¶ms,
|
GCS_MAVLINK_Tracker *new_gcs_mavlink_backend(GCS_MAVLINK_Parameters ¶ms,
|
||||||
AP_HAL::UARTDriver &uart) override {
|
AP_HAL::UARTDriver &uart) override {
|
||||||
return new GCS_MAVLINK_Tracker(params, uart);
|
return new GCS_MAVLINK_Tracker(params, uart);
|
||||||
|
@ -8,16 +8,6 @@ void Tracker::init_ardupilot()
|
|||||||
// initialise stats module
|
// initialise stats module
|
||||||
stats.init();
|
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();
|
BoardConfig.init();
|
||||||
#if HAL_WITH_UAVCAN
|
#if HAL_WITH_UAVCAN
|
||||||
BoardConfig_CAN.init();
|
BoardConfig_CAN.init();
|
||||||
|
Loading…
Reference in New Issue
Block a user