Changed fan temperature thresholds
This commit is contained in:
parent
d87ce8001f
commit
7d73529502
|
@ -0,0 +1,18 @@
|
||||||
|
# Requires yt-dlp; install with winget
|
||||||
|
|
||||||
|
param (
|
||||||
|
[string]$PLAYLISTURL,
|
||||||
|
[string]$LIBRARY_NAME = "Soundtracks",
|
||||||
|
[string]$TARGETPATH = "/mnt/data/media/"
|
||||||
|
)
|
||||||
|
|
||||||
|
$DEFAULT_TARGET_PATH = "/mnt/data/media/"
|
||||||
|
|
||||||
|
# Check if $PLAYLISTURL is empty
|
||||||
|
if (-not $PLAYLISTURL) {
|
||||||
|
Write-Output "Need to specify a playlist URL"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Use double quotes for variables within the yt-dlp command
|
||||||
|
yt-dlp -f 'ba' -x --audio-format mp3 $PLAYLISTURL -o "$TARGETPATH/$LIBRARY_NAME/%(playlist)s/%(title)s.%(ext)s"
|
|
@ -33,13 +33,13 @@ def set_speed(fan, speed):
|
||||||
|
|
||||||
while 1:
|
while 1:
|
||||||
temp = get_temp() # Get the current CPU temperature
|
temp = get_temp() # Get the current CPU temperature
|
||||||
if temp > 70: # Check temperature threshhold, in degrees celcius
|
if temp > 60: # Check temperature threshhold, in degrees celcius
|
||||||
set_speed(fan, 100) # Set fan duty based on temperature, 100 is max speed and 0 is min speed or off.
|
set_speed(fan, 100) # Set fan duty based on temperature, 100 is max speed and 0 is min speed or off.
|
||||||
elif temp > 60:
|
|
||||||
set_speed(fan, 85)
|
|
||||||
elif temp > 50:
|
elif temp > 50:
|
||||||
set_speed(fan, 60)
|
set_speed(fan, 85)
|
||||||
elif temp > 40:
|
elif temp > 40:
|
||||||
|
set_speed(fan, 60)
|
||||||
|
elif temp > 35:
|
||||||
set_speed(fan, 50)
|
set_speed(fan, 50)
|
||||||
elif temp > 32:
|
elif temp > 32:
|
||||||
set_speed(fan, 45)
|
set_speed(fan, 45)
|
||||||
|
|
Loading…
Reference in New Issue