This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

报警问题



你好,yan

     我在改程序时,发现在用lightblue测试,ios app测试退出的时候,从机并没报警。跟踪发现进入void peripheralStateNotificationCB这个函数的

   case GAPROLE_ADVERTISING:

我把报警函数

osal_start_timerEx( keyfobapp_TaskID, KFD_TOGGLE_BUZZER_EVT, 800 );   

  keyfobapp_PerformAlert();       

加入,并没起作用。

是否还需要满足其它条件。

谢谢

祝好

Lincoln

static void peripheralStateNotificationCB( gaprole_States_t newState )
{
  uint16 connHandle = INVALID_CONNHANDLE;
  uint8 valFalse = FALSE;

........

........

.........


    //if the state changed to connected, initially assume that keyfob is in range
    case GAPROLE_ADVERTISING:
      {

        // Visual feedback that we are advertising.
        osal_start_timerEx( keyfobapp_TaskID, KFD_TOGGLE_BUZZER_EVT, 800 );        //add

//           keyfobapp_PerformAlert();                //add

       HalLedSet( HAL_LED_2, HAL_LED_MODE_ON );    //add

        HalLedSet( HAL_LED_1, HAL_LED_MODE_ON ); 
      }
      break;
.........

.........

}