Complex speedometer

Hi all,
I have a speedometer that goes from 0 to 80 (rather than 0 to 100). How could I make the dial stay at max (80) until battery reaches 80% and only then start decreasing? I’ve reviewed the speedometer tutorials here (How to make battery level appear as a gauge with needle?) and can’t seem to find the solution. This would be for a semi-circle gauge (not a full circle). Cheers!

2 Likes

In the fill or rotation field get the value for 80%. And create a conditional statement.

E.g. $#BLN#>=80?x:y$

X = value for 80
Y = (#BLN#/80)

6 Likes

I don’t think that would work - The value for x and y never change because it’s a rotation?

2 Likes

It is as Jason says. If the value is equal or greater than 80, stay put, otherwise rotate.

Screenshot 2024-01-06 at 07.52.33

So in this example the rotation for the battery is #BLN#*1.8, and since it start at -90° or 270° to keep it positive, the formula is (270+#BLN#*1.8)

So that means 80% is at 54°, which gives the formula for rotation:

$#BLN#>=80?54:(270+#BLN#*1.8)$

4 Likes

Good Topic . I think it can be done Simply with Clamp . There will be two similar solutions for Progress Bar or a Pointer . I can not chip in till I have done a test I can not do this stuff in my head . What Fun .
A friend of mine asked me to make a face from his E Van Dash . This has inspired me to have a go . Thank you .

5 Likes

Yes, clamp is also a solution, especially if you have 2 different scales as on this BMW speedometer:

From 0 to 100 is different to 100 to 180 (took me a bit to realise it … :slight_smile: .

I was thinking of using it for the heart rate (but the numbers are too small). The formula is:

$#ZHR#<=100?(232+clamp((#ZHR#*1.58),0,260)):(30+clamp(((#ZHR#-100)*1.15),0,102))$

3 Likes

Ohhh . Nice Dial Tom Thank you very much . I had a little play . I know we are not supposed to Slove all the Enquirys but I think this just goes some way .
.
.

4 Likes

It is easy, in place in the formula for rotation or fill ratio (which would normally work for 0-100), where you would put #BLN#, put clamp(#BLN#,0,80)

4 Likes

Thanks guys! Yes that did the trick, my bad :blush: The face I’m using this for is looking great so far, stay tuned! :blush:

1 Like

Hi everybody.

I am working on a project, based on those speedometers - and helping Christian with a similar request - and a beautiful & animated display of the steps. Hope it inspires and let me know what you think.

Ciao
Patrick

5 Likes

Looks great!

3 Likes

Meu grande amigo e professor ! ! !

3 Likes

I still worked on the concept. Wanted to add bifunctionality to the hour ticks and conditioning for the progress circles to display the first 5 seconds the steps cycling, and then the heart cycling. Each with a different color set and adapted information on the hour ticks and above in the center, displaying the running-up value for steps and then heart beats.
Above that the icon for watch battery and the icons for steps and heart.

Hope you like it?

3 Likes