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,
In addition, the fact that the value "contained" in the float is beyond the min value of type float (1.175494351e-38F) is really odd...
I found a way to avoid the float alteration by choosing "Not Used" instead of "Use FPU" for floating point hardware settings in the project options window. But I can't figure out why the STM32F407 goes crazy when it's turned on...
I'd be glad if someone has an explanation.
Thank you,