From: Ciprian Manea Date: Sat, 3 Aug 2019 22:49:01 +0000 (+0300) Subject: allow temperature reads to converge a bit faster X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02-2.git/commitdiff_plain/27156d25c1b1c310a64f31ba9f22aaf27569c4fd?ds=sidebyside;hp=-c allow temperature reads to converge a bit faster --- 27156d25c1b1c310a64f31ba9f22aaf27569c4fd diff --git a/examples/all-in-one-no-pm.py b/examples/all-in-one-no-pm.py index ab1a1a7..f7ebcdc 100755 --- a/examples/all-in-one-no-pm.py +++ b/examples/all-in-one-no-pm.py @@ -87,7 +87,7 @@ def get_cpu_temperature(): # temperature down, and increase to adjust up factor = 0.8 -cpu_temps = [0] * 5 +cpu_temps = [get_cpu_temperature()] * 5 delay = 0.5 # Debounce the proximity tap mode = 0 # The starting mode diff --git a/examples/all-in-one.py b/examples/all-in-one.py index 6314137..ca0760b 100755 --- a/examples/all-in-one.py +++ b/examples/all-in-one.py @@ -93,7 +93,7 @@ def get_cpu_temperature(): # temperature down, and increase to adjust up factor = 0.8 -cpu_temps = [0] * 5 +cpu_temps = [get_cpu_temperature()] * 5 delay = 0.5 # Debounce the proximity tap mode = 0 # The starting mode diff --git a/examples/compensated-temperature.py b/examples/compensated-temperature.py index 3679610..2733f56 100755 --- a/examples/compensated-temperature.py +++ b/examples/compensated-temperature.py @@ -33,7 +33,7 @@ def get_cpu_temperature(): # temperature down, and increase to adjust up factor = 0.8 -cpu_temps = [0] * 5 +cpu_temps = [get_cpu_temperature()] * 5 while True: cpu_temp = get_cpu_temperature()