Adding state ?

Dear Members,

I can use a simple timer in :

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fnrf_dev_simple_timer_example.html

I want to add another state

in timeout handler I added :

void timeout_handler(void * p_context)

    case APP_STATE_SINGLE_SHOT_ANT_HRM:
                                             if (--m_state_transit_counter != 0)
                                 {
                                        if (--m_toggle_led_counter == 0)
                                        {
                                                m_toggle_led_counter = TOGGLE_LED_COUNTER;
                                                bsp_board_led_invert(BSP_BOARD_LED_0);
                                        }

                                        err_code = app_simple_timer_start(APP_SIMPLE_TIMER_MODE_SINGLE_SHOT,
                                                                                     timeout_handler,
                                                                                     TIMEOUT_VALUE,
                                                                                     NULL);
                                        APP_ERROR_CHECK(err_code);
                                }
                                else
                                {
                                        state_machine_state_change(APP_STATE_REPEATED_ANT_HRM);
                                }                
            break;

but the code doesn't go to this state...

Any clues ? thanks

Parents Reply Children
No Data
Related