cancel
Showing results for 
Search instead for 
Did you mean: 

TEXT PROGRESS Negative Values

Ofaro.1
Associate II

Hi,

I'm trying to display the temperature values ranging from -40 to +40 on TEXT PROGRESS in TouchGFX designer. Unfortunately, the values range only starts from 0.

Can anyone help me with this? I'll be very grateful.

1 ACCEPTED SOLUTION

Accepted Solutions
Romain DIELEMAN
ST Employee

Hi,

You cannot directly work with negative values with a Text Progress widget. What I suggest to do is create your own Text progress by using a Box Progress widget instead and adding text over it with a textArea widget. That way you can display whatever text you need. For the box progress widget, if you need to go from -40 to 40degrees, then I would set the minimal value to 0 and the maximum value to 81 (-40 to 40 but dont forget the 0 degree value).

/Romain

View solution in original post

7 REPLIES 7
Romain DIELEMAN
ST Employee

Hi,

You cannot directly work with negative values with a Text Progress widget. What I suggest to do is create your own Text progress by using a Box Progress widget instead and adding text over it with a textArea widget. That way you can display whatever text you need. For the box progress widget, if you need to go from -40 to 40degrees, then I would set the minimal value to 0 and the maximum value to 81 (-40 to 40 but dont forget the 0 degree value).

/Romain

Hi Romain,

Thanks for your kind guidance. This is a great suggestion but I want to make one thing more clearer that how come the TextArea widget will update the text i.e. when the temperature will change for e.g. 15 C to 18 C ?

I also understand that the box Progress widget will update according to the values but I want to display temperature values if this makes sense.

I will be very grateful for your feedback.

Hi,

You need to update the text Area yourself through code to change the value when relevant. I'll attach a project of what I had in mind.

/Romain

Hi Romain,

Really appreciate that I have managed to display the required values.

Thanks

Hi Romain,

One more question regarding TouchGFX, when I import an image in touch gfx, it generates the correctly but in STM32 IDE, this error comes "undefined reference to `image_icon_hourglass' ".

TouchGFX is generating the code fine.

Your kind comments will be very helpful.

Hi,

Where is this error faced ? Can you run on target from TouchGFX or do you just generate code from it ?

What you could try to do within STM32CubeIDE is to clean and re build. Try to delete the generated folder in the tree view of your project in CubeIDE.

/Romain

Hi Romain,

Really appreciate your response.

It's been fixed, just needed to enable the automatically generate makefiles.

Thanks