Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.3.6 #519

Merged
merged 18 commits into from
Sep 6, 2022
Merged

0.3.6 #519

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update helper.sh
  • Loading branch information
LinkLeong committed Aug 24, 2022
commit c4a72185cc9b07ee49b4a29538825ecc5232d36f
39 changes: 0 additions & 39 deletions shell/helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -385,43 +385,4 @@ CheckServiceStatus(){
}
UDEVILUmount(){
$sudo_cmd udevil umount -f $1
}

GetTemp(){
if(file_exists("/sys/class/thermal/thermal_zone0/temp"))
{
$output = rtrim(file_get_contents("/sys/class/thermal/thermal_zone0/temp"));
}
elseif (file_exists("/sys/class/hwmon/hwmon0/temp1_input"))
{
$output = rtrim(file_get_contents("/sys/class/hwmon/hwmon0/temp1_input"));
}
else
{
$output = "";
}

if(is_numeric($output))
{
$celsius = intval($output);

if($celsius > 1000) {
$celsius *= 1e-3;
}

if(isset($setupVars['TEMPERATURE_LIMIT']))
{
$temperaturelimit = intval($setupVars['TEMPERATURE_LIMIT']);
}
else
{
$temperaturelimit = 60;
}
}
else
{
// Nothing can be colder than -273.15 degree Celsius (= 0 Kelvin)
// This is the minimum temperature possible (AKA absolute zero)
$celsius = -273.16;
}
}