zhyinch
2019-11-02 9ac79fd3b86ed2c2e8b1ba8a2d78e99abf2e8ac3
Ô´Âë/ºËÐİå/Src/application/beep_logic_app.c
@@ -12,6 +12,7 @@
#define ONTIME3 1   // 500ms
#define OFFTIME3 5  // 500ms
void main_logic(void)   //主逻辑在这里执行
{
   static uint8_t beep_state,timer_state,beep_timer,beep_ontime,beep_offtime;
@@ -36,17 +37,20 @@
         beep_ontime = ONTIME1;
         beep_offtime = OFFTIME1;
         beep_state=1;
      }else if (min_dist <= g_com_map[ALARM_DISTANCE2])
      {
         beep_ontime = ONTIME2;
         beep_offtime = OFFTIME2;
         beep_state=1;
      }else if (min_dist <= g_com_map[ALARM_DISTANCE3])
      {
         beep_ontime = ONTIME3;
         beep_offtime = OFFTIME3;
         beep_state=1;
      }else{
      }
//      else if (min_dist <= g_com_map[ALARM_DISTANCE2])
//      {
//         beep_ontime = ONTIME2;
//         beep_offtime = OFFTIME2;
//         beep_state=1;
//      }else if (min_dist <= g_com_map[ALARM_DISTANCE3])
//      {
//         beep_ontime = ONTIME3;
//         beep_offtime = OFFTIME3;
//         beep_state=1;
//      }
      else{
         beep_state=0;
      }