NCS CAF leds modules can not receive power down event?

Hi,

    I use CAF leds modules in NCS. After click the button and led lights for 3.6 seconds, I submit power down event when double click button. As show in the following figure, led modules can receive power down event and set leds state to off.

case CLICK_SHORT:
    send_led_event(LED_ID_BLUE, &m_led_effect[LED_EFFECT_ID_DEVICE_ON]);
    break;

case CLICK_DOUBLE: {
    struct power_down_event *event = new_power_down_event();

    event->error = false;
    EVENT_SUBMIT(event);
}
break;

    Another situation, I submit led event and power dowen event after long press the button, I find led modules can't receive power down event.

case CLICK_LONG: {
    send_led_event(LED_ID_RED, &m_led_effect[LED_EFFECT_ID_DEVICE_ON]);

    struct power_down_event *event = new_power_down_event();
    event->error = false;
    EVENT_SUBMIT(event);
}
break;

Parents Reply Children
No Data
Related