Small improvements
This commit is contained in:
parent
68a588de58
commit
92ebbd2ef8
@ -21,10 +21,12 @@ from utils import log
|
|||||||
def run(lcd):
|
def run(lcd):
|
||||||
# Show off basic functionality of the lcd driver
|
# Show off basic functionality of the lcd driver
|
||||||
log(2, "Running the lcd driver demo")
|
log(2, "Running the lcd driver demo")
|
||||||
lcd.putstr("Driver demo".center(16))
|
|
||||||
|
lcd.clear()
|
||||||
|
lcd.putstr("Driver demo".center(16)+"running...".center(16))
|
||||||
sleep(1)
|
sleep(1)
|
||||||
lcd.clear()
|
lcd.clear()
|
||||||
lcd.putstr("Lorem ipsum dolor sit amet")
|
lcd.putstr("Lorem ipsum dolor sit amet")
|
||||||
sleep(1)
|
sleep(1)
|
||||||
lcd.show_cursor()
|
lcd.show_cursor()
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
6
main.py
6
main.py
@ -20,8 +20,8 @@ btn_mapping = {"ok_btn": config.PIN_IN_BTN_1, "next_btn": config.PIN_IN_BTN_2}
|
|||||||
|
|
||||||
|
|
||||||
# extra functions to access the garbage collector
|
# extra functions to access the garbage collector
|
||||||
def timer():
|
def timers():
|
||||||
import programs.timer as t
|
import programs.timers as t
|
||||||
t.run(config, btn_mapping, utils.log, lcdMenu)
|
t.run(config, btn_mapping, utils.log, lcdMenu)
|
||||||
del t
|
del t
|
||||||
collect()
|
collect()
|
||||||
@ -47,7 +47,7 @@ def settings():
|
|||||||
|
|
||||||
# create the main menu
|
# create the main menu
|
||||||
main_menu = lcdMenu(config.LCD, btn_mapping, scroll_direction=True, cycle=True, hide_menu_name=False, name="PROGRAMS")
|
main_menu = lcdMenu(config.LCD, btn_mapping, scroll_direction=True, cycle=True, hide_menu_name=False, name="PROGRAMS")
|
||||||
main_programs = [("Timer", timer),
|
main_programs = [("Timers", timers),
|
||||||
("Manual", manual),
|
("Manual", manual),
|
||||||
("Demos", demos),
|
("Demos", demos),
|
||||||
("Settings", settings)]
|
("Settings", settings)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user