Add support for multiple AMD temp types (#49)

This commit is contained in:
Meliox 2024-06-16 13:01:46 +02:00 committed by GitHub
parent 3490d3a07e
commit ba3991a3a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,15 +112,27 @@ function configure {
if (echo "$sensorsOutput" | grep -q "$item"); then
case "$item" in
"coretemp-"*)
# Intel CPU
# Set temperature search criteria
if (echo "$sensorsOutput" | grep -A 10 "$item" | grep -q "Core "); then
CPU_ADDRESS_PREFIX=$item
CPU_ITEM_PREFIX="Core "
CPU_TEMP_CAPTION="Core"
fi
break
;;
"k10temp-"*)
# AMD CPU
# Find and set temperature search criteria
if (echo "$sensorsOutput" | grep -A 4 "$item" | grep -q -e "Tctl" -e "Tccd"); then
CPU_ADDRESS_PREFIX=$item
CPU_ITEM_PREFIX="Tccd"
CPU_TEMP_CAPTION="Temp"
elif (echo "$sensorsOutput" | grep -A 4 "$item" | grep -q "temp"); then
CPU_ADDRESS_PREFIX=$item
CPU_ITEM_PREFIX="temp"
CPU_TEMP_CAPTION="Temp"
fi
break
;;
*)