Browse Source

Merge pull request #8888 from DonLakeFlyer/SyncRetry

Flash: Retry sync for all boards
QGC4.4
Don Gagne 5 years ago committed by GitHub
parent
commit
0c0a76257e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      src/VehicleSetup/Bootloader.cc

15
src/VehicleSetup/Bootloader.cc

@ -705,16 +705,13 @@ bool Bootloader::_syncWorker(void)
bool Bootloader::_sync(void) bool Bootloader::_sync(void)
{ {
if (_sikRadio) { // Sometimes getting sync is flaky, try 3 times
_port.readAll(); _port.readAll();
bool success = false; bool success = false;
for (int i=0; i<3; i++) { for (int i=0; i<3; i++) {
success = _syncWorker(); success = _syncWorker();
}
return success;
} else {
return _syncWorker();
} }
return success;
} }
bool Bootloader::_get3DRRadioBoardId(uint32_t& boardID) bool Bootloader::_get3DRRadioBoardId(uint32_t& boardID)

Loading…
Cancel
Save