@@ -64,7 +64,7 @@ def set_backlight(val):
64
64
screen_height = 320
65
65
ts = adafruit_touchscreen .Touchscreen (board .TOUCH_YD , board .TOUCH_YU ,
66
66
board .TOUCH_XR , board .TOUCH_XL ,
67
- calibration = ((5200 , 59000 ),
67
+ calibration = ((5200 , 59000 ),
68
68
(5800 , 57000 )),
69
69
size = (screen_width , screen_height ))
70
70
@@ -117,13 +117,13 @@ def set_image(group, filename):
117
117
118
118
if not filename :
119
119
return # we're done, no icon desired
120
-
120
+
121
121
image_file = open (filename , "rb" )
122
122
image = displayio .OnDiskBitmap (image_file )
123
123
try :
124
124
image_sprite = displayio .TileGrid (image , pixel_shader = displayio .ColorConverter ())
125
125
except TypeError :
126
- image_sprite = displayio .TileGrid (image , pixel_shader = displayio .ColorConverter (),
126
+ image_sprite = displayio .TileGrid (image , pixel_shader = displayio .ColorConverter (),
127
127
position = (0 , 0 ))
128
128
group .append (image_sprite )
129
129
@@ -263,6 +263,7 @@ def text_box(target, top, string, max_chars):
263
263
# Add this button to view2 Group
264
264
view3 .append (button_sound .group )
265
265
266
+ #pylint: disable=global-statement
266
267
def switch_view (what_view ):
267
268
global view_live
268
269
if what_view == 1 :
@@ -293,7 +294,7 @@ def switch_view(what_view):
293
294
showLayer (view3 )
294
295
view_live = 3
295
296
print ("View3 On" )
296
-
297
+ #pylint: enable=global-statement
297
298
298
299
# Set veriables and startup states
299
300
button_view1 .selected = False
@@ -312,14 +313,17 @@ def switch_view(what_view):
312
313
button_switch .selected = True
313
314
314
315
# Update out Labels with display text.
315
- text_box (feed1_label , TABS_Y , "The text on this screen is wrapped so that all of it fits nicely into a text box that is ### x ###." , 30 )
316
- text_box (feed1_label , TABS_Y , 'The text on this screen is wrapped so that all of it fits nicely into a text box that is {} x {}.'
317
- .format (feed1_label .bounding_box [2 ],
318
- feed1_label .bounding_box [3 ]* 2 ), 30 )
316
+ text_box (feed1_label , TABS_Y ,
317
+ "The text on this screen is wrapped so that all of it fits nicely into a text box that is ### x ###." ,
318
+ 30 )
319
+ text_box (feed1_label , TABS_Y ,
320
+ 'The text on this screen is wrapped so that all of it fits nicely into a text box that is {} x {}.'
321
+ .format (feed1_label .bounding_box [2 ], feed1_label .bounding_box [3 ]* 2 ), 30 )
319
322
320
323
text_box (feed2_label , TABS_Y , 'Tap on the Icon button to meet a new friend.' , 18 )
321
324
322
- text_box (sensors_label , TABS_Y , 'This screen can display sensor readings and tap Sound to play a WAV file.' , 28 )
325
+ text_box (sensors_label , TABS_Y ,
326
+ "This screen can display sensor readings and tap Sound to play a WAV file." , 28 )
323
327
324
328
board .DISPLAY .show (splash )
325
329
@@ -410,7 +414,9 @@ def switch_view(what_view):
410
414
elif icon == 3 :
411
415
icon_name = "Billie"
412
416
b .selected = False
413
- text_box (feed2_label , TABS_Y , 'Every time you tap the Icon button the icon image will change. Say hi to {}!' .format (icon_name ), 18 )
417
+ text_box (feed2_label , TABS_Y ,
418
+ "Every time you tap the Icon button the icon image will change. Say hi to {}!"
419
+ .format (icon_name ), 18 )
414
420
set_image (icon_group , "/images/" + icon_name + ".bmp" )
415
421
if i == 6 and view_live == 3 : # only if view3 is visable
416
422
b .selected = True
0 commit comments