yes.
This commit is contained in:
parent
af3040ce26
commit
d09b7cdcb3
1 changed files with 7 additions and 3 deletions
10
main.py
10
main.py
|
@ -29,6 +29,7 @@ options.gpio_slowdown = 4
|
||||||
options.brightness = 50
|
options.brightness = 50
|
||||||
screen = RGBMatrix(options = options)
|
screen = RGBMatrix(options = options)
|
||||||
|
|
||||||
|
changed = True
|
||||||
|
|
||||||
|
|
||||||
token = util.prompt_for_user_token(username, scope, client_id, client_secret, redirect_uri)
|
token = util.prompt_for_user_token(username, scope, client_id, client_secret, redirect_uri)
|
||||||
|
@ -76,8 +77,9 @@ def main():
|
||||||
|
|
||||||
|
|
||||||
def updateImage():
|
def updateImage():
|
||||||
this.canvas = Image.new('RGB', (192, 128), color = 'red')
|
global canvas = Image.new('RGB', (192, 128), color = 'red')
|
||||||
this.canvas = canvas.paste(get_track(), (0,0))
|
global canvas = canvas.paste(get_track(), (0,0))
|
||||||
|
global changed = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,7 +88,9 @@ if __name__ == "__main__":
|
||||||
print('text')
|
print('text')
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
showImage(canvas)
|
if (changed):
|
||||||
|
showImage(canvas)
|
||||||
|
global changed = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue