Independent Sequential Battery Indicator Transparency

Hi! Wow, this place has gotten a lot of facelifts since I was here last; which means the answer to my post is probably somewhere in the forums, if the most accurate response to my query is just a link to said post, I’m cool with that.

I’m making my own version of the Goldeneye Omega (yeah, another one) because the one that I have is good, but there are some things about it that I don’t like. So here’s the thing I’m working on. For the battery indicators on the sides, I’ve got 'em in different pieces, but I’d like them to each be independent of each other (which I’ve taken care of in Photoshop already), but don’t know how to make the battery charge range link to the transparency of that section.

For example:
Battery life of 50% - All indicators from 100% to 50% have already faded from 100% opacity to 100% transparency (they’re completely transparent, you can’t see them), and the indicators for 0% to 50% are all at 0% transparency, so you can see them fully. But the indicator for battery life of 50% to 40% has 100% opacity at 50% battery life, 90% at 49%, 80% at 48%, etc.

I know opacity is $_______?100:0$
Is it really as simple as $#BLP#>=40&&#BLN#<=50?100:0$ ?

I’m really hoping that’s what it is, or it’s something similarly easy, and that I don’t have to write code for EVERY percentage.

Thanks guys!

I am not realy sure what you are after ( perhaps I’m just tired :slight_smile: ). Can you post a draft version of you watch so we can see what you are trying to do?

In terms of the single formula, is this what you are after?

$#BLP#>=40&&#BLN#<=50?(#BLP#-40)*10:0$

.

1 Like

That might be it, it might not, I’ll have to look at it later. I’m trying to do the code and the design at the same time so that when one is finished, the other is too and I can just mash it all together and deploy it.

This is what the power bars on the sides will look like. The reason I used the 50-40% section is because it’s an easier calculation and I once I get that right, I can use it on the 100-50% sections (50/3=16 2/3 or something). The idea is that as the battery percentage fades from 100% to 0% for THAT SECTION, so does the opacity of that piece. There’s one side for the watch, the other is for the phone. So when the battery is at 50%, the first 3 sections will be 0% opacity, and the bottom 5 sections will all be at 100%. When the battery is at 49%, the bottom 4 sections will still be 100%, but that 5th section will be at 90%.

Is that a better explanation? I know the picture will help.

Ok, I think I understand…

There maybe a more elegant solution but I believe the following may work:

    Layers                                 Transparency

90 to 100 … ($#BLP#>=90&&#BLN#<=100?(#BLP#-90)*10:0$)

10 to 20 … ($#BLP#>=10&&#BLN#<=20?(#BLP#-10)*10:0$)

0 to 10 … ($#BLP#>0&&#BLN#<=10?#BLP#*10:0$)

background dial … 100
( to be displayed when above layers become invisible )

I hope that helps :slight_smile:

Thanks, Mike!

As soon as I get a chance to fiddle with it all, I’ll try those formulas and let you know how well it all works.

1 Like

So, let’s not say I forgot about this, or got distracted. Let’s say my Fossil that I was working on this for was determined to be defective because the waterproof seal kept dissolving from the pH level of my sweat, and they refunded my money leading me to have a stupid watch between then and now. Anyway, I plugged the 100-90% formula into the Facer creator and it didn’t have a variable opacity. I modified the code slightly, but when previewing it, it went from 83% opacity at 100% battery, to 1500% opacity at 98 (picked a random quantity), back to 83% at 83% battery, and then 1500% from 82 to 1% and 0% at 0% battery.

Endgame goal: Each of the first 3 segments (50/3 because they’re each 1/3 of 50% battery) having a decreasing opacity from 100% to 0% for their respective battery ranges (100-83, 82-66, and 65-50). So each percent of battery life is 100/17, 100/16, and 100/15. I know the math, I just can’t translate that to formulae.

Welcome back.
Sorry, I am still not sure what are you trying to do
Should the top segment from fully lit at 83% turn off when the battery drops to 82%, or should it gradually darken as the battery starts loosing charge from 100%?

Trying to get the top segment to be 100% visible at 100% charge and 0% visible when the battery is 83%.

try to don’t go till 0%but to 1% so you don’t encounter the 0 bug of facer

Figured it out with the help of a friend. The equation I was looking for is:

($#BLN#>=83&&#BLN#<=100?(#BLN#-83)*(100/17):0$)

1 Like