Skip to content

Commit 29de690

Browse files
committed
DM: make travis happy
1 parent 355cade commit 29de690

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

examples/thermalcam.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import busio
66
import board
77

8-
import pygame
98
import numpy as np
9+
import pygame
1010
from scipy.interpolate import griddata
1111

1212
from colour import Color
@@ -62,27 +62,27 @@ def constrain(val, min_val, max_val):
6262
return min(max_val, max(min_val, val))
6363

6464
def map_value(x, in_min, in_max, out_min, out_max):
65-
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min
65+
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min
6666

6767
#let the sensor initialize
6868
time.sleep(.1)
69-
69+
7070
while True:
7171

7272
#read the pixels
7373
pixels = []
7474
for row in sensor.pixels:
7575
pixels = pixels + row
7676
pixels = [map_value(p, MINTEMP, MAXTEMP, 0, COLORDEPTH - 1) for p in pixels]
77-
77+
7878
#perform interpolation
7979
bicubic = griddata(points, pixels, (grid_x, grid_y), method='cubic')
8080

8181
#draw everything
8282
for ix, row in enumerate(bicubic):
8383
for jx, pixel in enumerate(row):
84-
pygame.draw.rect(lcd, colors[constrain(int(pixel), 0, COLORDEPTH- 1)],
85-
(displayPixelHeight * ix, displayPixelWidth * jx, displayPixelHeight, displayPixelWidth))
86-
87-
pygame.display.update()
84+
pygame.draw.rect(lcd, colors[constrain(int(pixel), 0, COLORDEPTH- 1)],
85+
(displayPixelHeight * ix, displayPixelWidth * jx,
86+
displayPixelHeight, displayPixelWidth))
8887

88+
pygame.display.update()

0 commit comments

Comments
 (0)