This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

use of function GRAPH_SCALE_SetFactor of GUI_RTX

Hi,

I'm facing unexpected behaviour while trying to use function GRAPH_SCALE_SetFactor of GUI_RTX library in my project on Keil MCBSTM32F400 (KeilV4.60 pro).

It is supposed to change the displayed values over the specified axis of a Graph object, according a factor passed in argument as a float, and return the former factor value, in float.

I was wondering why each label was "0" after a call of this function so I wrote this small portion of code to make it clear.

float floatTemp, floatTemp2;
floatTemp2 = 0.2

floatTemp = GRAPH_SCALE_SetFactor(hScaleRfV, floatTemp2);
//after the first call, floatTemp == "1", which seems ok.
floatTemp = GRAPH_SCALE_SetFactor(hScaleRfV, floatTemp2);
//after this second call, floatTemp == 2.802597e-045


It seems the function doesn't return the former value correctly, which I suspect to be big/little endian related, or a double/float interpretation issue. Even the Hex value is different.

I didn't found any example of use in keil directory, the only reference to the function I could find was in segger emwin original sample files, and it seems ok.

Does anybody have any clue on this problem?

Thank you

Regards,

0