Battery level indicator rotational help

Trying to figure out the proper expression/tag/conditional to be used for a rotational hand for watch battery level indication on a sub dial. Hand needs to rotate full 360 degrees ccw. Help would be greatly appreciated.

Looks like you would just need to add an image with a rotational aspect:
% for Phone - $#PBP#*360$
% for Watch - $#BLP#*360$

I’m just not sure what direction it starts with or what the default direction is. Easy enough to change by adding in a ‘-’ sign. And while you probably wouldn’t ever hit 0%, you might want to separate your 100% and 0% directions by 10 degrees to make it easier to tell the difference.

Nope, doesn’t work. Thanks.

It’s simple math: #BLN# uses percent values from 0 to 100. You want to show it with 0 to 360 degrees. So you just have to multiply it with 3.6:
(#BLN#*3.6)

:smile:

Oh, that makes sense. Mine is multiplying 99*360 which would give way to large of a number.

Yep, That’s what I found out, maybe from you even on facebook lol. I am so used to wm and lua I was over complicating everything. Even the angles are different values. That string for 360 degree is a single tag of {br} in wm. Then in wm you need to add much more to set rotation angles on them. This turns out to be pretty easy lol. So for one I had last night that began at 60 degrees and went CCW to 120 degrees, it was a matter of just adding the starting angle (+60) and, then -100 and changing 3.6 to 3 for only 300 degrees. (+60(#BLN#-100)*3)

So, would this give me a 360 degree analog battery dial starting with the dial pointing straight down?

(+0(#BLN#-100)*3.6)

Somebody, please?

Use [TOMAJA Tutorial] Animated Battery Power Level Icon Indicator - Simple Basic Linear and Rotating Effects with Objects and Hand Dials
That helped me with all my battery questions when I first started.

1 Like

Check these out…

clockwise, starting at 12 (up):

$#BLN#>1?(3.58*#BLN#):1.5$
clockwise, starting at 6 (down):

$#BLN#>1?(3.58*#BLN#+180):(1.5+180)$
counter-clockwise, starting at 12 (up):

$#BLN#>1?(-3.58*#BLN#):-1.5$
counter-clockwise, starting at 6 (down):

$#BLN#>1?(-3.58*#BLN#+180):(-1.5+180)$
Note: -180 is the exactly the same as +180

Thanks, Andrew Dowden!

Rotation (dials)

Modified to slightly different numbers …

Left: (counter-clockwise)

$#BLN#>2?(ceil(#BLN#*3.55)):2$

Right: (clockwise)

$#BLN#>2?-(ceil(#BLN#*3.55)):-2$

Battery (icon)

size: 256 x 256



Update: Disabled any ‘charging’ logic …

1 Like