fix
This commit is contained in:
parent
5073aec1dd
commit
ee544b62ce
|
@ -12,6 +12,7 @@ __TOPIC_TEXT__ = ""
|
|||
|
||||
class Controller:
|
||||
connected = False
|
||||
self.display = None
|
||||
|
||||
def __init__(self, base_topic, mqtt_host, mqtt_port = 1883):
|
||||
|
||||
|
@ -86,10 +87,10 @@ class Controller:
|
|||
while run:
|
||||
self.mqtt.loop()
|
||||
|
||||
|
||||
self.display.print(self.text[poscount])
|
||||
poscount += 1
|
||||
poscount %= len(self.text)
|
||||
time.sleep(self.scroll_interval)
|
||||
if self.display is not None:
|
||||
self.display.print(self.text[self.poscount])
|
||||
self.poscount += 1
|
||||
self.poscount %= len(self.text)
|
||||
time.sleep(self.scroll_interval)
|
||||
|
||||
|
Loading…
Reference in New Issue