[Q] question - Battery Widget

Search This thread

Jarov

Member
Jul 3, 2008
16
0
Good day .
Ask pros - have battery widget that consists of two Rastova images. The first of which is the face , the second is an arrow charge level ( screenshot attached).
shot_001.jpg
Widget code , ie Additional features of the arrow bitmap vygdyadit so: [as]$(320/107*# BLEVN#)$[/ as]
[ar]0[/ ar]
[r]$(320/107*#BLEVN#)$[/ r].

I understand that 320 is the value in degrees, ie Dial size from 0 to 100 ( the charge ) . With the rest of the parameters is also understandable .

But I can not understand how to calculate the parameter 107. It is responsible for the correct display of the arrow charge level , and strictly tied to the scale of the dial , the display of the correct scale.

Question - I just wanted to do this:
shot_002.jpg
Scale battery is an arc , arc start taking if taken as 0 degrees axis Y, then 10 degrees , respectively ends , if you go to watch the X-axis of 80 degrees . That is, the total arc of 70 degrees is obtained . under the arc is a numeric value and a battery level . Willing to that for the digital value of 100 % was 80 degrees at 0 degrees of 10 % , respectively, and when the charge level value moves in an arc of from 80 degrees to 10 degrees.

Starting from the above example
[as]$(320/107*#BLEVN#)$[/ as]
[ar]0[/ ar]
[r]$(320/107*#BLEVN#)$[/ r]
then I should get the expression [as]$(70/???*#BLEVN#)$[/ as]

Considering that the scale ends at 80 degrees can be assumed that in a mathematical form , when the charge level is 100 % , the expression should look like equation
70 / X (unknown ) * 100 = 80 , then X conform is found to be 87.5 . It would seem that all figured out, but that's the trouble with the level of charge in the 100% value rises to 80 degrees , but at a value of 0% rises to 0 degrees instead of 10 degrees. and how to fix it , I do not know.

That's basically all for now , so I think , and forward who can tell that.

Sincerely, Anatoliy!
 
Last edited:

Jarov

Member
Jul 3, 2008
16
0
Good day .
Ask pros - have battery widget that consists of two Rastova images. The first of which is the face , the second is an arrow charge level ( screenshot attached).
View attachment 2697625
Widget code , ie Additional features of the arrow bitmap vygdyadit so: [as]$(320/107*# BLEVN#)$[/ as]
[ar]0[/ ar]
[r]$(320/107*#BLEVN#)$[/ r].

I understand that 320 is the value in degrees, ie Dial size from 0 to 100 ( the charge ) . With the rest of the parameters is also understandable .

But I can not understand how to calculate the parameter 107. It is responsible for the correct display of the arrow charge level , and strictly tied to the scale of the dial , the display of the correct scale.

Question - I just wanted to do this:
View attachment 2697626
Scale battery is an arc , arc start taking if taken as 0 degrees axis Y, then 10 degrees , respectively ends , if you go to watch the X-axis of 80 degrees . That is, the total arc of 70 degrees is obtained . under the arc is a numeric value and a battery level . Willing to that for the digital value of 100 % was 80 degrees at 0 degrees of 10 % , respectively, and when the charge level value moves in an arc of from 80 degrees to 10 degrees.

Starting from the above example
[as]$(320/107*#BLEVN#)$[/ as]
[ar]0[/ ar]
[r]$(320/107*#BLEVN#)$[/ r]
then I should get the expression [as]$(70/???*#BLEVN#)$[/ as]

Considering that the scale ends at 80 degrees can be assumed that in a mathematical form , when the charge level is 100 % , the expression should look like equation
70 / X (unknown ) * 100 = 80 , then X conform is found to be 87.5 . It would seem that all figured out, but that's the trouble with the level of charge in the 100% value rises to 80 degrees , but at a value of 0% rises to 0 degrees instead of 10 degrees. and how to fix it , I do not know.

That's basically all for now , so I think , and forward who can tell that.

Sincerely, Anatoliy!

Issue has been resolved, the topic is closed.
Sincerely, Anatoliy!
 

CopKiller76

Senior Member
Jan 16, 2014
150
82
Bornheim
Please write what you have done to fix your problem, so others with the same problem can fix too.

Sent from GT-I9505 via Tapatalk