Hello,
I am using an example for a smart thermostat and I am having some sort of issue in sending a float from the GUI via the device driver.
Below is the property that I am defining and the very simple method to send the value.
This is where I set the Desired Temp property, in another class I just change the value when the NominalTemperature is changed. It is in line 8 of the code snippet section
Below is the debug info from my Device Driver class located in Application class. The data seems to be fine here and is exactly what I need.
The real issue comes into play when I print the value and just seem to get random junk I have tried a few different things like how I set the Desired Temp value, printing with different percision, or setting a different variable and printing that instead. The only thing that actually somewhat works is if I set my DesiredTemp property as an int32, this gives me the right value of an integer that is printed correctly.
Here is the header declaration and c function:
void DeviceDriver_SetDesiredTemp( XFloat aValue );
void DeviceDriver_SetDesiredTemp(XFloat aValue )
{
#ifdef _ApplicationDeviceClass_
EwPrint( "Set Temp: %0.2f\n", aValue );
#endif
}
If any more information is needed please let me know and thanks for the help!