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

C++ delay100函数代码示例

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

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



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

示例1: net_msg_start

// Start to send a net msg
void net_msg_start(void)
  {
  net_msg_sendpending = 1;
  delay100(5);
  net_puts_rom("AT+CIPSEND\r");
  delay100(10);
  }
开发者ID:git109,项目名称:Open-Vehicle-Monitoring-System,代码行数:8,代码来源:net_msg.c


示例2: net_msg_start

// Start to send a net msg
void net_msg_start(void)
  {
  if (net_state == NET_STATE_DIAGMODE)
    {
    net_puts_rom("# ");
    }
  else
    {
    net_msg_sendpending = 1;
    delay100(5);
    net_puts_rom("AT+CIPSEND\r");
    delay100(10);
    }
  }
开发者ID:tomsax,项目名称:Open-Vehicle-Monitoring-System,代码行数:15,代码来源:net_msg.c


示例3: net_sms_socalert

void net_sms_socalert(char* number)
{
    char *s;

    delay100(10);
    net_send_sms_start(number);

    s = stp_i(net_scratchpad, "ALERT!!! CRITICAL SOC LEVEL APPROACHED (", car_SOC); // 95%
    s = stp_rom(s, "% SOC)");
    net_puts_ram(net_scratchpad);

    net_send_sms_finish();
    delay100(5);
}
开发者ID:jasonwiener,项目名称:Open-Vehicle-Monitoring-System,代码行数:14,代码来源:net_sms.c


示例4: net_msg_reply_ussd

void net_msg_reply_ussd(char *buf, unsigned char buflen)
{
  // called from net_state_activity()
  // buf contains a "+CUSD:" USSD command result
  // parse and return as command reply:
  char *s, *t = NULL;

  // Server not ready? abort
  // TODO: store, resend when server is connected
  if ((!net_msg_serverok) || (!buf) || (!buflen))
    return;

  // isolate USSD reply text
  if (t = memchr((void *) buf, '"', buflen))
  {
    ++t;
    buflen -= (t - buf);
    buf = t; // start of USSD string
    while ((*t) && (*t != '"') && ((t - buf) < buflen))
    {
      if (*t == ',') // "escape" comma for MP-0
        *t = '.';
      t++;
    }
    *t = 0; // end of USSD string
  }

  // format reply:
  s = stp_i(net_scratchpad, "MP-0 c", CMD_SendUSSD);
  if (t)
    s = stp_s(s, ",0,", buf);
  else
    s = stp_rom(s, ",1,Invalid USSD result");

  // send reply:

  if (net_msg_sendpending > 0)
  {
    delay100(20); // HACK... should buffer & retry later... but RAM is precious
    s = NULL; // flag
  }

  net_msg_start();
  net_msg_encode_puts();
  net_msg_send();

  if (!s)
    delay100(20); // HACK: give modem additional time if there was sendpending>0
}
开发者ID:tomsax,项目名称:Open-Vehicle-Monitoring-System,代码行数:49,代码来源:net_msg.c


示例5: net_sms_handle_paramsq

BOOL net_sms_handle_paramsq(char *caller, char *command, char *arguments)
{
    unsigned char k, splen, msglen;
    char *p, *s;

    if (sys_features[FEATURE_CARBITS]&FEATURE_CB_SOUT_SMS) return FALSE;

    net_send_sms_start(caller);
    net_puts_rom("Params:");
    msglen=7;
    for (k=0; k<PARAM_MAX; k++)
    {
        p = par_get(k);
        if (*p != 0)
        {
            s = stp_i(net_scratchpad, "\n", k);
            s = stp_s(s, ":", p);
            splen = s - net_scratchpad;
            if((msglen+splen) > 160)
            {
                // SMS becomes too long, finish & start next:
                net_send_sms_finish();
                delay100(20);
                net_send_sms_start(caller);
                net_puts_rom("Params:");
                msglen=7+splen;
            }
            net_puts_ram(net_scratchpad);
        }
    }
    return TRUE;
}
开发者ID:jasonwiener,项目名称:Open-Vehicle-Monitoring-System,代码行数:32,代码来源:net_sms.c


示例6: net_send_sms_start

