• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PortWriteNMEA函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中PortWriteNMEA函数的典型用法代码示例。如果您正苦于以下问题:C++ PortWriteNMEA函数的具体用法?C++ PortWriteNMEA怎么用?C++ PortWriteNMEA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了PortWriteNMEA函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: RequestLogbookContents

static bool
RequestLogbookContents(Port &port, unsigned start, unsigned end,
                       OperationEnvironment &env)
{
  char buffer[32];
  sprintf(buffer, "PLXVC,LOGBOOK,R,%u,%u,", start, end);

  return PortWriteNMEA(port, buffer, env);
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:9,代码来源:NanoLogger.cpp


示例17: SetupNMEA

 static bool
 SetupNMEA(Port &port, OperationEnvironment &env)
 {
   /* This line initiates the Color Vario to send out LXWP2 and LXWP3
      LXWP0 once started, is repeated every second.  This is a copy
      of the initiation done in LK8000, realized by LX Navigation
      developers We have no documentation and so we do not know what
      this exactly means. */
   return PortWriteNMEA(port, "PFLX0,LXWP0,1,LXWP2,3,LXWP3,4", env);
 }
开发者ID:damianob,项目名称:xcsoar,代码行数:10,代码来源:LX1600.hpp


示例18: RequestFlight

static bool
RequestFlight(Port &port, const char *filename,
              unsigned start_row, unsigned end_row,
              OperationEnvironment &env)
{
  char buffer[64];
  sprintf(buffer, "PLXVC,FLIGHT,R,%s,%u,%u,", filename, start_row, end_row);

  return PortWriteNMEA(port, buffer, env);
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:10,代码来源:NanoLogger.cpp


示例19: lock

bool
BlueFlyDevice::RequestSettings(OperationEnvironment &env)
{
  {
    const ScopeLock lock(mutex_settings);
    settings_ready = false;
  }

  return PortWriteNMEA(port, "BST", env);
}
开发者ID:Advi42,项目名称:XCSoar,代码行数:10,代码来源:Settings.cpp


示例20: assert

bool
BlueFlyDevice::WriteDeviceSetting(const char *name, int value,
                                  OperationEnvironment &env)
{
  char buffer[64];

  assert(strlen(name) == 3);

  sprintf(buffer, "%s %d", name, value);
  return PortWriteNMEA(port, buffer, env);
}
开发者ID:Advi42,项目名称:XCSoar,代码行数:11,代码来源:Settings.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Position函数代码示例发布时间:2022-05-30
下一篇:
C++ Port函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap