Hello all,
I'm writing a System Monitor and I'm stuck. I want to display the current temperature and then next to it have the max temperature the processor has hit. what would be the best way to go about this? I've thought about IfAbove lines, but then it won't continue to register the max once the current one is exceeded. The second problem I ran into while doing it this was is that I couldn't figure out what variable the current temperature is saved as. It can be outputted with the %1, but what would go in the blank/does this even work:
IfAboveAction=(HighTemp=________)
Any help is appreciated, and if you need more information just ask! thanks
It is currently April 28th, 2024, 6:48 am
Recording a Max Temp
-
- Posts: 5
- Joined: June 1st, 2011, 8:35 pm
-
- Developer
- Posts: 2872
- Joined: April 17th, 2009, 12:18 pm
Re: Recording a Max Temp
Something like this, perhaps:
The Formula line in pseudo code: If mCurTemp is higher than mMaxTemp return mCurTemp as the value of the measure (i.e. mMaxTemp). Otherwise, return mMaxTemp.
Code: Select all
[mCurTemp]
; add code to return current temp here
[mMaxTemp]
Measure=Calc
Formula=(mCurTemp > mMaxTemp) ? mCurTemp : mMaxTemp
-
- Posts: 5
- Joined: June 1st, 2011, 8:35 pm
Re: Recording a Max Temp
This makes sense, but when I put it in my skin i got an error saying MeterDisplayMaxTemp couldn't be bound with MeasureMaxTemp. This is what i got goin so far:poiru wrote:Something like this, perhaps:The Formula line in pseudo code: If mCurTemp is higher than mMaxTemp return mCurTemp as the value of the measure (i.e. mMaxTemp). Otherwise, return mMaxTemp.Code: Select all
[mCurTemp] ; add code to return current temp here [mMaxTemp] Measure=Calc Formula=(mCurTemp > mMaxTemp) ? mCurTemp : mMaxTemp
Code: Select all
[MeasureAvgTemp]
Measure=Plugin
Plugin=Plugins\CoreTemp.dll
CoreTempType=Temperature
CoreTempIndex=0
[MeasureMaxTemp]
Meaure=Calc
Formula=(MeasureAvgTemp>MeasureMaxTemp)? MeasureAvgTemp : MeasureMaxTemp
[MeterDisplayTemp]
Meter=String
MeasureName=MeasureAvgTemp
X=5
Y=3R
W=150
H=17
FontColor=#Color2#
StringStyle=BOLD
Text="Temp: %1°C"
AntiAlias=1
[MeterDisplayMaxTempText]
Meter=String
X=90
Y=-17R
W=40
H=17
FontColor=#Color2#
StringStyle=BOLD
Text="Max: "
AntiAlias=1
[MeterDisplayMaxTemp]
Meter=String
MeasureName=MeasureMaxTemp
X=33r
Y=-17R
W=20
H=17
FontColor=#Color2#
StringStyle=BOLD
;IfAboveValue=#HighestTemp#
;IfAboveAction=HighestTemp=%1
PostFix="°C"
AntiAlias=1
-
- Developer
- Posts: 2872
- Joined: April 17th, 2009, 12:18 pm
Re: Recording a Max Temp
It's Measure=Calc, not Meaure=Calc
This works fine here (cleaned up the code a bit, too):
FYI, IfActions can only be used in measures -- not meters. Also, what you tried to do with them is not possible. Read the manual for more info.
This works fine here (cleaned up the code a bit, too):
Code: Select all
[MeasureAvgTemp]
Measure=Plugin
Plugin=Plugins\CoreTemp.dll
CoreTempType=Temperature
CoreTempIndex=0
[MeasureMaxTemp]
Measure=Calc
Formula=(MeasureAvgTemp > MeasureMaxTemp) ? MeasureAvgTemp : MeasureMaxTemp
[MeterDisplayTemp]
Meter=String
MeasureName=MeasureAvgTemp
X=5
Y=3R
W=150
H=17
FontColor=#Color2#
StringStyle=BOLD
Text="Temp: %1°C"
AntiAlias=1
[MeterDisplayMaxTemp]
Meter=String
MeasureName=MeasureMaxTemp
X=90
Y=0r
W=40
H=17
FontColor=#Color2#
StringStyle=BOLD
Text="Max: %1°C"
AntiAlias=1
-
- Posts: 1175
- Joined: June 9th, 2010, 5:56 pm
- Location: Locks heath, UK
Re: Recording a Max Temp
I use Speedfan, this is a truncated version, you have some unnecessary measures I think:
Code: Select all
[MeasureTemp]
Measure=Plugin
Plugin=Plugins\speedfanplugin.dll
SpeedFanNumber=10
SpeedFanType=TEMPERATURE
[MeasureMaxTemp]
Measure=Calc
Formula=(MeasureTemp > MeasureMaxTemp) ? MeasureTemp : MeasureMaxTemp
[MeterDisplayTemp]
Meter=String
MeasureName=MeasureTemp
X=5
Y=3
Text="Temp: %1°C"
[MeterDisplayMaxTemp]
Meter=String
MeasureName=MeasureMaxTemp
X=90
Y=r
Text="Max: %1°C"
-
- Posts: 5
- Joined: June 1st, 2011, 8:35 pm
Re: Recording a Max Temp
ohh god, that's so dumb, should have proof-read better. Thanks for the help!poiru wrote:It's Measure=Calc, not Meaure=Calc