void ExternalLogger::Declare(const Declaration &decl, const Waypoint *home) { bool found_logger = false; for (unsigned i = 0; i < NUMDEV; ++i) { DeviceDescriptor &device = *device_list[i]; if (device.CanDeclare() && device.GetState() == PortState::READY) { found_logger = true; DeviceDeclare(device, decl, home); } } if (!found_logger) ShowMessageBox(_("No logger connected"), _("Declare task"), MB_OK | MB_ICONINFORMATION); }
void ExternalLogger::Declare(const OrderedTask& task) { DeclaredToDevice = false; bool found_logger = false; // don't do anything if task is not valid if (!task.check_task()) return; const Declaration decl(&task); for (unsigned i = 0; i < NUMDEV; ++i) if (DeviceDeclare(&DeviceList[i], decl)) found_logger = true; if (!found_logger) MessageBoxX(_("No logger connected"), _("Declare task"), MB_OK | MB_ICONINFORMATION); }