void net_send_sms_start(char* number)
  {
  if (net_state == NET_STATE_DIAGMODE)
    {
    // DIAG mode: screen output
    net_puts_rom("# ");
    }
  else if (net_msg_bufpos)
    {
    // NET SMS wrapper mode: nothing to do here
    // net_put* will write to net_msg_bufpos
    }
  else
    {
    // MODEM mode:
    net_puts_rom("AT+CMGS=\"");
    net_puts_ram(number);
    net_puts_rom("\"\r\n");
    delay100(2);
    }

  if ((car_time > 315360000)&&
      ((sys_features[FEATURE_CARBITS]&FEATURE_CB_SSMSTIME)==0))
    {
    // Car time is valid, and sms time is not disabled
    char *p = par_get(PARAM_TIMEZONE);
    char *s = stp_time(net_scratchpad, NULL, car_time + timestring_to_mins(p)*60L);
    s = stp_rom(s, "\r ");
    net_puts_ram(net_scratchpad);
    }
  }
开发者ID:duderdice,项目名称:Open-Vehicle-Monitoring-System,代码行数:31,代码来源:net_sms.c


示例7: net_send_sms_start

void net_send_sms_start(char* number)
  {
  net_puts_rom("AT+CMGS=\"");
  net_puts_ram(number);
  net_puts_rom("\"\r\n");
  delay100(2);
  }
开发者ID:git109,项目名称:Open-Vehicle-Monitoring-System,代码行数:7,代码来源:net_sms.c


示例8: net_state_ticker60

////////////////////////////////////////////////////////////////////////
// net_state_ticker60()
// State Model: Per-minute ticker
// This function is called approximately once per minute (since state
// was first entered), and gives the state a timeslice for activity.
//
void net_state_ticker60(void)
  {
  switch (net_state)
    {
    case NET_STATE_READY:
      if (net_msg_sendpending>0)
        {
        net_granular_tick -= 5; // Try again in 5 seconds...
        return;
        }
      if ((net_link==1)&&(net_apps_connected>0))
        {
        net_msg_start();
        net_msg_stat();
        net_msg_gps();
        net_msg_tpms();
        net_msg_environment();
        net_msg_send();
        }
      net_state_vchar = net_state_vchar ^ 1;
      delay100(2);
      net_puts_rom(NET_CREG_CIPSTATUS);
      break;
    }
  }
开发者ID:Roadster,项目名称:Open-Vehicle-Monitoring-System,代码行数:31,代码来源:net.c


示例9: net_msg_cmd_do

void net_msg_cmd_do(void)
  {
  CHECKPOINT(0x44)
  delay100(2);

  // commands 40-49 are special AT commands, thus, disable net_msg here
  if ((net_msg_cmd_code < 40) || (net_msg_cmd_code > 49))
    net_msg_start();

    // Execute cmd: ask car module to execute first:
   if ((vehicle_fn_commandhandler == NULL)||
       (! vehicle_fn_commandhandler(TRUE, net_msg_cmd_code,net_msg_cmd_msg)))
     {
     // Car module does not feel responsible, fall back to standard:
     if( !net_msg_cmd_exec() )
       {
       // No standard as well => return "unimplemented"
       STP_UNIMPLEMENTED(net_scratchpad, net_msg_cmd_code);
       net_msg_encode_puts();
       }
     }

   // terminate IPSEND by Ctrl-Z (should this be disabled for commands 40-49 as well?)
   net_msg_send();

#ifdef OVMS_ACCMODULE
   acc_handle_msg(TRUE, net_msg_cmd_code, net_msg_cmd_msg);
#endif

   // clear command
   net_msg_cmd_code = 0;
   net_msg_cmd_msg[0] = 0;
  }
开发者ID:tomsax,项目名称:Open-Vehicle-Monitoring-System,代码行数:33,代码来源:net_msg.c


示例10: net_sms_12v_alert

void net_sms_12v_alert(char* number)
{
    char *s;

    delay100(10);
    net_send_sms_start(number);

    if (can_minSOCnotified & CAN_MINSOC_ALERT_12V)
        s = stp_l2f(net_scratchpad, "MP-0 PAALERT!!! 12V BATTERY CRITICAL (", car_12vline, 1);
    else
        s = stp_l2f(net_scratchpad, "MP-0 PA12V BATTERY OK (", car_12vline, 1);
    s = stp_l2f(s, "V, ref=", car_12vline_ref, 1);
    s = stp_rom(s, "V)");
    net_puts_ram(net_scratchpad);

    net_send_sms_finish();
    delay100(5);
}
开发者ID:jasonwiener,项目名称:Open-Vehicle-Monitoring-System,代码行数:18,代码来源:net_sms.c


