It is currently May 7th, 2024, 4:18 am

Problem with MinValue and MaxValue

Get help with creating, editing & fixing problems with skins
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Problem with MinValue and MaxValue

Post by smurfier »

This would more closely emulate how MinValue and MaxValue actually work:

Code: Select all

[Variables]
MinValue=40
MaxValue=90

[measureCPUTemp]
Measure=Plugin
Plugin=CoreTemp.dll
CoreTempType=MaxTemperature

[MinMaxCPUTemp]
Measure=CALC
Formula=(measureCPUTemp-#MinValue#)/(#MaxValue#-#MinValue#)

[meterHistogramCPUTemp]
Meter=Histogram
MeterStyle=styleHistogram
MeasureName=MinMaxCPUTemp
X=11
Y=39
W=376
H=100
AutoScale=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 . . .
scavenger
Posts: 16
Joined: July 5th, 2011, 8:23 pm

Re: Problem with MinValue and MaxValue

Post by scavenger »

@Faradey: Thats not what I want, that would show the temperature as before, but only if it is in the given range... This doesnt scale the value.

@smurfier: Good idea! That works :)
But I set Percentual=1 instead of Autoscale=1 for the histogram, then its correct.
There is just one small problem:
The histogram always shows the previous value, not the current value.
For example, if the temperature is at 40° for some time, then goes to 50°, the value is directly shown in the value meter, but the histogram shows it one period later. You could call this a rainmeter bug I think... Or is this by design?

Thx for all your help!
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Problem with MinValue and MaxValue

Post by smurfier »

This is because it takes one update period for the calc measure to pull the value of the measure. What you can do is pass the value of measureCPUTemp through a calc measure and use that for your string meter so they would both be one update behind.
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 . . .
scavenger
Posts: 16
Joined: July 5th, 2011, 8:23 pm

Re: Problem with MinValue and MaxValue

Post by scavenger »

Yes, that would synchronize them. Better would be, if the calc measure wouldnt cause a delay. This would be possible, so the developers could take this as a suggestion ;)
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Problem with MinValue and MaxValue

Post by jsmorley »

scavenger wrote:Yes, that would synchronize them. Better would be, if the calc measure wouldnt cause a delay. This would be possible, so the developers could take this as a suggestion ;)
Actually, no, this would not be possible due to the nature of how Rainmeter works.
scavenger
Posts: 16
Joined: July 5th, 2011, 8:23 pm

Re: Problem with MinValue and MaxValue

Post by scavenger »

It would be possible. Of course, the way, how rainmeter works, would have to be changed.
The calculation of the measures could be done iterative, first the normal measures, in a second step the calc measures, to have the current values. You would also have to consider dependencies between calc measures, so there could be some thinking necessary...
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Problem with MinValue and MaxValue

Post by jsmorley »

scavenger wrote:It would be possible. Of course, the way, how rainmeter works, would have to be changed.
The calculation of the measures could be done iterative, first the normal measures, in a second step the calc measures, to have the current values. You would also have to consider dependencies between calc measures, so there could be some thinking necessary...
Well, point taken that is is a computer program, so just about anything is "possible", but there a lot that revolves around the processing flow of Rainmeter as is, and I would resist a "fix it" approach that would by its nature be a kludge and have the potential for all kinds of unintended consequences. If a complete re-design of Rainmeter ever happens, and that is not out of the realm of possibility either, this matter should be kept in mind for sure. As it is, I see it as the most minor of irritants, and not a serious problem.