Is this a bug in app_easy_timer_cancel_all() ?

3 posts / 0 new
Last post
ciano
Offline
Last seen:3 weeks 5 days ago
Joined:2014-10-03 08:13
Is this a bug in app_easy_timer_cancel_all() ?

Hi Dialog

I have changed the app_easy_timer_cancel_all() like this

Original version

void app_easy_timer_cancel_all( void )
{
int i;
for (i=0;iif ((timer_callbacks[i]!=NULL)&&\
(timer_callbacks[i]!=app_easy_timer_canceled_handler))
app_easy_timer_cancel(i);
}

With my changes

void app_easy_timer_cancel_all( void )
{
int i;
for (i=0;iif ((timer_callbacks[i]!=NULL)&&\
(timer_callbacks[i]!=app_easy_timer_canceled_handler))
app_easy_timer_cancel(APP_EASY_TIMER_IDX_TO_HND(i));
}

I have changed the argument for app_easy_timer_cancel to "APP_EASY_TIMER_IDX_TO_HND(i)".

Is this change/bugfix correct?
If I do not make this change, then app_easy_timer_cancel() will end in an ASSERT_WARNING(0), because it is called for a timer with NULL or app_easy_timer_canceled_handler() as callback function.

Best Regards,
Ciano Frost
Denmark

Device:
MT_dialog
Offline
Last seen:1 week 5 days ago
Staff
Joined:2015-06-08 11:34
Hi ciano,

Hi ciano,

是的,这是正确的,这是一个固定下一个SDK。

Thanks MT_dialog

ciano
Offline
Last seen:3 weeks 5 days ago
Joined:2014-10-03 08:13
Thank you for the quick

Thank you for the quick answer.

I will add the correction on my local vendor drop :-)

Best Regards,
Ciano Frost
Denmark

Topic locked