Skip to content

Commit dee8963

Browse files
authored
Merge pull request #1703 from lesamouraipourpre/pygamer-thermal-camera
PyGamer Thermal Camera: Update for CP7 Guide changes also made
2 parents bddb205 + fbba512 commit dee8963

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

PyGamer_Thermal_Camera/code.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# Load the text font from the fonts folder
3030
font = 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
3333
with 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]
237237
color_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)
256256
pos_x, pos_y = element_grid(2.5, 4)
257257
status_label.x = pos_x
258258
status_label.y = pos_y
259259
image_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)
262262
pos_x, pos_y = element_grid(-1.8, 1.5)
263263
alarm_label.x = pos_x
264264
alarm_label.y = pos_y
265265
image_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)
268268
pos_x, pos_y = element_grid(-1.8, 3.5)
269269
max_label.x = pos_x
270270
max_label.y = pos_y
271271
image_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)
274274
pos_x, pos_y = element_grid(-1.8, 7.5)
275275
min_label.x = pos_x
276276
min_label.y = pos_y
277277
image_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)
280280
pos_x, pos_y = element_grid(-1.8, 5.5)
281281
ave_label.x = pos_x
282282
ave_label.y = pos_y
283283
image_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)
286286
pos_x, pos_y = element_grid(-1.8, 0.5)
287287
alarm_value.x = pos_x
288288
alarm_value.y = pos_y
289289
image_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)
292292
pos_x, pos_y = element_grid(-1.8, 2.5)
293293
max_value.x = pos_x
294294
max_value.y = pos_y
295295
image_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)
298298
pos_x, pos_y = element_grid(-1.8, 6.5)
299299
min_value.x = pos_x
300300
min_value.y = pos_y
301301
image_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)
304304
pos_x, pos_y = element_grid(-1.8, 4.5)
305305
ave_value.x = pos_x
306306
ave_value.y = pos_y
307307
image_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)
310310
pos_x, pos_y = element_grid(0.5, 7.5)
311311
min_histo.x = pos_x
312312
min_histo.y = pos_y
313313
image_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)
316316
pos_x, pos_y = element_grid(6.5, 7.5)
317317
max_histo.x = pos_x
318318
max_histo.y = pos_y
319319
image_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)
322322
pos_x, pos_y = element_grid(2.5, 7.5)
323323
range_histo.x = pos_x
324324
range_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

Comments
 (0)