File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131
3232# read buttons from ePaper shield
3333def read_buttons ():
34- button = 1
34+ btn = 1
3535 with AnalogIn (board .A3 ) as ain :
3636 reading = ain .value / 65535
3737 if reading > 0.75 :
38- button = None
38+ btn = None
3939 if reading > 0.4 :
40- button = 4
40+ btn = 4
4141 if reading > 0.25 :
42- button = 3
42+ btn = 3
4343 if reading > 0.13 :
44- button = 2
45- button = 1
46- return button
44+ btn = 2
45+ btn = 1
46+ return btn
4747
4848# display bitmap file
4949def display_bitmap (epd , filename ):
@@ -280,11 +280,11 @@ def run_job(jobfile):
280280 tpanel [x2 ] = tcanvas [x + x2 - panelwidth ]
281281 offset = 0
282282 if (x >= 22 and
283- x < (image .width + panelwidth // 2 )
284- and y < image .height ):
283+ x < (image .width + panelwidth // 2 )
284+ and y < image .height ):
285285 if (
286286 (image [x - panelwidth // 2 , y ] != 0 and not inv
287- ) or (
287+ ) or (
288288 image [x - panelwidth // 2 , y ] == 0 and inv )
289289 ):
290290 # offset = 4
You can’t perform that action at this time.
0 commit comments