bool DeviceDescriptor::Declare(const struct Declaration &declaration, const Waypoint *home, OperationEnvironment &env) { if (port == NULL) return false; SetBusy(true); StaticString<60> text; text.Format(_T("%s: %s."), _("Sending declaration"), driver->display_name); env.SetText(text); port->StopRxThread(); bool result = device != NULL && device->Declare(declaration, home, env); if (device_blackboard->IsFLARM(index) && !IsDriver(_T("FLARM"))) { text.Format(_T("%s: FLARM."), _("Sending declaration")); env.SetText(text); FlarmDevice flarm(*port); result = flarm.Declare(declaration, home, env) || result; } port->StartRxThread(); SetBusy(false); return result; }
bool DeviceDescriptor::Declare(const struct Declaration &declaration, const Waypoint *home, OperationEnvironment &env) { assert(borrowed); assert(port != nullptr); assert(driver != nullptr); assert(device != nullptr); // explicitly set passthrough device? Use it... if (driver->HasPassThrough() && second_device != nullptr) { // set the primary device to passthrough device->EnablePassThrough(env); return second_device != nullptr && second_device->Declare(declaration, home, env); } else { /* enable the "muxed FLARM" hack? */ const bool flarm = device_blackboard->IsFLARM(index) && !IsDriver(_T("FLARM")); return DoDeclare(declaration, *port, *driver, device, flarm, home, env); } }
bool DeviceDescriptor::Declare(const struct Declaration &declaration, const Waypoint *home, OperationEnvironment &env) { assert(borrowed); assert(port != nullptr); assert(driver != nullptr); assert(device != nullptr); /* enable the "muxed FLARM" hack? */ const bool flarm = device_blackboard->IsFLARM(index) && !IsDriver(_T("FLARM")); return DoDeclare(declaration, *port, *driver, device, flarm, home, env); }
bool IsVega() const { return IsDriver(_T("Vega")); }
bool IsCondor() const { return IsDriver(_T("Condor")); }