mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
use v1.2.6 new operator in LCD example
This commit is contained in:
parent
e2b27ffb3f
commit
35acea5b3e
@ -21,25 +21,18 @@ print('mem used max:')
|
||||
mem.max()
|
||||
lcd.fill(x, y, w, h, 'blue')
|
||||
while True:
|
||||
if key.get() == 0:
|
||||
is_update = 1
|
||||
key_val = key.get()
|
||||
if key_val != -1:
|
||||
x_last = x
|
||||
y_last = y
|
||||
is_update = 1
|
||||
if key_val == 0:
|
||||
x = x + 5
|
||||
if key.get() == 1:
|
||||
is_update = 1
|
||||
x_last = x
|
||||
y_last = y
|
||||
if key_val == 1:
|
||||
y = y - 5
|
||||
if key.get() == 2:
|
||||
is_update = 1
|
||||
x_last = x
|
||||
y_last = y
|
||||
if key_val == 2:
|
||||
y = y + 5
|
||||
if key.get() == 3:
|
||||
is_update = 1
|
||||
x_last = x
|
||||
y_last = y
|
||||
if key_val == 3:
|
||||
x = x - 5
|
||||
if is_update:
|
||||
is_update = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user