本文整理汇总了C++中DoStatusMessage函数的典型用法代码示例。如果您正苦于以下问题:C++ DoStatusMessage函数的具体用法?C++ DoStatusMessage怎么用?C++ DoStatusMessage使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DoStatusMessage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PWES2
static BOOL PWES2(PDeviceDescriptor_t d, TCHAR *String, NMEA_INFO *pGPS)
{
// $PWES2: Datenausgabe, Geräteparameter
// $PWES2,DD,SSSS,YY,FFFF*CS<CR><LF>
// Symbol Inhalt Einheit Wertebereich Beispiel
// DD Device 20=VW1000,
// 21=VW1010,
// 22=VW1020,
// 23=VW1030,
// 60=VW1150
// 22 für VW1020
// SSSS Seriennummer 0 .. 9999
// YY Baujahr 0 .. 99 10 = 2010
// FFFF Firmware * 100 100 .. 9999 101 = 1.01
// $PWES2,60,1234,12,3210*22
#ifdef DEVICE_SERIAL
TCHAR ctemp[180];
static int NoMsg=0;
if(_tcslen(String) < 180)
if(((pGPS->SerialNumber == 0) || (oldSerial != SerialNumber)) && (NoMsg < 5))
{
NoMsg++ ;
NMEAParser::ExtractParameter(String,ctemp,0);
pGPS->HardwareId= (int)StrToDouble(ctemp,NULL);
switch (pGPS->HardwareId)
{
case 21: _tcscpy(d->Name, TEXT("VW1010")); break;
case 22: _tcscpy(d->Name, TEXT("VW1020")); break;
case 23: _tcscpy(d->Name, TEXT("VW1030")); break;
case 60: _tcscpy(d->Name, TEXT("VW1150")); break;
default: _tcscpy(d->Name, TEXT("Westerboer")); break;
}
NMEAParser::ExtractParameter(String,ctemp,1);
pGPS->SerialNumber= (int)StrToDouble(ctemp,NULL);
SerialNumber = pGPS->SerialNumber;
NMEAParser::ExtractParameter(String,ctemp,2);
int Year = (int)(StrToDouble(ctemp,NULL));
NMEAParser::ExtractParameter(String,ctemp,3);
pGPS->SoftwareVer= StrToDouble(ctemp,NULL)/100.0;
_stprintf(ctemp, _T("%s (#%i) DETECTED"), d->Name, pGPS->SerialNumber);
DoStatusMessage(ctemp);
StartupStore(_T(". %s\n"),ctemp);
_stprintf(ctemp, _T("SW Ver:%3.2f HW Ver:%i "), pGPS->SoftwareVer, Year);
DoStatusMessage(ctemp);
StartupStore(_T(". %s\n"),ctemp);
oldSerial =SerialNumber;
}
// nothing to do
#endif
return(true);
} // PWES2()
示例2: Notify
void Notify(void) {
if (withinMargin)
// LKTOKEN [email protected]_ = "Start rules violated\r\nbut within margin"
DoStatusMessage(gettext(TEXT("[email protected]_")));
else
// LKTOKEN [email protected]_ = "Start rules violated"
DoStatusMessage(gettext(TEXT("[email protected]_")));
};
示例3: ToggleBaroAltitude
void ToggleBaroAltitude() {
if (!GPS_INFO.BaroAltitudeAvailable) {
DoStatusMessage(MsgToken(121)); // BARO ALTITUDE NOT AVAILABLE
return;
}
EnableNavBaroAltitude=!EnableNavBaroAltitude;
if (EnableNavBaroAltitude)
DoStatusMessage(MsgToken(1796)); // USING BARO ALTITUDE
else
DoStatusMessage(MsgToken(757)); // USING GPS ALTITUDE
}
示例4: AirspeedProcessing
void AirspeedProcessing(int UpDown)
{
#if 0
if (UpDown==0) {
EnableCalibration = !EnableCalibration;
// XXX InputEvents - Is this an automatic or user thing - either way, needs moving
if (EnableCalibration)
DoStatusMessage(TEXT("Calibrate ON"));
else
DoStatusMessage(TEXT("Calibrate OFF"));
}
#endif
}
示例5: _stprintf
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/// Parses LXWP1 sentence.
///
/// @param d device descriptor
/// @param sentence received NMEA sentence
/// @param info GPS info to be updated
///
/// @retval true if the sentence has been parsed
///
//static
bool DevLX16xx::LXWP1(PDeviceDescriptor_t d, const TCHAR* String, NMEA_INFO* pGPS)
{
// $LXWP1,serial number,instrument ID, software version, hardware
// version,license string,NU*SC<CR><LF>
//
// instrument ID ID of LX1600
// serial number unsigned serial number
// software version float sw version
// hardware version float hw version
// license string (option to store a license of PDA SW into LX1600)
// ParToDouble(sentence, 1, &MACCREADY);
// $LXWP1,LX5000IGC-2,15862,11.1 ,2.0*4A
#ifdef DEVICE_SERIAL
TCHAR ctemp[180];
static int NoMsg=0;
static int oldSerial=0;
if(_tcslen(String) < 180)
if((( pGPS->SerialNumber == 0) || ( pGPS->SerialNumber != oldSerial)) && (NoMsg < 5))
{
NoMsg++ ;
NMEAParser::ExtractParameter(String,ctemp,0);
if(_tcslen(ctemp) < DEVNAMESIZE)
_stprintf(d->Name, _T("%s"),ctemp);
StartupStore(_T(". %s\n"),ctemp);
NMEAParser::ExtractParameter(String,ctemp,1);
pGPS->SerialNumber= (int)StrToDouble(ctemp,NULL);
oldSerial = pGPS->SerialNumber;
_stprintf(ctemp, _T("%s Serial Number %i"), d->Name, pGPS->SerialNumber);
StartupStore(_T(". %s\n"),ctemp);
NMEAParser::ExtractParameter(String,ctemp,2);
pGPS->SoftwareVer= StrToDouble(ctemp,NULL);
_stprintf(ctemp, _T("%s Software Vers.: %3.2f"), d->Name, pGPS->SoftwareVer);
StartupStore(_T(". %s\n"),ctemp);
NMEAParser::ExtractParameter(String,ctemp,3);
pGPS->HardwareId= (int)(StrToDouble(ctemp,NULL)*10);
_stprintf(ctemp, _T("%s Hardware Vers.: %3.2f"), d->Name, (double)(pGPS->HardwareId)/10.0);
StartupStore(_T(". %s\n"),ctemp);
_stprintf(ctemp, _T("%s (#%i) DETECTED"), d->Name, pGPS->SerialNumber);
DoStatusMessage(ctemp);
_stprintf(ctemp, _T("SW Ver: %3.2f HW Ver: %3.2f "), pGPS->SoftwareVer, (double)(pGPS->HardwareId)/10.0);
DoStatusMessage(ctemp);
}
// nothing to do
#endif
return(true);
} // LXWP1()
示例6: ToggleBaroAltitude
void ToggleBaroAltitude() {
if (!GPS_INFO.BaroAltitudeAvailable) {
// LKTOKEN [email protected]_ = "BARO ALTITUDE NOT AVAILABLE"
DoStatusMessage(gettext(TEXT("[email protected]_")));
return;
}
EnableNavBaroAltitude=!EnableNavBaroAltitude;
if (EnableNavBaroAltitude)
// LKTOKEN [email protected]_ = "USING BARO ALTITUDE"
DoStatusMessage(gettext(TEXT("[email protected]_")));
else
// LKTOKEN [email protected]_ = "USING GPS ALTITUDE"
DoStatusMessage(gettext(TEXT("[email protected]_")));
}
示例7: GiveBatteryWarnings
bool GiveBatteryWarnings(void)
{
static bool toomany=false;
static double last_time=0;
// If last warning was issued more than 60 minutes ago, reset toomany.
if (GPS_INFO.Time>(last_time+3600)) {
#if TESTBENCH
if (last_time>0 && numwarn>0)
StartupStore(_T("... GiveBatteryWarnings resetting at %s\n"),WhatTimeIsIt(),NEWLINE);
#endif
toomany=false;
numwarn=0;
}
if (toomany) return false;
numwarn++;
if (numwarn>MAXBATTWARN) {
// LKTOKEN [email protected]_ "BATTERY WARNINGS DISABLED"
DoStatusMessage(gettext(TEXT("[email protected]_")));
StartupStore(_T("... Too many battery warnings, disabling Battery Manager at %s%s"),WhatTimeIsIt(),NEWLINE);
toomany=true;
return false;
}
last_time=GPS_INFO.Time;
return true;
}
示例8: OnSetFrequency
static void OnSetFrequency(WndButton* pWnd){
(void)pWnd;
#ifdef RADIO_ACTIVE
TCHAR Tmp[255];
if(RadioPara.Enabled)
{
double ASFrequency = ExtractFrequency((TCHAR*)airspace_copy.Name());
if(!ValidFrequency(ASFrequency))
{
ASFrequency = ExtractFrequency((TCHAR*)airspace_copy.Comment());
}
if(ValidFrequency(ASFrequency))
{
_stprintf(Tmp,_T("%7.3fMHz"),ASFrequency);
devPutFreqActive(ASFrequency, (TCHAR*)airspace_copy.Name());
DoStatusMessage(_T(""), Tmp );
}
}
#endif // RADIO_ACTIVE
if(pWnd) {
WndForm * pForm = pWnd->GetParentWndForm();
if(pForm) {
pForm->SetModalResult(mrOK);
}
}
}
示例9: OnPassiveButton
static void OnPassiveButton(WndButton* pWnd){
if (HoldOff ==0)
{
int res = dlgWayPointSelect(0, 90.0, 1,3);
// LKASSERT(res>=0);
// LKASSERT(ValidWayPointFast(res));
if(res > RESWP_END )
if(ValidWayPoint(res))
{
double Frequency = StrToDouble(WayPointList[res].Freq,NULL);
if(Frequency < 100.0)
{
DoStatusMessage(_T("No valid Frequency!") );
return;
}
devPutFreqStandby(devA(), Frequency, WayPointList[res].Name);
devPutFreqStandby(devB(), Frequency, WayPointList[res].Name);
_stprintf(RadioPara.PassiveName,_T("%s"), WayPointList[res].Name);
RadioPara.PassiveFrequency = Frequency;
PassiveRadioIndex = res;
}
OnUpdate();
HoldOff = HOLDOFF_TIME;
}
}
示例10: TaskStartMessage
void TaskStartMessage(void) {
TCHAR TempTime[40];
TCHAR TempAlt[40];
TCHAR TempSpeed[40];
Units::TimeToText(TempTime, (int)TimeLocal((int)CALCULATED_INFO.TaskStartTime));
_stprintf(TempAlt, TEXT("%.0f %s"), CALCULATED_INFO.TaskStartAltitude*ALTITUDEMODIFY, Units::GetAltitudeName());
_stprintf(TempSpeed, TEXT("%.0f %s"), CALCULATED_INFO.TaskStartSpeed*TASKSPEEDMODIFY, Units::GetTaskSpeedName());
TCHAR TempAll[300];
_stprintf(TempAll, TEXT("\r\n%s: %s\r\n%s:%s\r\n%s: %s"),
// Altitude
gettext(TEXT("[email protected]_")),
TempAlt,
// Speed
gettext(TEXT("[email protected]_")),
TempSpeed,
// Time
gettext(TEXT("[email protected]_")),
TempTime);
// ALWAYS issue DoStatusMessage BEFORE sounds, if possible.
// LKTOKEN [email protected]_ = "Task Start"
DoStatusMessage(gettext(TEXT("[email protected]_")), TempAll);
}
示例11: GotoWaypoint
void GotoWaypoint(const int wpnum) {
if (!ValidWayPoint(wpnum)) {
DoStatusMessage(_T("ERR-639 INVALID GOTO WPT"));
return;
}
if (ValidTaskPoint(ActiveWayPoint) && ValidTaskPoint(1)) {
TCHAR wpname[NAME_SIZE+1];
_tcscpy(wpname,WayPointList[wpnum].Name);
wpname[10] = '\0';
if (MessageBoxX(
// LKTOKEN [email protected]_ = "CONFIRM GOTO, ABORTING TASK?"
gettext(TEXT("[email protected]_")),
// LKTOKEN [email protected]_ = "A task is running!"
gettext(TEXT("[email protected]_")),
mbYesNo) == IdYes) {
LockTaskData();
FlyDirectTo(wpnum);
OvertargetMode=OVT_TASK;
UnlockTaskData();
}
} else {
LockTaskData();
FlyDirectTo(wpnum);
OvertargetMode=OVT_TASK;
UnlockTaskData();
}
}
示例12: TaskFinishMessage
void TaskFinishMessage(void) {
TCHAR TempTime[40];
TCHAR TempAlt[40];
TCHAR TempSpeed[40];
TCHAR TempTskSpeed[40];
Units::TimeToText(TempTime, (int)TimeLocal((int)GPS_INFO.Time));
_stprintf(TempAlt, TEXT("%.0f %s"), CALCULATED_INFO.NavAltitude*ALTITUDEMODIFY, Units::GetAltitudeName());
_stprintf(TempSpeed, TEXT("%.0f %s"), GPS_INFO.Speed*TASKSPEEDMODIFY, Units::GetTaskSpeedName());
_stprintf(TempTskSpeed, TEXT("%.2f %s"), CALCULATED_INFO.TaskSpeedAchieved*TASKSPEEDMODIFY, Units::GetTaskSpeedName());
TCHAR TempAll[300];
_stprintf(TempAll, TEXT("\r\n%s: %s\r\n%s:%s\r\n%s: %s\r\n%s: %s"),
// Altitude
gettext(TEXT("[email protected]_")),
TempAlt,
// Speed
gettext(TEXT("[email protected]_")),
TempSpeed,
// Time
gettext(TEXT("[email protected]_")),
TempTime,
// task speed
gettext(TEXT("[email protected]_")),
TempTskSpeed);
// LKTOKEN [email protected]_ = "Task Finish"
DoStatusMessage(gettext(TEXT("[email protected]_")), TempAll);
}
示例13: ReverseTask
void ReverseTask() {
int lower=0;
int upper = getFinalWaypoint();
while(lower<upper) { //Swap in pairs starting from the sides of task array
std::swap(Task[lower++],Task[upper--]);
}
ResetTask(false); // Reset the task without showing the message about task reset
RefreshTask(); //Recalculate the task
DoStatusMessage(gettext(TEXT("[email protected]_"))); // LKTOKEN [email protected]_ "TASK REVERSED"
}
示例14: OnSetAlt2Clicked
static void OnSetAlt2Clicked(WndButton* pWnd){
LockTaskData();
Alternate2 = SelectedWaypoint;
RefreshTask();
UnlockTaskData();
if (ValidWayPoint(Alternate2))
DoStatusMessage(_T("Altern.2="),WayPointList[Alternate2].Name);
retStatus=4;
wf->SetModalResult(mrOK);
}
示例15: MasterTimeReset
//
// Master Time Reset
// This function is called when a valid GPS time (or a time taken from an IGC replay log)
// is verified to be gone back in time, or more than 2 hours have passed since last GPS
// fix was received.
// This is normally happening when the device was switched off and back on some time later.
// What we might do, is disable logging, resetting some functions etc.
// But this is happening also after switching ON a PNA with no time battery, and thus a full reset.
// Time is appearing as 1/1/2000 12:00am , some times. So we only log the event.
//
void MasterTimeReset(void) {
StartupStore(_T("... Master Time Reset %s%s"), WhatTimeIsIt(),NEWLINE);
#if TESTBENCH
DoStatusMessage(_T("MASTER TIME RESET")); // no translation please
#endif
// Remember to lock anything needed to be locked
}