It is currently May 2nd, 2024, 4:29 pm

Line meter not going below 0

Get help with creating, editing & fixing problems with skins
Kyremi
Posts: 41
Joined: September 22nd, 2011, 1:03 pm

Line meter not going below 0

Post by Kyremi »

Hi all,

I have a Line meter that's part of a weather tracking skin I made, and with the onset of actual cold temperatures, I've started to see negative numbers come into play. However, it seems the Line meter isn't designed with these in mind, since any value of 0 or below gets put into the same flat line.
Here's the code;

Code: Select all

[MeterActualTempLine]
Meter=Line
LineCount=3
MeasureName=MeasureLowTemp
MeasureName2=MeasureHighTemp
MeasureName3=MeasureActualTemp
MaxValue=30
MinValue=-10
LineColor2=#Colour6#
LineColor=#Colour7#
X=110
Y=50
W=150
H=50
AntiAlias=1
Trying to use Min/Max value hasn't worked out for me either. Is there any way to get the Line meter to display negative values?
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Line meter not going below 0

Post by smurfier »

MinValue and MaxValue need to be set on the measure that provides the value to the meter.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
Kyremi
Posts: 41
Joined: September 22nd, 2011, 1:03 pm

Re: Line meter not going below 0

Post by Kyremi »

I tried this...

Code: Select all

[MeasureActualTemp]
Measure=Plugin
MaxValue=30
MinValue=-10
Plugin=Plugins\WebParser.dll
Url=[MainMeasure]
StringIndex=1
Unfortunately, it still doesn't work, as far as I can tell, the Line meter still has an 'absolute 0' line under which it doesn't venture.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Line meter not going below 0

Post by smurfier »

Since [MeasureActualTemp] is returning a string, let's try passing it through a calc measure.

Code: Select all

[MeasureActualTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MainMeasure]
StringIndex=1

[ActualTempPassthrough]
Measure=Calc
Formula=[MeasureActualTemp]
DynamicVariables=1
MaxValue=30
MinValue=-10

[MeterActualTempLine]
Meter=Line
LineCount=3
MeasureName=MeasureLowTemp
MeasureName2=MeasureHighTemp
MeasureName3=ActualTempPassthrough
LineColor2=#Colour6#
LineColor=#Colour7#
X=110
Y=50
W=150
H=50
AntiAlias=1
Edit: After discussion here is another method if necessary.

Code: Select all

[MeasureActualTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MainMeasure]
StringIndex=1

[ActualTempPassthrough]
Measure=Calc
Formula=([MeasureActualTemp]+10)/40
DynamicVariables=1

[MeterActualTempLine]
Meter=Line
LineCount=3
MeasureName=MeasureLowTemp
MeasureName2=MeasureHighTemp
MeasureName3=ActualTempPassthrough
LineColor2=#Colour6#
LineColor=#Colour7#
X=110
Y=50
W=150
H=50
AntiAlias=1
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
Kyremi
Posts: 41
Joined: September 22nd, 2011, 1:03 pm

Re: Line meter not going below 0

Post by Kyremi »

That works, but now my Line meter doesn't have the same range it used to have (in terms of how much it went up or down)... I assume I can just reduce the dividing number to improve this?
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Line meter not going below 0

Post by smurfier »

That would be the same as reducing the MaxValue. Here is a more generic formula:

