Add min & max speed vars
This commit is contained in:
parent
2788fbddda
commit
8fd5d012db
1 changed files with 5 additions and 3 deletions
|
@ -24,10 +24,12 @@ try:
|
||||||
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)
|
||||||
if speed < 40:
|
min_speed = 0
|
||||||
speed = 40
|
max_speed = 100
|
||||||
|
if speed < 0:
|
||||||
|
speed = min_speed
|
||||||
elif speed > 100:
|
elif speed > 100:
|
||||||
speed = 100
|
speed = max_speed
|
||||||
|
|
||||||
print(f'Temp: {temp}')
|
print(f'Temp: {temp}')
|
||||||
print(f'Speed: {speed}')
|
print(f'Speed: {speed}')
|
||||||
|
|
Loading…
Reference in a new issue