本文整理汇总了C++中PortWriteNMEA函数的典型用法代码示例。如果您正苦于以下问题:C++ PortWriteNMEA函数的具体用法?C++ PortWriteNMEA怎么用?C++ PortWriteNMEA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PortWriteNMEA函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AGeoPoint
void
CaiLNavDevice::OnCalculatedUpdate(const MoreData &basic,
const DerivedInfo &calculated)
{
NullOperationEnvironment env;
char buffer[100];
const GeoPoint here = basic.location_available
? basic.location
: GeoPoint::Invalid();
const ElementStat ¤t_leg = calculated.task_stats.current_leg;
AGeoPoint destination =
AGeoPoint(current_leg.location_remaining,
current_leg.solution_planned.min_arrival_altitude);
if (FormatGPRMC(buffer, sizeof(buffer), basic))
PortWriteNMEA(port, buffer, env);
if (FormatGPRMB(buffer, sizeof(buffer), here, destination))
PortWriteNMEA(port, buffer, env);
if (FormatPCAIB(buffer, sizeof(buffer), destination))
PortWriteNMEANoChecksum(port, buffer, env);
}
示例2: assert
bool
DeviceDescriptor::WriteNMEA(const char *line)
{
assert(line != NULL);
return port != NULL && PortWriteNMEA(*port, line);
}
示例3: SetMacCready
/**
* Set the MC setting of the V7 vario
* @param mc in m/s
*/
static inline bool
SetMacCready(Port &port, OperationEnvironment &env, fixed mc)
{
char buffer[32];
sprintf(buffer, "PLXV0,MC,W,%.1f", (double)mc);
return PortWriteNMEA(port, buffer, env);
}
示例4: assert
bool
DeviceDescriptor::WriteNMEA(const char *line, OperationEnvironment &env)
{
assert(line != nullptr);
return port != nullptr && PortWriteNMEA(*port, line, env);
}
示例5: sprintf
bool
VegaDevice::RequestSetting(const char *name, OperationEnvironment &env)
{
char buffer[64];
sprintf(buffer, "PDVSC,R,%s", name);
return PortWriteNMEA(port, buffer, env);
}
示例6: PortWriteNMEA
bool
FlymasterF1Device::EnableNMEA(OperationEnvironment &env)
{
/* this command initiates NMEA mode according to the "Flymaster F1
Commands" document */
return PortWriteNMEA(port, "$PFMNAV,", env);
}
示例7: sprintf
bool
LXDevice::PutMacCready(fixed mac_cready, OperationEnvironment &env)
{
if (!EnableNMEA(env))
return false;
char tmp[32];
sprintf(tmp, "PFLX2,%1.1f,,,,,,", (double)mac_cready);
PortWriteNMEA(port, tmp, env);
// LXNAV V7 variant:
sprintf(tmp, "PLXV0,MC,W,%.1f", (double)mac_cready);
PortWriteNMEA(port, tmp, env);
return true;
}
示例8: SetBallast
/**
* Set the ballast setting of the V7 vario
* @param overload 1.0 - 1.4 (100 - 140%)
*/
static inline bool
SetBallast(Port &port, OperationEnvironment &env, fixed overload)
{
char buffer[100];
sprintf(buffer, "PLXV0,BAL,W,%.2f", (double)overload);
return PortWriteNMEA(port, buffer, env);
}
示例9: SetBugs
/**
* Set the bugs setting of the V7 vario
* @param bugs 0 - 30 %
*/
static inline bool
SetBugs(Port &port, OperationEnvironment &env, unsigned bugs)
{
char buffer[100];
sprintf(buffer, "PLXV0,BUGS,W,%u", bugs);
return PortWriteNMEA(port, buffer, env);
}
示例10: sprintf
bool
Vega::VolatileData::SendTo(Port &port, OperationEnvironment &env) const
{
char buffer[100];
sprintf(buffer, "PDVMC,%u,%u,%u,%d,%u",
mc, stf, circling, terrain_altitude, qnh);
return PortWriteNMEA(port, buffer, env);
}
示例11: SetQNH
/**
* Set the QNH setting of the V7 vario
*/
static inline bool
SetQNH(Port &port, OperationEnvironment &env, const AtmosphericPressure &qnh)
{
char buffer[100];
unsigned QNHinPascal = uround(qnh.GetPascal());
sprintf(buffer, "PLXV0,QNH,W,%u", QNHinPascal);
return PortWriteNMEA(port, buffer, env);
}
示例12: sprintf
bool
LXDevice::PutMacCready(fixed MacCready)
{
char szTmp[32];
sprintf(szTmp, "PFLX2,%1.1f,,,,,,", (double)MacCready);
PortWriteNMEA(port, szTmp);
return true;
}
示例13: devWriteNMEAString
void
devWriteNMEAString(DeviceDescriptor &d, const TCHAR *text)
{
if (d.Com == NULL)
return;
PortWriteNMEA(d.Com, text);
}
示例14: VarioWriteNMEA
void
VarioWriteNMEA(const TCHAR *text)
{
for (int i = 0; i < NUMDEV; i++)
if (DeviceList[i].IsVega())
if (DeviceList[i].Com)
PortWriteNMEA(DeviceList[i].Com, text);
}
示例15: sprintf
bool
VaulterDevice::PutMacCready(fixed mc, OperationEnvironment &env)
{
if (!EnableNMEA(env))
return false;
char buffer[30];
sprintf(buffer,"PITV1,MC=%0.2f", (double)mc);
return PortWriteNMEA(port, buffer, env);
}