本文整理汇总了C++中NMEAParser::_Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ NMEAParser::_Reset方法的具体用法?C++ NMEAParser::_Reset怎么用?C++ NMEAParser::_Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NMEAParser
的用法示例。
在下文中一共展示了NMEAParser::_Reset方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Reset
void NMEAParser::Reset(void) {
// clear status
nmeaParser1._Reset();
nmeaParser2._Reset();
// trigger updates
TriggerGPSUpdate();
TriggerVarioUpdate();
}
示例2: UpdateMonitor
//.........这里部分代码省略.........
if (GPS_INFO.FLARM_Available && ((GPS_INFO.Time -LastFlarmCommandTime)> 30) )
{
static unsigned short MessageCnt =0;
if(MessageCnt <10)
{
MessageCnt++;
StartupStore(_T(". FLARM lost! Disable FLARM functions !%s"),NEWLINE);
DoStatusMessage(gettext(TEXT("[email protected]_"))); // [email protected]_ "FLARM SIGNAL LOST"
}
GPS_INFO.FLARM_Available = false;
GPS_INFO.FLARM_HW_Version =0.0;
GPS_INFO.FLARM_SW_Version =0.0;
}
// Check Port 1 with no serial activity in last seconds
if ( (LKHearthBeats-ComPortHB[0])>10 ) {
#ifdef DEBUGNPM
StartupStore(_T("... GPS Port 1 : no activity LKHB=%u CBHB=%u %s"),LKHearthBeats, ComPortHB[0],NEWLINE);
#endif
// if this is active and supposed to have a valid fix.., but no HB..
if ( (active==1) && (nmeaParser1.gpsValid) ) {
StartupStore(_T("... GPS Port 1 no hearthbeats, but still gpsValid: forced invalid %s%s"),WhatTimeIsIt(),NEWLINE);
}
nmeaParser1.gpsValid=false;
invalidGps=1;
// We want to be sure that if this device is silent, and it was providing Baro altitude,
// now it is set to off.
if (GPS_INFO.BaroAltitudeAvailable==TRUE) {
if ( devA() == pDevPrimaryBaroSource || nmeaParser1.RMZAvailable
|| nmeaParser1.TASAvailable ) {
invalidBaro=1;
}
}
nmeaParser1._Reset();
nmeaParser1.activeGPS=false; // because Reset is setting it to true
// We reset some flags globally only once in case of device gone silent
if (!devIsDisabled(0) && !wasSilent[0]) {
GPS_INFO.AirspeedAvailable=false;
GPS_INFO.VarioAvailable=false;
GPS_INFO.NettoVarioAvailable=false;
GPS_INFO.AccelerationAvailable = false;
EnableExternalTriggerCruise = false;
wasSilent[0]=true;
}
} else {
wasSilent[0]=false;
// We have hearth beats, is baro available?
if ( devIsBaroSource(devA()) || nmeaParser1.RMZAvailable || nmeaParser1.TASAvailable ) // 100411
validBaro++;
}
// now check also port 2
if ( (LKHearthBeats-ComPortHB[1])>10 ) {
#ifdef DEBUGNPM
StartupStore(_T("... GPS Port 2 : no activity LKHB=%u CBHB=%u %s"),LKHearthBeats, ComPortHB[1],NEWLINE);
#endif
if ( (active==2) && (nmeaParser2.gpsValid) ) {
StartupStore(_T("... GPS port 2 no hearthbeats, but still gpsValid: forced invalid %s%s"),WhatTimeIsIt(),NEWLINE);
}
nmeaParser2.gpsValid=false;
invalidGps++;
if (GPS_INFO.BaroAltitudeAvailable==TRUE) {
if ( devB() == pDevPrimaryBaroSource || nmeaParser2.RMZAvailable
|| nmeaParser2.TASAvailable ) {
invalidBaro++;
}
}
示例3: Reset
/**
* Resets both NMEAParsers (Port1 + Port2)
*/
void NMEAParser::Reset(void) {
// clear status
nmeaParser1._Reset();
nmeaParser2._Reset();
}