Skip to content

Commit 27156d2

Browse files
committed
allow temperature reads to converge a bit faster
1 parent e2d010e commit 27156d2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/all-in-one-no-pm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def get_cpu_temperature():
8787
# temperature down, and increase to adjust up
8888
factor = 0.8
8989

90-
cpu_temps = [0] * 5
90+
cpu_temps = [get_cpu_temperature()] * 5
9191

9292
delay = 0.5 # Debounce the proximity tap
9393
mode = 0 # The starting mode

examples/all-in-one.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def get_cpu_temperature():
9393
# temperature down, and increase to adjust up
9494
factor = 0.8
9595

96-
cpu_temps = [0] * 5
96+
cpu_temps = [get_cpu_temperature()] * 5
9797

9898
delay = 0.5 # Debounce the proximity tap
9999
mode = 0 # The starting mode

examples/compensated-temperature.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def get_cpu_temperature():
3333
# temperature down, and increase to adjust up
3434
factor = 0.8
3535

36-
cpu_temps = [0] * 5
36+
cpu_temps = [get_cpu_temperature()] * 5
3737

3838
while True:
3939
cpu_temp = get_cpu_temperature()

0 commit comments

Comments
 (0)