[WelcomeScreen.py] prepared for interrupt support; includes the commit string of the last commit
- finally got the fade out animation support 4*20 LCDs too (in theory, couldn't test that sadly) - prepared for interrupt support, by adding a list parameter with pins
This commit is contained in:
parent
359c96aacc
commit
e5f45ff593
@ -22,13 +22,21 @@ import time
|
||||
class WelcomeScreen:
|
||||
# __init__() - the constructor
|
||||
# lcd: an object of I2C_LCD (from the PCF8574T library - https://git.privacynerd.de/BlueFox/micropython-libraries/src/branch/main/PCF8574T)
|
||||
# ---
|
||||
# interrupt_pins: a list containing machine.Pin objects exclusively (but if you give these you can still turn interrupting off
|
||||
# via a parameter in the show method (see below!)
|
||||
# ---
|
||||
# subtitle: the text shown below the cycling text (e.g. the device's name, ...) (Lorem ipsum. by default)
|
||||
# ---
|
||||
# starting_msg: the text shown while cycling (default: Starting...)
|
||||
# ---
|
||||
# started_msg: the text shown while cycling (default: Started!)
|
||||
def __init__(self, lcd, subtitle="Lorem ipsum.", starting_msg="Starting...", started_msg="Started!"):
|
||||
def __init__(self, lcd, interrupt_pins=None, subtitle="Lorem ipsum.", starting_msg="Starting...", started_msg="Started!"):
|
||||
self.lcd = lcd
|
||||
self.columns = self.lcd.num_columns
|
||||
self.lines = self.lcd.num_lines
|
||||
|
||||
self.interrupt_pins = interrupt_pins
|
||||
self.subtitle = subtitle
|
||||
self.starting_msg = starting_msg
|
||||
self.started_msg = started_msg
|
||||
|
Loading…
Reference in New Issue
Block a user