From 27156d25c1b1c310a64f31ba9f22aaf27569c4fd Mon Sep 17 00:00:00 2001 From: Ciprian Manea Date: Sun, 4 Aug 2019 01:49:01 +0300 Subject: [PATCH 1/1] allow temperature reads to converge a bit faster --- examples/all-in-one-no-pm.py | 2 +- examples/all-in-one.py | 2 +- examples/compensated-temperature.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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() -- 2.30.2