([MeasureActualTemp]-(#MinValue#))/(#MaxValue#-(#MinValue#))

Yes, the parenthesis are there for a reason. Also, this assumes that MaxValue is positive.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Line meter not going below 0

Post by dragonmage »

The range should still be the same. You wanted a a range of 40 but you wanted indication of values below 0. Zero should now be at around 25% of the meter size, so values below that would show less than 25% of the meter. A screen shot of what you are trying to accomplish might help us help you.
Kyremi
Posts: 41
Joined: September 22nd, 2011, 1:03 pm

Re: Line meter not going below 0

Post by Kyremi »

dragonmage wrote:The range should still be the same. You wanted a a range of 40 but you wanted indication of values below 0. Zero should now be at around 25% of the meter size, so values below that would show less than 25% of the meter. A screen shot of what you are trying to accomplish might help us help you.
Ah yeah, I get the idea... but thing is, at no point will I ever need the full range of temperatures between -10° and 30° (since the weather here isn't ever that wild). Before winter came, the Line meter worked fine since it had automatic scaling so it used the most of its height to display whatever temperature variations occured; just now that the values go below 0 it's presented a problem. Ideally what I want is the same behaviour it had before it had to consider negative values, but with negative values.
Tabakas4492
Posts: 1
Joined: January 26th, 2012, 9:20 pm

Re: Line meter not going below 0

Post by Tabakas4492 »

im new to the forum and idk where to post this

i fixed a skin i had to read core temp cus the files was wrong. stopped the error messege to show up but the temp never shows a temp

changed it to Fahrenheit but other then that i have no idea what to do to make it read the temp

heres the code

;tech skin

Code: Select all

[Rainmeter]
Author = jing
Background=background.png

;Metadata added by RainBrowser
;http://rainmeter.net/RainWiki/index.php?title=Rainmeter_101#.5BMetadata.5D

[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=

;End of added Metadata

[Variables]
Font=imagine font
White=255,255,255,180
Black=0,0,0,255


::::::::::::::::::::::::::::::
MEASURES
::::::::::::::::::::::::::::::

[MeasureCPU]
Measure=CPU

[MeasureMem]
Measure=PhysicalMemory

[MeasurePhysMemTotal]
Measure=PhysicalMemory
Total=1

[MeasureMemfree]
Measure=PhysicalMemory
InvertMeasure=1

[MeasureCircle]
Measure=Calc
Formula=10

[MeasureCPU1]
Measure=Plugin
Plugin=Plugins\CoreTemp.dll
CPUId=1

[CalcCPUTemper]
Measure=Calc
Formula=MeasureCPU1/70

;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

[MeterCPU]
Meter=STRING
MeasureName=MeasureCPU
X=94
Y=52
FontColor=#White#
FontSize=11
StringAlign=Right
FontFace=kroeger 05_55 caps
Prefix=""
Postfix="%"
AntiAlias=1

[MeterAnalogCPU]
Meter=ROUNDLINE
MeasureName=MeasureCPU
X=141
Y=98
LineLength=38
LineStart=28
StartAngle=3.14
RotationAngle=1.57
AntiAlias=1
LineColor=#White#
Solid=1

[MeterCircle]
Meter=ROUNDLINE
MeasureName=MeasureCircle
X=141
Y=98
LineLength=38
LineStart=28
StartAngle=3.14
RotationAngle=1.57
AntiAlias=1
LineColor=255, 255,255, 50
Solid=1

[MeterRAM]
Meter=STRING
MeasureName=MeasureMem
X=50
Y=80
Percentual=1
FontColor=#White#
FontSize=11
StringAlign=Right
FontFace=kroeger 05_55 caps
Prefix=""
Postfix="%"
AntiAlias=1

[MeterAnalogRAM]
Meter=ROUNDLINE
MeasureName=MeasureMem
X=9
Y=23
LineLength=16
LineStart=11
StartAngle=4.71
RotationAngle=3.14
AntiAlias=1
LineColor=#White#
Solid=1

[MeterCircle1]
Meter=ROUNDLINE
MeasureName=MeasureCircle
X=9
Y=23
LineLength=16
LineStart=11
StartAngle=4.71
RotationAngle=3.14
AntiAlias=1
LineColor=255, 255,255, 50
Solid=1

[CPUTemper]
Meter=STRING
MeasureName=MeasureCPU1
X=145
Y=100
StringAlign=Right
FontColor=#White#
FontSize=6
FontFace=kroeger 05_55 caps
AntiAlias=1
PostFix="°F"

[MeterTemp]
Meter=STRING
X=9
Y=102
StringAlign=Left
FontColor=#White#
FontSize=6
FontFace=kroeger 05_55 caps
AntiAlias=1
Prefix="CPU Temperature:"

[MeterAnalogTemper]
Meter=ROUNDLINE
MeasureName=CalcCPUTemper
X=141
Y=98
LineLength=25
LineStart=20
StartAngle=3.14
RotationAngle=1.57
AntiAlias=1
LineColor=#White#
Solid=1

[MeterCircle2]
Meter=ROUNDLINE
MeasureName=MeasureCircle
X=141
Y=98
LineLength=25
LineStart=20
StartAngle=3.14
RotationAngle=1.57
AntiAlias=1
LineColor=255, 255,255, 50
Solid=1

please help me