示例11: net_msg_alert

void net_msg_alert(void)
{
  char *s;

  delay100(2);

  s = stp_rom(net_scratchpad, "MP-0 PA");
  net_prep_stat(s);
}
开发者ID:tomsax,项目名称:Open-Vehicle-Monitoring-System,代码行数:9,代码来源:net_msg.c


示例12: net_msg_alarm

void net_msg_alarm(void)
  {
  char *p;

  delay100(2);
  net_msg_start();
  strcpypgm2ram(net_scratchpad,(char const rom far*)"MP-0 PAVehicle alarm is sounding!");
  net_msg_encode_puts();
  net_msg_send();
  }
开发者ID:tomsax,项目名称:Open-Vehicle-Monitoring-System,代码行数:10,代码来源:net_msg.c


示例13: net_msg_valettrunk

void net_msg_valettrunk(void)
  {
  char *p;

  delay100(2);
  net_msg_start();
  strcpypgm2ram(net_scratchpad,(char const rom far*)"MP-0 PATrunk has been opened (valet mode).");
  net_msg_encode_puts();
  net_msg_send();
  }
开发者ID:tomsax,项目名称:Open-Vehicle-Monitoring-System,代码行数:10,代码来源:net_msg.c


示例14: net_sms_alarm

void net_sms_alarm(char* number)
{
    char *p;

    if (sys_features[FEATURE_CARBITS]&FEATURE_CB_SOUT_SMS) return;

    delay100(2);
    net_send_sms_start(number);
    net_puts_rom(NET_MSG_ALARM);
    net_send_sms_finish();
}
开发者ID:jasonwiener,项目名称:Open-Vehicle-Monitoring-System,代码行数:11,代码来源:net_sms.c


示例15: net_msg_socalert

void net_msg_socalert(void)
  {
  char *s;

  delay100(2);
  net_msg_start();
  s = stp_i(net_scratchpad, "MP-0 PAALERT!!! CRITICAL SOC LEVEL APPROACHED (", car_SOC); // 95%
  s = stp_rom(s, "% SOC)");
  net_msg_encode_puts();
  net_msg_send();
  }
开发者ID:tomsax,项目名称:Open-Vehicle-Monitoring-System,代码行数:11,代码来源:net_msg.c


示例16: net_sms_valettrunk

void net_sms_valettrunk(char* number)
{
    char *p;

    if (sys_features[FEATURE_CARBITS]&FEATURE_CB_SOUT_SMS) return;

    delay100(2);
    net_send_sms_start(number);
    net_puts_rom(NET_MSG_VALETTRUNK);
    net_send_sms_finish();
}
开发者ID:jasonwiener,项目名称:Open-Vehicle-Monitoring-System,代码行数:11,代码来源:net_sms.c


示例17: net_msg_erroralert

void net_msg_erroralert(unsigned int errorcode, unsigned long errordata)
  {
  char *s;

  delay100(2);
  net_msg_start();
  s = stp_s(net_scratchpad, "MP-0 PE", car_type);
  s = stp_ul(s, ",", (unsigned long)errorcode);
  s = stp_ul(s, ",", (unsigned long)errordata);
  net_msg_encode_puts();
  net_msg_send();
  }
开发者ID:tomsax,项目名称:Open-Vehicle-Monitoring-System,代码行数:12,代码来源:net_msg.c


示例18: net_sms_gps

void net_sms_gps(char* number)
  {
  delay100(2);
  net_send_sms_start(number);
  net_puts_rom(NET_MSG_GOOGLEMAPS);
  format_latlon(car_latitude,net_scratchpad);
  net_puts_ram(net_scratchpad);
  net_puts_rom(",");
  format_latlon(car_longitude,net_scratchpad);
  net_puts_ram(net_scratchpad);
  net_puts_rom("\x1a");
  }
开发者ID:sschulz,项目名称:Open-Vehicle-Monitoring-System,代码行数:12,代码来源:net_sms.c


示例19: net_sms_stat

