Skip to content

Commit

Permalink
During installation, cpu temps could be higher than 20°C. Raising up …
Browse files Browse the repository at this point in the history
…the threshold to 30°C
  • Loading branch information
Stefal committed Dec 29, 2023
1 parent a0f6a69 commit a333abd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/opi_temp_offset.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

detect_sbc_temp_offset(){
#Detect if the computer is a Orange Pi Zero, and if the cpu temps is lower than 20°C, it looks like it's a Orange Pi zero LTS with a 30°C offset
#Detect if the computer is a Orange Pi Zero, and if the cpu temps is lower than 30°C, it looks like it's a Orange Pi zero LTS with a 30°C offset
computer_model=$(tr -d '\0' < /sys/firmware/devicetree/base/model)
cpu_temp=$(($(cat /sys/class/thermal/thermal_zone0/temp)/1000))
if [[ $computer_model = 'Xunlong Orange Pi Zero' ]] && [[ cpu_temp -lt 20 ]]
if [[ $computer_model = 'Xunlong Orange Pi Zero' ]] && [[ cpu_temp -lt 30 ]]
then
echo 'Adding 30°C offset'
if [[ -f "${rtkbase_path}/settings.conf" ]] && grep -qE "^cpu_temp_offset=.*" "${rtkbase_path}"/settings.conf #check if settings.conf exists
Expand Down

1 comment on commit a333abd

@Stefal
Copy link
Owner Author

@Stefal Stefal commented on a333abd Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.