Skip to content
Discussion options

You must be logged in to vote

In my app I've made these changes and now the timer works as expected.

# took out this
#th = task_handler.TaskHandler(duration=5)

...

import time
def event_loop():
    while lv.screen_active(): # exit when the screen is closed
        lcd_bus._pump_main_thread()
        time.sleep_ms(5)

        # added this
        lv.tick_inc(5)
        lv.task_handler()

A remaining issue is that I can't figure out how to stop the timer, pause() and delete() don't do it.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@kdschlosser
Comment options

@glennra
Comment options

Comment options

You must be logged in to vote
2 replies
@kdschlosser
Comment options

@kdschlosser
Comment options

Answer selected by glennra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants