according to our bug trace records, floating point literals are truncated to 9 digits after the period sign - when evaluating the numbers. Later, when the numbers are generated in C code, they are truncated again to 6 digits after the period sign.
This is an error in Embedded Wizard. We have fixed the problem already for the upcoming version 12.00 we are actually working on. For older version you need a workaround or a dedicated patch.
The simplest workaround would be to avoid the floating point literals < 0.000001. This is of course not always possible. Second workaround would be to store the floating point literals in native code as demonstrated below. This will work, however, in target system only:
var float someValue; /* = 0.0000000001 does not work here */
// To correctly initialize the variable with a small value
// use 'native' code section. This will work in the target
// system only. Not in Prototyper.
native ( someValue )
someValue = 0.0000000001f;
// ... use the value now
If none of the workarounds works for you, you can contact us via email@example.com for a patch.
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!