Skip to content

Commit 333ae1c

Browse files
committed
precision
1 parent 533af2e commit 333ae1c

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

hardwareServer.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ async def updateDuty(channel, temp, criticalTemp):
177177
global config
178178
norm = normalizeProfile(config[channel], criticalTemp)
179179
average = None
180-
cutoff_freq = 1 / 2 / 10
180+
cutoff_freq = 1 / 10
181181
alpha = 1 - math.exp(-2 * math.pi * cutoff_freq)
182182
ema = average
183183
sample = temp
@@ -187,16 +187,15 @@ async def updateDuty(channel, temp, criticalTemp):
187187
ema = alpha * sample + (1 - alpha) * ema
188188
average = ema
189189
duty = interpolateProfile(norm, ema)
190-
#print(f"[HARDWARE-SERVER] Setting {channel} duty to {duty}%")
190+
#print(f"[HARDWARE-SERVER] Setting {channel} duty to {duty}% | {temp}°C")
191191
try:
192192
await lcd.setFixedSpeed(channel, duty)
193-
except OSError:
193+
except Exception:
194194
print(f"[HARDWARE-SERVER] There was an error while writing duty info for {channel}")
195195

196196
async def checkCurves(cpuTemp, gpuTemp, liquidTemp):
197197
global config, cpuTemps
198-
await asyncio.sleep(1)
199-
cpuTemps.append(math.ceil(cpuTemp))
198+
cpuTemps.append(cpuTemp)
200199
cpuTemps.pop(0)
201200
averageCpuTemp = 0
202201
for temp in cpuTemps:

0 commit comments

Comments
 (0)