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

  • Hi Kenneth,

    Thanks for your reply,

    Is it possible with this line ?

    err_code = sd_ant_channel_search_timeout_set(HRM_CHANNEL_NUM, 1888);
                                            APP_ERROR_CHECK(err_code);

    or we need a timer similar alike @

    nRF5_SDK_17.0.2_d674dde\examples\ant\ant_continuous_scanning_controller\main.c

    Line 283

    err_code = app_timer_create(&m_scan_timer_id,
                                    APP_TIMER_MODE_SINGLE_SHOT,
                                    scan_timeout_event);

    Kind regards,

    Rixtronix LAB

Related