void LoggerImpl::LoggerDeviceDeclare() { bool found_logger = false; Declaration_t Decl; int i; GetRegistryString(szRegistryPilotName, Decl.PilotName, 64); GetRegistryString(szRegistryAircraftType, Decl.AircraftType, 32); GetRegistryString(szRegistryAircraftRego, Decl.AircraftRego, 32); for (i = 0; task.ValidTaskPoint(i); i++) { Decl.waypoint[i] = &task.getWaypoint(i); } Decl.num_waypoints = i; DeclaredToDevice = false; if (LoggerDeclare(devA(), &Decl)) found_logger = true; if (LoggerDeclare(devB(), &Decl)) found_logger = true; if (!found_logger) { MessageBoxX(gettext(TEXT("No logger connected")), devB()->Name, MB_OK| MB_ICONINFORMATION); DeclaredToDevice = true; // testing only } }
void LoggerDeviceDeclare() { bool found_logger = false; Declaration_t Decl; int i; #if 0 if (CALCULATED_INFO.Flying) { // LKTOKEN _@M1423_ = "Forbidden during flight!" MessageBoxX(hWndMapWindow, gettext(TEXT("_@M1423_")), _T(""), MB_OK| MB_ICONINFORMATION); return; } #endif _tcscpy(Decl.PilotName, PilotName_Config); // max 64 _tcscpy(Decl.AircraftType,AircraftType_Config); // max 32 _tcscpy(Decl.AircraftRego,AircraftRego_Config); // max 32 _tcscpy(Decl.CompetitionClass,CompetitionClass_Config); // _tcscpy(Decl.CompetitionID,CompetitionID_Config); // max 32 for (i = 0; i < MAXTASKPOINTS; i++) { if (Task[i].Index == -1) break; Decl.waypoint[i] = &WayPointList[Task[i].Index]; } Decl.num_waypoints = i; DeclaredToDevice = false; if (LoggerDeclare(devA(), &Decl)) found_logger = true; if (LoggerDeclare(devB(), &Decl)) found_logger = true; if (!found_logger) { // LKTOKEN _@M474_ = "No logger connected" MessageBoxX(hWndMapWindow, gettext(TEXT("_@M474_")), devB()->Name, MB_OK| MB_ICONINFORMATION); DeclaredToDevice = true; // testing only } }