2929# Load the text font from the fonts folder
3030font = bitmap_font .load_font ("/fonts/OpenSans-9.bdf" )
3131
32- # Display spash graphics and play startup tones
32+ # Display splash graphics and play startup tones
3333with open ("/thermal_cam_splash.bmp" , "rb" ) as bitmap_file :
3434 bitmap = displayio .OnDiskBitmap (bitmap_file )
3535 splash = displayio .Group ()
@@ -231,7 +231,7 @@ def move_buttons(joystick=False): # Read position buttons and joystick
231231 return move_u , move_d
232232
233233### Define the display group ###
234- image_group = displayio .Group (max_size = 77 )
234+ image_group = displayio .Group ()
235235
236236# Create a background color fill layer; image_group[0]
237237color_bitmap = displayio .Bitmap (WIDTH , HEIGHT , 1 )
@@ -252,73 +252,73 @@ def move_buttons(joystick=False): # Read position buttons and joystick
252252 image_group .append (element )
253253
254254# Define labels and values using element grid coordinates
255- status_label = Label (font , text = "" , color = BLACK , max_glyphs = 6 )
255+ status_label = Label (font , text = "" , color = BLACK )
256256pos_x , pos_y = element_grid (2.5 , 4 )
257257status_label .x = pos_x
258258status_label .y = pos_y
259259image_group .append (status_label ) # image_group[65]
260260
261- alarm_label = Label (font , text = "alm" , color = WHITE , max_glyphs = 3 )
261+ alarm_label = Label (font , text = "alm" , color = WHITE )
262262pos_x , pos_y = element_grid (- 1.8 , 1.5 )
263263alarm_label .x = pos_x
264264alarm_label .y = pos_y
265265image_group .append (alarm_label ) # image_group[66]
266266
267- max_label = Label (font , text = "max" , color = RED , max_glyphs = 3 )
267+ max_label = Label (font , text = "max" , color = RED )
268268pos_x , pos_y = element_grid (- 1.8 , 3.5 )
269269max_label .x = pos_x
270270max_label .y = pos_y
271271image_group .append (max_label ) # image_group[67]
272272
273- min_label = Label (font , text = "min" , color = CYAN , max_glyphs = 3 )
273+ min_label = Label (font , text = "min" , color = CYAN )
274274pos_x , pos_y = element_grid (- 1.8 , 7.5 )
275275min_label .x = pos_x
276276min_label .y = pos_y
277277image_group .append (min_label ) # image_group[68]
278278
279- ave_label = Label (font , text = "ave" , color = YELLOW , max_glyphs = 3 )
279+ ave_label = Label (font , text = "ave" , color = YELLOW )
280280pos_x , pos_y = element_grid (- 1.8 , 5.5 )
281281ave_label .x = pos_x
282282ave_label .y = pos_y
283283image_group .append (ave_label ) # image_group[69]
284284
285- alarm_value = Label (font , text = str (ALARM_F ), color = WHITE , max_glyphs = 5 )
285+ alarm_value = Label (font , text = str (ALARM_F ), color = WHITE )
286286pos_x , pos_y = element_grid (- 1.8 , 0.5 )
287287alarm_value .x = pos_x
288288alarm_value .y = pos_y
289289image_group .append (alarm_value ) # image_group[70]
290290
291- max_value = Label (font , text = str (MAX_RANGE_F ), color = RED , max_glyphs = 5 )
291+ max_value = Label (font , text = str (MAX_RANGE_F ), color = RED )
292292pos_x , pos_y = element_grid (- 1.8 , 2.5 )
293293max_value .x = pos_x
294294max_value .y = pos_y
295295image_group .append (max_value ) # image_group[71]
296296
297- min_value = Label (font , text = str (MIN_RANGE_F ), color = CYAN , max_glyphs = 5 )
297+ min_value = Label (font , text = str (MIN_RANGE_F ), color = CYAN )
298298pos_x , pos_y = element_grid (- 1.8 , 6.5 )
299299min_value .x = pos_x
300300min_value .y = pos_y
301301image_group .append (min_value ) # image_group[72]
302302
303- ave_value = Label (font , text = "---" , color = YELLOW , max_glyphs = 5 )
303+ ave_value = Label (font , text = "---" , color = YELLOW )
304304pos_x , pos_y = element_grid (- 1.8 , 4.5 )
305305ave_value .x = pos_x
306306ave_value .y = pos_y
307307image_group .append (ave_value ) # image_group[73]
308308
309- min_histo = Label (font , text = "" , color = CYAN , max_glyphs = 3 )
309+ min_histo = Label (font , text = "" , color = CYAN )
310310pos_x , pos_y = element_grid (0.5 , 7.5 )
311311min_histo .x = pos_x
312312min_histo .y = pos_y
313313image_group .append (min_histo ) # image_group[74]
314314
315- max_histo = Label (font , text = "" , color = RED , max_glyphs = 3 )
315+ max_histo = Label (font , text = "" , color = RED )
316316pos_x , pos_y = element_grid (6.5 , 7.5 )
317317max_histo .x = pos_x
318318max_histo .y = pos_y
319319image_group .append (max_histo ) # image_group[75]
320320
321- range_histo = Label (font , text = "" , color = BLUE , max_glyphs = 7 )
321+ range_histo = Label (font , text = "" , color = BLUE )
322322pos_x , pos_y = element_grid (2.5 , 7.5 )
323323range_histo .x = pos_x
324324range_histo .y = pos_y
@@ -348,7 +348,7 @@ def move_buttons(joystick=False): # Read position buttons and joystick
348348 else : # Histogram display mode and gather min, max, and sum stats
349349 v_min , v_max , v_sum = update_histo_frame ()
350350
351- # Display alarm setting and maxumum , minimum, and average stats
351+ # Display alarm setting and maximum , minimum, and average stats
352352 alarm_value .text = str (ALARM_F )
353353 max_value .text = str (celsius_to_fahrenheit (v_max ))
354354 min_value .text = str (celsius_to_fahrenheit (v_min ))
0 commit comments