Fix not detecting temperature properly

This commit is contained in:
askiiart 2022-10-25 18:56:46 -05:00
parent 901128d8ca
commit 4b0074d498

View file

@ -26,11 +26,10 @@ try:
link.open() link.open()
time.sleep(2) time.sleep(2)
# GPUtil setup
gpus = GPUtil.getGPUs()
while True: while True:
time.sleep(1) time.sleep(1)
gpus = GPUtil.getGPUs()
temp = max(gpu.temperature for gpu in gpus) temp = max(gpu.temperature for gpu in gpus)
speed = int(((temp - 40) / 40) * 100) speed = int(((temp - 40) / 40) * 100)