|
2 | 2 | # 2020-01-29 v3.2 |
3 | 3 | # (c) 2020 Jan Goolsbey for Adafruit Industries |
4 | 4 |
|
| 5 | +from thermal_cam_converters import celsius_to_fahrenheit, fahrenheit_to_celsius |
5 | 6 | import time |
6 | 7 | import board |
7 | 8 | import displayio |
|
11 | 12 | from adafruit_display_shapes.rect import Rect |
12 | 13 | import adafruit_amg88xx |
13 | 14 | from adafruit_pybadger import PyBadger |
14 | | -from thermal_cam_converters import celsius_to_fahrenheit, fahrenheit_to_celsius |
15 | 15 |
|
16 | 16 | # Establish panel instance and check for joystick |
17 | 17 | panel = PyBadger(pixels_brightness=0.1) # Set NeoPixel brightness |
@@ -382,16 +382,16 @@ def move_buttons(joystick=False): # Read position buttons and joystick |
382 | 382 | panel.play_tone(698, 0.030) # F5 |
383 | 383 | if display_focus: |
384 | 384 | display_focus = False # restore previous (original) range values |
385 | | - MIN_RANGE_F = temp_min_range_f |
386 | | - MAX_RANGE_F = temp_max_range_f |
| 385 | + MIN_RANGE_F = orig_min_range_f |
| 386 | + MAX_RANGE_F = orig_max_range_f |
387 | 387 | # update range min and max values in Celsius |
388 | 388 | MIN_RANGE_C = fahrenheit_to_celsius(MIN_RANGE_F) |
389 | 389 | MAX_RANGE_C = fahrenheit_to_celsius(MAX_RANGE_F) |
390 | 390 | flash_status("ORIG", 0.2) |
391 | 391 | else: |
392 | 392 | display_focus = True # set range values to image min/max |
393 | | - temp_min_range_f = MIN_RANGE_F |
394 | | - temp_max_range_f = MAX_RANGE_F |
| 393 | + orig_min_range_f = MIN_RANGE_F |
| 394 | + orig_max_range_f = MAX_RANGE_F |
395 | 395 | MIN_RANGE_F = celsius_to_fahrenheit(v_min) |
396 | 396 | MAX_RANGE_F = celsius_to_fahrenheit(v_max) |
397 | 397 | MIN_RANGE_C = v_min # update range temp in Celsius |
|
0 commit comments