EVENT_CHANNEL_CLOSED ?

Dear Members,

How can I scan continously if I loss the sensor,

I have made at this function :

static void ant_evt_handler(ant_evt_t * p_ant_evt, void * p_context)

case EVENT_CHANNEL_CLOSED:
									  NRF_LOG_INFO("EVENT_CHANNEL_CLOSED...\r\n");
								    NRF_LOG_INFO("BSP_INDICATE_SCANNING...\r\n");//31Mar22 Rixtronix LAB
                    
								     err_code = bsp_indication_set(BSP_INDICATE_SCANNING);
					
								    nrf_pwr_mgmt_feed(); //Function for indicating activity.
								    
								
                    break;

but it's not scanning when it loss the sensor ,

Any clues ?

Kind regards,

Rixtronix

Parents Reply Children
  • Hi Simon,

    Thanks for the reply,

    I'm not calling ant_search_init(), and can not find the function on my project,

    How can I use that function ? In which library ?

    Best regards,

    Rixtronix

  • Hi Simon,

    I made this function :

    /**@brief Initialize ant search Rixtronix LAB 8Apr22
     */
     static void ant_search_initialize()
     {
    	 ret_code_t err_code;
    	  const ant_search_config_t bs_search_config =
        {
            .channel_number        = ANT_BS_CHANNEL_NUMBER,
            .low_priority_timeout  = ANT_LOW_PRIORITY_TIMEOUT_DISABLE,
            .high_priority_timeout = ANT_HIGH_PRIORITY_SEARCH_DISABLE,
            .search_sharing_cycles = ANT_SEARCH_SHARING_CYCLES_DISABLE,
            .search_priority       = ANT_SEARCH_PRIORITY_DEFAULT,
            .waveform              = ANT_WAVEFORM_DEFAULT,
        };
    		 err_code = ant_search_init(&bs_search_config);
        APP_ERROR_CHECK(err_code);
     }	 
    

    Where can I call it ?

    before main loop and after channell open ?

    Regards,

    Rixtronix

Related