diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-05-29 18:00:09 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-05-29 18:12:03 +0900 |
commit | 0caee3146b21cfa829eacdd8eccb2b3008aaa745 (patch) | |
tree | 56282cb886454a4886b8e45901d9a265575bdc75 /src | |
parent | 39f0040a8518bf10ba96f2888a37f65faa3ede3d (diff) |
Stop timer when endDraw finished
Change-Id: I817dc5147e92ca463bc20c7bb54006315e4f217c
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src')
-rw-r--r-- | src/app.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/app.cpp b/src/app.cpp index 5021c05..c6e342d 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -124,8 +124,10 @@ void App::timerHandler() { unsigned seq = app_list.currentSequenceNumber(); HMI_SEQ_DEBUG(seq, "Timer expired remove Request"); + app_list.req_dump(); app_list.removeRequest(seq); app_list.next(); + app_list.req_dump(); if (app_list.haveRequest()) { this->process_request(); @@ -407,11 +409,11 @@ void App::layout_commit() void App::set_timer(){ HMI_SEQ_DEBUG(app_list.currentSequenceNumber(), "Timer set activate"); - if (timer_ev_src != nullptr) + if (timer_ev_src == nullptr) { // firsttime set into sd_event int ret = sd_event_add_time(afb_daemon_get_event_loop(), &timer_ev_src, - CLOCK_REALTIME, time(NULL) + TIME_OUT, 0, processTimerHandler, this); + CLOCK_REALTIME, time(NULL) * (1000000UL) + TIME_OUT, 0, processTimerHandler, this); if (ret < 0) { HMI_ERROR("wm", "Could't set timer"); @@ -420,7 +422,7 @@ void App::set_timer(){ else { // update timer limitation after second time - sd_event_source_set_time(timer_ev_src, time(NULL) + TIME_OUT); + sd_event_source_set_time(timer_ev_src, time(NULL) * (1000000UL) + TIME_OUT); sd_event_source_set_enabled(timer_ev_src, SD_EVENT_ONESHOT); } } @@ -990,6 +992,8 @@ void App::api_enddraw(char const *appid, char const *drawing_name) //this->stop_timer(); this->do_enddraw(current_seq); + this->stop_timer(); + app_list.removeRequest(current_seq); HMI_SEQ_INFO(current_seq, "Finish request"); app_list.next(); |