@@ -64,7 +64,7 @@ def set_backlight(val):
6464screen_height = 320
6565ts = adafruit_touchscreen .Touchscreen (board .TOUCH_YD , board .TOUCH_YU ,
6666 board .TOUCH_XR , board .TOUCH_XL ,
67- calibration = ((5200 , 59000 ),
67+ calibration = ((5200 , 59000 ),
6868 (5800 , 57000 )),
6969 size = (screen_width , screen_height ))
7070
@@ -117,13 +117,13 @@ def set_image(group, filename):
117117
118118 if not filename :
119119 return # we're done, no icon desired
120-
120+
121121 image_file = open (filename , "rb" )
122122 image = displayio .OnDiskBitmap (image_file )
123123 try :
124124 image_sprite = displayio .TileGrid (image , pixel_shader = displayio .ColorConverter ())
125125 except TypeError :
126- image_sprite = displayio .TileGrid (image , pixel_shader = displayio .ColorConverter (),
126+ image_sprite = displayio .TileGrid (image , pixel_shader = displayio .ColorConverter (),
127127 position = (0 , 0 ))
128128 group .append (image_sprite )
129129
@@ -263,6 +263,7 @@ def text_box(target, top, string, max_chars):
263263# Add this button to view2 Group
264264view3 .append (button_sound .group )
265265
266+ #pylint: disable=global-statement
266267def switch_view (what_view ):
267268 global view_live
268269 if what_view == 1 :
@@ -293,7 +294,7 @@ def switch_view(what_view):
293294 showLayer (view3 )
294295 view_live = 3
295296 print ("View3 On" )
296-
297+ #pylint: enable=global-statement
297298
298299# Set veriables and startup states
299300button_view1 .selected = False
@@ -312,14 +313,17 @@ def switch_view(what_view):
312313button_switch .selected = True
313314
314315# 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 )
319322
320323text_box (feed2_label , TABS_Y , 'Tap on the Icon button to meet a new friend.' , 18 )
321324
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 )
323327
324328board .DISPLAY .show (splash )
325329
@@ -410,7 +414,9 @@ def switch_view(what_view):
410414 elif icon == 3 :
411415 icon_name = "Billie"
412416 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 )
414420 set_image (icon_group , "/images/" + icon_name + ".bmp" )
415421 if i == 6 and view_live == 3 : # only if view3 is visable
416422 b .selected = True
0 commit comments