Skip to content

Commit

Permalink
Add detect new CPU temp
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Jan 6, 2014
1 parent 1732f49 commit 5c13921
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/i-nex/.src/thermal_zone.module
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
Public Logs As New Logger
Public temp_acpi As Boolean = Exist("/sys/bus/acpi/devices/LNXTHERM:00/thermal_zone/temp")
Public temp_acpi_thm As Boolean = Exist("/proc/acpi/thermal_zone/THM0/temperature")
Public temp_hwmon As Boolean = Exist("/sys/class/hwmon/hwmon0/device/temp2_input")
Public temp_hwmon As Boolean = Access("/sys/class/hwmon/hwmon0/device/temp2_input", gb.Read)
Public temp_hwmon2 As Boolean = Access("/sys/class/hwmon/hwmon0/temp1_input", gb.Read)
Public temp_coretemp As Boolean = Exist("/sys/devices/platform/coretemp.0/temp2_input")

Public Temperature As String
Public calculate As Float
Public supporttemp As Boolean = False
Expand Down Expand Up @@ -34,6 +36,13 @@ Public Sub _inits()
supporttemp = False
Endif

If temp_hwmon2 = True Then
Shell "cat /sys/class/hwmon/hwmon0/temp1_input" Wait To Temperature
supporttemp = True
Else
supporttemp = False
Endif

If temp_coretemp = True Then
Shell "cat /sys/devices/platform/coretemp.0/temp2_input" Wait To Temperature
supporttemp = True
Expand All @@ -60,11 +69,6 @@ Public Sub _inits()
'/sys/bus/acpi/devices/LNXTHERM\:00/thermal_zone/temp',
'/sys/devices/virtual/thermal/thermal_zone0/temp',
'/sys/bus/acpi/drivers/ATK0110/ATK0110:00/hwmon/hwmon0/temp1_input',
'old kernels With proc fs
'/proc/acpi/thermal_zone/THM0/temperature',
'/proc/acpi/thermal_zone/THRM/temperature',
'/proc/acpi/thermal_zone/THR0/temperature',
'/proc/acpi/thermal_zone/TZ0/temperature',
'Debian Sid / Experimental On AMD - 64
'/sys/class/hwmon/hwmon0/device/temp1_input'

Expand Down

0 comments on commit 5c13921

Please sign in to comment.