It is currently March 28th, 2024, 1:57 pm

Can't make a GPU Tach

Get help with creating, editing & fixing problems with skins
Post Reply
DC_PLAYER
Posts: 24
Joined: March 26th, 2011, 4:52 pm

Can't make a GPU Tach

Post by DC_PLAYER »

I edited a wifi skin recently and i replaced the images and the formula to try and replicate some current AMD cards where they have a visual indicator on the card itself regarding activity, i used this for my core 2 duo pc, so 1 tach for each core.

http://techreport.com/r.x/radeon-r9-fury-x/switch-leds.jpg

It is working fine as a rainmeter skin and i can even provide the config i used incase anyone wan't to do anything with it.~
(note that i'm not including the images 0 to 15 here)

Code: Select all

[Rainmeter]
Author=Kireek
Update=50

[mPercent]
Measure=CPU
Processor=1
Substitute=" ":""

[mIconCalc]
Measure=CALC
Formula=((100 >= mPercent) && (99 <= mPercent) ? 15 : ((98 > mPercent) && (92 <= mPercent) ? 14 : ((91 >= mPercent) && (85 <= mPercent) ? 13 : ((84 >= mPercent) && (78 <= mPercent) ? 12 : ((77 >= mPercent) && (71 <= mPercent) ? 11 : ((70 >= mPercent) && (64 <= mPercent) ? 10 : ((63 >= mPercent) && (57 <= mPercent) ? 9 : ((56 >= mPercent) && (50 <= mPercent) ? 8 : ((49 >= mPercent) && (43 <= mPercent) ? 7 : ((42 >= mPercent) && (36 <= mPercent) ? 6 : ((35 >= mPercent) && (29 <= mPercent) ? 5 : ((28 >= mPercent) && (22 <= mPercent) ? 4 : ((21 >= mPercent) && (15 <= mPercent) ? 3 : ((14 >= mPercent) && (8 <= mPercent) ? 2 : ((7 >= mPercent) && (1 <= mPercent) ? 1 : 0)))))))))))))))

[Icon]
Meter=IMAGE
MeasureName=mIconCalc
MeasureName2=mPercent
Path="#CURRENTPATH#"
ImageName=%1.png
X=0
Y=0
PreserveAspectRatio=1
AntiAlias=1
Now, i wanted to do the exact same thing for the gpu.
I use a modified skin that is fragmented into many skins, enabling me to move individual components (like activity, temp or frequencies), they all come from the base config, i just edit ou the things i don't need.

So, let's see the original skin and the files it uses

Config.ini

Code: Select all

[Variables]
;Use here the AdapterID from the CCC (Rightclick) to get values from first or second Card
Adapter=1

MinActivity = 0
MaxActivity = 100
Measures.ini

Code: Select all

[Activity]
Measure=Plugin
Plugin=ATIPlugin.dll
MeasureID=Activity
AdapterID=#Adapter#

[calcActivity]
Measure=Calc
Formula=[Activity]
MinValue=#MinActivity#
MaxValue=#MaxActivity#
DynamicVariables=1
Meters.ini

Code: Select all

[meterLabelActivity]
Meter=STRING
MeterStyle=styleLeftText
X=#posXL#
Y=#posY5#
W=140
H=50
Text="GPU"

[meterValueActivity]
Meter=STRING
MeterStyle=styleRightText
MeasureName=Activity
X=#posXR#
Y=0r
W=140
H=50
Text="%1 %"
gpu1.ini

Code: Select all

[Rainmeter]
Author=Oliver Kühn
AppVersion=2.1
Update=1000
TransitionUpdate=1000
Blur=1
BlurRegion=2,#blurLeft#,#blurTop#,#blurRight#,#blurBottom#,#blurRound#
BlurRegion2=2,#blur25Left#,#blur25Top#,#blur25Right#,#blur25Bottom#,#blurRound2#
@include1="#CURRENTPATH#\Measures.inc"
@include2="#CURRENTPATH#\Meters.inc"
@include3="#CURRENTPATH#\Config.inc"

[Metadata]
Name=ATIPlugin
Description=Plugin to get and set many Values for ATI Graphics-Cards (Need Catalyst 10.3 or above)
Version=0.50 BETA

[Variables]
fontName=korataki
textSize=12
colorText=165,246,255,200
colorText2=165,246,255,200
colorTitle=10,190,142,255

posXL=15
posXR=160
posY1=50
posYB1=67
posY2=75
posYB2=92
posY3=100
posYB3=117
posY4=125
posYB4=142
posY5=150
posYB5=167
posY6=175
posYB6=192
posY7=200
posYB7=217
posY8=225
posYB8=242
posY9=250
posYB9=267
posY10=275
posYB10=292
posY11=300
posYB11=317
posY12=325
posYB12=342
posY13=350
posYB13=367
posY14=375
posYB14=392
posY15=400
posYB15=417
posY16=425
posYB16=442
posY17=450
posYB17=467
posY18=475
posYB18=492
posY19=500
posYB19=517
posY20=525
posYB20=542

blurRound=10
blurRound2=5
blurLeft=5
blurTop=5
blurRight=305
blurBottom=60
blur25Left=5
blur25Top=45
blur25Right=305
blur25Bottom=680

colorBar=250,120,100,255





[styleTitle]
StringAlign=CENTER
StringCase=NONE
StringStyle=BOLD
StringEffect=NONE
FontColor=#colorTitle#
FontFace=#fontName#
FontSize=18
AntiAlias=1
ClipString=1

[styleCenterText]
StringAlign=CENTER
StringCase=NONE
StringStyle=BOLD
StringEffect=NONE
FontColor=#colorText#
FontFace=#fontName#
FontSize=34
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=LEFT
StringCase=NONE
StringStyle=BOLD
StringEffect=NONE
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=RIGHT
StringCase=NONE
StringStyle=BOLD
StringEffect=NONE
FontColor=#colorText2#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1
Now most of it is just text placement, the size and whatnot.
My goal is to make a gpu tach by reading the activity of the gpu, for some reason it always displays image 0.png as if no activity is registered, what am i missing?

This is my gpu1.ini, i do not call the other ini files since i don't think i need them.

Code: Select all

[Rainmeter]
Author=kireek
AppVersion=2.1
Update=50

[Metadata]
Name=ATIPlugin
Description=Plugin to get and set many Values for ATI Graphics-Cards (Need Catalyst 10.3 or above)
Version=0.50 BETA


[mPercent]
Measure=Plugin
Plugin=ATIPlugin.dll
MeasureID=mPercent
AdapterID=1
Substitute=" ":""

[mIconCalc]
Measure=CALC
Formula=((100 >= mPercent) && (99 <= mPercent) ? 15 : ((98 > mPercent) && (92 <= mPercent) ? 14 : ((91 >= mPercent) && (85 <= mPercent) ? 13 : ((84 >= mPercent) && (78 <= mPercent) ? 12 : ((77 >= mPercent) && (71 <= mPercent) ? 11 : ((70 >= mPercent) && (64 <= mPercent) ? 10 : ((63 >= mPercent) && (57 <= mPercent) ? 9 : ((56 >= mPercent) && (50 <= mPercent) ? 8 : ((49 >= mPercent) && (43 <= mPercent) ? 7 : ((42 >= mPercent) && (36 <= mPercent) ? 6 : ((35 >= mPercent) && (29 <= mPercent) ? 5 : ((28 >= mPercent) && (22 <= mPercent) ? 4 : ((21 >= mPercent) && (15 <= mPercent) ? 3 : ((14 >= mPercent) && (8 <= mPercent) ? 2 : ((7 >= mPercent) && (1 <= mPercent) ? 1 : 0)))))))))))))))
MinValue=0
MaxValue=100
DynamicVariables=1

[Icon]
Meter=IMAGE
MeasureName=mIconCalc
MeasureName2=mPercent
Path="#CURRENTPATH#"
ImageName=%1.png
X=0
Y=0
PreserveAspectRatio=1
AntiAlias=1
DC_PLAYER
Posts: 24
Joined: March 26th, 2011, 4:52 pm

Re: Can't make a GPU Tach

Post by DC_PLAYER »

Anyone? would really like to do a GPU Tach
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Can't make a GPU Tach

Post by mak_kawa »

I am really not sure about your complex conditional expression. And I don't know why your code doesn't work. Sorry. But let me say that the conditional expression could be written more simply? For example, Formula=ceil(mPercent/7)

Sample code like as;

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=64,64,64,192

[mPercent]
;Measure=Loop
;StartValue=0
;EndValue=100
;Increment=1
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=100

[mIconCalc]
Measure=Calc
Formula=ceil(mPercent/7)

[PercentValue]
Meter=String
MeasureName=mPercent
SolidColor=128,128,128,192
Text=%1 %
X=5
Y=5
W=50
H=20

[Icon]
Meter=String
MeasureName=mIconCalc
SolidColor=128,128,128,192
Text=%1.png
X=5
Y=30
W=50
H=20
Hope this code helps.
DC_PLAYER
Posts: 24
Joined: March 26th, 2011, 4:52 pm

Re: Can't make a GPU Tach

Post by DC_PLAYER »

Well, i tried, you display a random % and then you make an image assign to it, it does work.

When i change that random % to a value that i actually get

Code: Select all

Measure=Plugin
Plugin=ATIPlugin.dll
MeasureID=Activity
AdapterID=#Adapter#
Substitute=" ":""
MinValue=#MinActivity#
MaxValue=#MaxActivity#
DynamicVariables=1
It seems the % of the GPU is being read, but the image calculated is always 0.png and doesn't move from there

How come the calculated image is always the same?
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Can't make a GPU Tach

Post by mak_kawa »

How are the actual values obtained by the measure?
DC_PLAYER
Posts: 24
Joined: March 26th, 2011, 4:52 pm

Re: Can't make a GPU Tach

Post by DC_PLAYER »

In the way i specified in the code section, via plugin
DC_PLAYER
Posts: 24
Joined: March 26th, 2011, 4:52 pm

Re: Can't make a GPU Tach

Post by DC_PLAYER »

Don't know if it matters or not, but maybe the value that i'm outputting with the plugin has a number and a %, like

80%

How do i retrieve just 80? maybe it's the "%" that's messing everything
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Can't make a GPU Tach

Post by mak_kawa »

Try to change Substitute line as Substitute=" ":"", "%":"".
Post Reply