cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX RPM Gauge help

Gen-Tune
Associate II

Hi I have a TouchGFX project and need some help.

The issue I am having is about scaling an image inside of TouchGFX to match RPM.

See image below

I am trying to properly scale this image to match the RPM. 0 to 9000 rpms is the range but I cannot get the progress bar to match it. Can you help with this? See attached TouchGFX Project

0693W00000Ho6m9QAB.png

4 REPLIES 4
Gen-Tune
Associate II

Anybody?

Any TouchGFX and STM32CubeIDE expert?

Willing to pay for help

Thanks

Alexandre RENOUX
Principal

Hello Gen-Tune,

I don't understand exactly what is your problem with the sentence below.

I am trying to properly scale this image to match the RPM. 0 to 9000 rpms is the range but I cannot get the progress bar to match it.

What do you mean you try to scale the image to match RPM ? You try to make it bigger ? Smaller ? Directly in code ? What is the link with the rpm range ?

From the picture, to me the needle matches the progress bar. Can you elaborate ?

/Alexandre

Gen-Tune
Associate II

Hi Alexandre,

I am having trouble trying to get the image to match the Set Value. For example if I set the value to 1000rpms it does not match the number on the image. I tried different methods and cannot get the image and set value to match

Thanks

Alexandre RENOUX
Principal

Hello Gen-Tune,

I think the reason why it does not match the value is due to the shape of your rpm scale.

The Gauge widget available in the Designer describes a circle when the needle move from min to max value. In others words, every point is equidistant to one another.

In your case, the needle needs to cover different distances depending on where you are on your rpm scale.

What could be done, in my opinion, is to figure out the mathematical equation that describes the curve of your rpm scale and then copy/paste the Gauge widget (Gauge.cpp/hpp) in your gui/ folder and modify the Gauge::setValue() function to make the needle move accordingly.

/Alexandre