void net_sms_stat(char* number)
  {
  char *p;

#ifdef OVMS_SUPPRESS_OUTGOING_SMS
  return;
#endif

  delay100(2);
  net_send_sms_start(number);

  switch (car_chargemode)
    {
    case 0x00:
      net_puts_rom("Standard - "); // Charge Mode Standard
      break;
    case 0x01:
      net_puts_rom("Storage - "); // Storage
      break;
    case 0x03:
      net_puts_rom("Range - "); // Range
      break;
    case 0x04:
      net_puts_rom("Performance - "); // Performance
    }
  switch (car_chargestate)
    {
    case 0x01:
      net_puts_rom("Charging"); // Charge State Charging
      break;
    case 0x02:
      net_puts_rom("Charging, Topping off"); // Topping off
      break;
    case 0x04:
      net_puts_rom("Charging Done"); // Done
      break;
    default:
      net_puts_rom("Charging Stopped"); // Stopped
    }

  net_puts_rom(" \rIdeal Range: "); // Ideal Range
  p = par_get(PARAM_MILESKM);
  if (*p == 'M') // Kmh or Miles
    sprintf(net_scratchpad, (rom far char*)"%u mi", car_idealrange); // Miles
  else
    sprintf(net_scratchpad, (rom far char*)"%u Km", (unsigned int) (((float) car_idealrange * 1.609))+0.5); // Kmh
  net_puts_ram(net_scratchpad);

  net_puts_rom(" \rSOC: ");
  sprintf(net_scratchpad, (rom far char*)"%u%%", car_SOC); // 95%
  net_puts_ram(net_scratchpad);
  net_puts_rom("\x1a");
  }
开发者ID:git109,项目名称:Open-Vehicle-Monitoring-System,代码行数:53,代码来源:net_sms.c


示例20: net_msg_alert

void net_msg_alert(void)
  {
  char *p;

  delay100(2);
  net_msg_start();
  strcpypgm2ram(net_scratchpad,(char const rom far*)"MP-0 PA");

  switch (car_chargemode)
    {
    case 0x00:
      strcatpgm2ram(net_scratchpad,(char const rom far *)"Standard - "); // Charge Mode Standard
      break;
    case 0x01:
      strcatpgm2ram(net_scratchpad,(char const rom far *)"Storage - "); // Storage
      break;
    case 0x03:
      strcatpgm2ram(net_scratchpad,(char const rom far *)"Range - "); // Range
      break;
    case 0x04:
      strcatpgm2ram(net_scratchpad,(char const rom far *)"Performance - "); // Performance
    }
  switch (car_chargestate)
    {
    case 0x01:
      strcatpgm2ram(net_scratchpad,(char const rom far *)"Charging"); // Charge State Charging
      break;
    case 0x02:
      strcatpgm2ram(net_scratchpad,(char const rom far *)"Charging, Topping off"); // Topping off
      break;
    case 0x04:
      strcatpgm2ram(net_scratchpad,(char const rom far *)"Charging Done"); // Done
      break;
    default:
      strcatpgm2ram(net_scratchpad,(char const rom far *)"Charging Stopped"); // Stopped
    }

  strcatpgm2ram(net_scratchpad,(char const rom far *)"\rIdeal Range: "); // Ideal Range
  p = par_get(PARAM_MILESKM);
  if (*p == 'M') // Kmh or Miles
    sprintf(net_msg_scratchpad, (rom far char*)"%u mi", car_idealrange); // Miles
  else
    sprintf(net_msg_scratchpad, (rom far char*)"%u Km", (unsigned int) ((float) car_idealrange * 1.609)); // Kmh
  strcat((char*)net_scratchpad,net_msg_scratchpad);

  strcatpgm2ram(net_scratchpad,(char const rom far *)" SOC: ");
  sprintf(net_msg_scratchpad, (rom far char*)"%u%%", car_SOC); // 95%
  strcat(net_scratchpad,net_msg_scratchpad);
  net_msg_encode_puts();
  net_msg_send();
  }
开发者ID:Roadster,项目名称:Open-Vehicle-Monitoring-System,代码行数:51,代码来源:net_msg.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ delayMicroseconds函数代码示例发布时间:2022-05-30
下一篇:
C++ del_timer_sync函数代码示例发布时间: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