Browse Source

Sub: fixed startup order of setting mavlink system ID

Set sysid from param before you init the serial port so you always output the intended sysid. Ported the same fix as c01a7718c1
master
Tom Pittenger 8 years ago committed by GitHub
parent
commit
51fa76d971
  1. 6
      ArduSub/system.cpp

6
ArduSub/system.cpp

@ -32,6 +32,9 @@ void Sub::init_ardupilot() @@ -32,6 +32,9 @@ void Sub::init_ardupilot()
BoardConfig.init();
// identify ourselves correctly with the ground station
mavlink_system.sysid = g.sysid_this_mav;
// initialise serial port
serial_manager.init();
@ -60,9 +63,6 @@ void Sub::init_ardupilot() @@ -60,9 +63,6 @@ void Sub::init_ardupilot()
gcs_chan[i].setup_uart(serial_manager, AP_SerialManager::SerialProtocol_MAVLink, i);
}
// identify ourselves correctly with the ground station
mavlink_system.sysid = g.sysid_this_mav;
#if LOGGING_ENABLED == ENABLED
log_init();
#endif

Loading…
Cancel
Save