It is currently April 20th, 2024, 12:22 pm

Temp Reading Goof Up

Get help with creating, editing & fixing problems with skins
Klusterfuk
Posts: 2
Joined: October 10th, 2015, 3:26 pm

Temp Reading Goof Up

Post by Klusterfuk »

Hey all,

I am trying to code a monitor for max and core temps, and clock speed. I hit a major speed bump though. The min and max temps are synced, so the max acts as though it is the current core temp. This is senseless. If you could help me out, I would appreciate it.

(PLEASE DO NOT STEAL, YOU WILL GET CREDIT)

Code: Select all

;--------------------------------------------
;  V   STANDARD CONFIG   V
;--------------------------------------------

[Rainmeter]
Update=1
Author=Klusterfuk
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
Name=Temperatures
Information=Displays basic system temperatures
Version=1.0.0

[Variables]
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205

;--------------------------------------
;  V   STYLE BASICS   V
;--------------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
X=100
Y=12
W=190
H=18
Text=Temps

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

;-----------------------------------------------
;      V VARIABLE STYLE V 
;-----------------------------------------------

;-----Core Temp -----

[meterLabelCore1Temp]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=Core Temp

[meterValueCore1Temp]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureCore1Temp
X=200
Y=0r
W=190
H=14
Text=%1°C

[meterBarCore1Temp]
Meter=Bar
MeterStyle=styleBar
MeasureName=MeasureCore1Temp
X=10
Y=52
W=190
H=1

;----- CPU Speed -----

[MeasureLabelCpuSpeed]
Meter=String
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=CPU Speed

[MeasureValueCpuSpeed]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureCpuSpeed
X=200
Y=0r
W=190
H=14
Text="%1 MHz"

[MeasureBarCpuSpeed]
Meter=Bar
MeterStyle=styleBar
MeasureName=MeasureCpuSpeed
X=10
Y=72
W=190
H=1

;----- Max CPU Temp -----

[MeasureValueMaxTemp]
Meter=String
MeterStyle=styleLeftText
X=10
Y=80
W=190
H=14
Text=Max Temp

[MeasureLabelMaxTemp]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureMaxTemp
X=200
Y=0r
W=190
H=14
Text="%1°C"

[MeasureBarMaxTemp]
Meter=Bar
MeterStyle=styleBar
MeasureName=MeasureMaxTemp
X=10
Y=92
W=190
H=1

;--------------------------------------
;        V   Functionality   V
;--------------------------------------

;----- Measures -----

[MeasureMaxTemp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=MaxTemperature

[MeasureCore1Temp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=0

[MeasureCpuSpeed]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=CpuSpeed


;----- Meters -----

[MeterMaxTemp]
Meter=String
MeasureName=MeasureMaxTemp
MeterStyle=styleLeftText
X=10
Y=80
W=190
H=14
Text=Max Temp

[MeterCore1Temp]
Meter=String
MeasureName=MeasureCore1Temp
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=Core Temp

[MeterCpuSpeed]
Meter=String
MeasureName=MeasureCpuSpeed
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=CPU Speed
Last edited by Brian on October 11th, 2015, 2:12 am, edited 6 times in total.
Reason: Added [code] tags.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Temp Reading Goof Up

Post by jsmorley »

I think you might be misunderstanding what that MaxTemperature option is about.

It is the current highest temperature across all cores. So it will in effect return the highest "current" temperature for the core that is the hottest at that moment.

It's not any kind of historical "maximum". Those "max" and "min" fields in the app are currently not supported by the plugin.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Temp Reading Goof Up

Post by jsmorley »

There is a way to keep track of the "minimum" and "maximum" values that the temperature has had since the skin was loaded:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,255
OnCloseAction=[!WriteKeyValue Variables MinTemp "[MeasureMinTemp]"][!WriteKeyValue Variables MaxTemp "[MeasureMaxTemp]"]

[Variables]
MinTemp=100
MaxTemp=0

[MeasureCurrentTemp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=MaxTemperature

[MeasureMinTemp]
Measure=Calc
Formula=(MeasureCurrentTemp < #MinTemp# ? MeasureCurrentTemp : #MinTemp#)
OnUpdateAction=[!SetVariable MinTemp "[MeasureMinTemp]"]
DynamicVariables=1

[MeasureMaxTemp]
Measure=Calc
Formula=(MeasureCurrentTemp > #MaxTemp# ? MeasureCurrentTemp : #MaxTemp#)
OnUpdateAction=[!SetVariable MaxTemp "[MeasureMaxTemp]"]
DynamicVariables=1

[MeterCPU]
Meter=String
X=17
Y=8
FontSize=40
FontColor=21,55,66,255
StringStyle=Bold
AntiAlias=1
Text=CPU

[MeterCurrentTemp]
Meter=String
MeasureName=MeasureCurrentTemp
X=0
Y=0
FontColor=255,255,255,255
SolidColor=0,0,0,1
Padding=5,5,5,5
AntiAlias=1
Text=Current:		%1°C

[MeterMinTemp]
Meter=String
MeasureName=MeasureMinTemp
X=0
Y=0R
FontColor=255,255,255,255
SolidColor=0,0,0,1
Padding=5,5,5,5
AntiAlias=1
Text=Minimum:	%1°C

[MeterMaxTemp]
Meter=String
MeasureName=MeasureMaxTemp
X=0
Y=0R
FontColor=255,255,255,255
SolidColor=0,0,0,1
Padding=5,5,5,5
AntiAlias=1
Text=Maximum:	%1°C
1.jpg
This will be "persistent" in the sense that the current values will be written to the file when the skin is unloaded. So the values will persist when your computer is restarted, or Rainmeter is restarted, or if you unload / load the skin.

If you really want / need to "reset" things, just change these back to these values:

MinTemp=100
MaxTemp=0
You do not have the required permissions to view the files attached to this post.
Klusterfuk
Posts: 2
Joined: October 10th, 2015, 3:26 pm

Re: Temp Reading Goof Up

Post by Klusterfuk »

To Jsmorley

Alright, so please help me, how would I integrate this into my code? I was trying to figure it out, but I don't see how without completely rebuilding the code, which I do not have time to do.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Temp Reading Goof Up

Post by jsmorley »

Klusterfuk wrote:To Jsmorley

Alright, so please help me, how would I integrate this into my code? I was trying to figure it out, but I don't see how without completely rebuilding the code, which I do not have time to do.
Yeah, me either. It's baseball playoffs season.