Added the WelcomeScreen library
This commit is contained in:
14
main.py
14
main.py
@@ -12,6 +12,7 @@ You should have received a copy of the GNU General Public License along with thi
|
||||
|
||||
import config, utils
|
||||
from lib.ProgramChooserAdapted import ProgramChooser
|
||||
from lib.WelcomeScreen import WelcomeScreen
|
||||
from time import sleep
|
||||
import gc # garbage collector for better memory performance
|
||||
|
||||
@@ -61,10 +62,17 @@ programs = {
|
||||
"UV on": uv_on,
|
||||
"Timer": timer,
|
||||
"Manual": manual,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if config.STARTUP_WELCOME_SHOW: utils.show_welcome()
|
||||
if config.STARTUP_WELCOME_SHOW:
|
||||
ws = WelcomeScreen(config.LCD,
|
||||
interrupt_pins=[config.BTN_1, config.BTN_2, config.SWITCH],
|
||||
subtitle=config.STARTUP_PROJECT_NAME,
|
||||
starting_msg=config.STARTUP_MESSAGE_STARTING,
|
||||
started_msg=config.STARTUP_MESSAGE_FINISHED)
|
||||
ws.show(cycles=config.STARTUP_WELCOME_CYCLES)
|
||||
del ws
|
||||
gc.collect()
|
||||
|
||||
pc = ProgramChooser(programs) # initialize the ProgramChooser
|
||||
pc.run() # and run it (will be an endless loop)
|
||||
|
||||
Reference in New Issue
Block a user