Copter: fixed startup order of setting mavlink system ID

This commit is contained in:
Andrew Tridgell 2016-10-17 09:19:08 +11:00
parent 33bff3c79c
commit c01a7718c1
1 changed files with 3 additions and 3 deletions

View File

@ -112,6 +112,9 @@ void Copter::init_ardupilot()
GCS_MAVLINK::set_dataflash(&DataFlash);
// identify ourselves correctly with the ground station
mavlink_system.sysid = g.sysid_this_mav;
// initialise serial ports
serial_manager.init();
@ -158,9 +161,6 @@ void Copter::init_ardupilot()
&g.fs_batt_voltage, &g.fs_batt_mah, &ap.value);
#endif
// identify ourselves correctly with the ground station
mavlink_system.sysid = g.sysid_this_mav;
#if LOGGING_ENABLED == ENABLED
log_init();
#endif