当前位置: 首页>>代码示例>>C++>>正文


C++ PortWriteNMEA函数代码示例

本文整理汇总了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 &current_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);
}
开发者ID:XCSoar,项目名称:XCSoar,代码行数:25,代码来源:CaiLNav.cpp

示例2: assert

bool
DeviceDescriptor::WriteNMEA(const char *line)
{
  assert(line != NULL);

  return port != NULL && PortWriteNMEA(*port, line);
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:7,代码来源:Descriptor.cpp

示例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);
 }
开发者ID:DRIZO,项目名称:xcsoar,代码行数:11,代码来源:V7.hpp

示例4: assert

bool
DeviceDescriptor::WriteNMEA(const char *line, OperationEnvironment &env)
{
  assert(line != nullptr);

  return port != nullptr && PortWriteNMEA(*port, line, env);
}
开发者ID:kwtskran,项目名称:XCSoar,代码行数:7,代码来源:Descriptor.cpp

示例5: sprintf

bool
VegaDevice::RequestSetting(const char *name, OperationEnvironment &env)
{
  char buffer[64];
  sprintf(buffer, "PDVSC,R,%s", name);
  return PortWriteNMEA(port, buffer, env);
}
开发者ID:CnZoom,项目名称:XcSoarWork,代码行数:7,代码来源:Settings.cpp

示例6: PortWriteNMEA

bool
FlymasterF1Device::EnableNMEA(OperationEnvironment &env)
{
  /* this command initiates NMEA mode according to the "Flymaster F1
     Commands" document */
  return PortWriteNMEA(port, "$PFMNAV,", env);
}
开发者ID:Adrien81,项目名称:XCSoar,代码行数:7,代码来源:FlymasterF1.cpp

示例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;
}
开发者ID:aharrison24,项目名称:XCSoar,代码行数:16,代码来源:Settings.cpp

示例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);
 }
开发者ID:DRIZO,项目名称:xcsoar,代码行数:11,代码来源:V7.hpp

示例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);
 }
开发者ID:DRIZO,项目名称:xcsoar,代码行数:11,代码来源:V7.hpp

示例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);
}
开发者ID:rkohel,项目名称:XCSoar,代码行数:8,代码来源:Volatile.cpp

示例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);
 }
开发者ID:DRIZO,项目名称:xcsoar,代码行数:11,代码来源:V7.hpp

示例12: sprintf

bool
LXDevice::PutMacCready(fixed MacCready)
{
  char szTmp[32];
  sprintf(szTmp, "PFLX2,%1.1f,,,,,,", (double)MacCready);
  PortWriteNMEA(port, szTmp);
  return true;
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:8,代码来源:Settings.cpp

示例13: devWriteNMEAString

void
devWriteNMEAString(DeviceDescriptor &d, const TCHAR *text)
{
  if (d.Com == NULL)
    return;

  PortWriteNMEA(d.Com, text);
}
开发者ID:Mrdini,项目名称:XCSoar,代码行数:8,代码来源:device.cpp

示例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);
}
开发者ID:Mrdini,项目名称:XCSoar,代码行数:8,代码来源:device.cpp

示例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);
}
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:9,代码来源:Vaulter.cpp


注:本文中的PortWriteNMEA函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。