master
Lukas Schulz 2020-12-20 00:15:37 +01:00
parent af3040ce26
commit d09b7cdcb3
1 changed files with 7 additions and 3 deletions

10
main.py
View File

@ -29,6 +29,7 @@ options.gpio_slowdown = 4
options.brightness = 50
screen = RGBMatrix(options = options)
changed = True
token = util.prompt_for_user_token(username, scope, client_id, client_secret, redirect_uri)
@ -76,8 +77,9 @@ def main():
def updateImage():
this.canvas = Image.new('RGB', (192, 128), color = 'red')
this.canvas = canvas.paste(get_track(), (0,0))
global canvas = Image.new('RGB', (192, 128), color = 'red')
global canvas = canvas.paste(get_track(), (0,0))
global changed = True
@ -86,7 +88,9 @@ if __name__ == "__main__":
print('text')
while True:
showImage(canvas)
if (changed):
showImage(canvas)
global changed = False