From cb0e1ae009a95a8aea2064bf7d3ba3d3503708ae Mon Sep 17 00:00:00 2001 From: Pavel Slama Date: Sun, 8 Nov 2020 20:55:23 +0100 Subject: [PATCH] ENV to int/float --- fan.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fan.py b/fan.py index d65b371..f2b1758 100644 --- a/fan.py +++ b/fan.py @@ -32,15 +32,15 @@ DESIRED_TEMP = os.getenv('DESIRED_TEMP', 40) -FAN_PIN = os.getenv('FAN_PIN', 13) -FAN_PWM_MIN = os.getenv('FAN_PWM_MIN', 20) -FAN_PWM_MAX = os.getenv('FAN_PWM_MAX', 100) -FAN_PWM_FREQ = os.getenv('FAN_PWM_FREQ', 17) +FAN_PIN = int(os.getenv('FAN_PIN', 13)) +FAN_PWM_MIN = int(os.getenv('FAN_PWM_MIN', 20)) +FAN_PWM_MAX = int(os.getenv('FAN_PWM_MAX', 100)) +FAN_PWM_FREQ = int(os.getenv('FAN_PWM_FREQ', 17)) -P_TEMP = os.getenv('P_TEMP', 18.0) -I_TEMP = os.getenv('I_TEMP', 0.3) +P_TEMP = float(os.getenv('P_TEMP', 18.0)) +I_TEMP = float(os.getenv('I_TEMP', 0.3)) -READ_INTERVAL = os.getenv('READ_INTERVAL', 2) +READ_INTERVAL = int(os.getenv('READ_INTERVAL', 2)) fanSpeed = FAN_PWM_MAX sum = 0