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


C++ delay100函数代码示例

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


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


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