<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FreeMASTER WriteFloatVariable function issue in FreeMASTER</title>
    <link>https://community.nxp.com/t5/FreeMASTER/FreeMASTER-WriteFloatVariable-function-issue/m-p/1189618#M470</link>
    <description>&lt;P&gt;Dear Matisse,&lt;/P&gt;
&lt;P&gt;thank you for confirmation. It is actually a bug in FreeMASTER as it should not depend on system settings and should treat the numbers always in a JavaScript-compatible way (with a dot).&lt;/P&gt;
&lt;P&gt;As you already tested, the workaround is to set a locale to English. We will fix this issue in the next version.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Michal&lt;/P&gt;</description>
    <pubDate>Thu, 26 Nov 2020 09:44:16 GMT</pubDate>
    <dc:creator>MichalH</dc:creator>
    <dc:date>2020-11-26T09:44:16Z</dc:date>
    <item>
      <title>FreeMASTER WriteFloatVariable function issue</title>
      <link>https://community.nxp.com/t5/FreeMASTER/FreeMASTER-WriteFloatVariable-function-issue/m-p/1189568#M466</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I use Freemaster 3.1 to control a S12ZVL devkit, I created a control page (html, css, js) for this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In my js script I use functions that are defined in the freemaster-client.js library.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;One of them is&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;pcm.WriteFloatVariable&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;addr&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When used, the "." is ignored, if I ask for 10.2 to be written, my float var will contain 102.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is the following :&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FreeMASTER writefloat issue code.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/131078i6B1F25B3EF51E033/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FreeMASTER writefloat issue code.PNG" alt="FreeMASTER writefloat issue code.PNG" /&gt;&lt;/span&gt;&lt;P&gt; &lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Result in the console is :&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FreeMASTER writefloat issue.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/131077i864E3FA94A00965C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FreeMASTER writefloat issue.PNG" alt="FreeMASTER writefloat issue.PNG" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My var is defined as a float in FreeMASTER :&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FreeMASTER writefloat issue var def.PNG" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/131079iE8F5BF82989AA8BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="FreeMASTER writefloat issue var def.PNG" alt="FreeMASTER writefloat issue var def.PNG" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any clues ?&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Matisse&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Nov 2020 08:35:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/FreeMASTER-WriteFloatVariable-function-issue/m-p/1189568#M466</guid>
      <dc:creator>Matisse_Boffy</dc:creator>
      <dc:date>2020-11-26T08:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: FreeMASTER WriteFloatVariable function issue</title>
      <link>https://community.nxp.com/t5/FreeMASTER/FreeMASTER-WriteFloatVariable-function-issue/m-p/1189583#M467</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;SPAN&gt;Matisse,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;it seems as a bug related to inappropriate&amp;nbsp;use of system locale settings and string conversion. I think your Windows system is set to use "comma" as a floating point, and use point as a "thousand separator". Is this correct?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can you please make few experiments?&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Write "10.2" as a string value&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Write "10,2" with comma (as a string)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Store 10.2 to a JavaScript variable and use it in the Write call&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Inspect your Region &amp;amp; Language settings and let me know how is it set&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;BR /&gt;Michal&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 08:56:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/FreeMASTER-WriteFloatVariable-function-issue/m-p/1189583#M467</guid>
      <dc:creator>MichalH</dc:creator>
      <dc:date>2020-11-26T08:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: FreeMASTER WriteFloatVariable function issue</title>
      <link>https://community.nxp.com/t5/FreeMASTER/FreeMASTER-WriteFloatVariable-function-issue/m-p/1189588#M468</link>
      <description>&lt;P&gt;One more point FYI: You should be using just WriteVariable call when you have your FreeMASTER variable defined. You variable is set to float type, so the FreeMASTER will know how to handle it.&lt;/P&gt;
&lt;P&gt;The WriteFloatVariable should be used when writing to memory directly. This call uses a C symbol name or a direct address as an argument (while WriteVariable uses the FreeMASTER variable name instead).&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Michal&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 08:59:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/FreeMASTER-WriteFloatVariable-function-issue/m-p/1189588#M468</guid>
      <dc:creator>MichalH</dc:creator>
      <dc:date>2020-11-26T08:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: FreeMASTER WriteFloatVariable function issue</title>
      <link>https://community.nxp.com/t5/FreeMASTER/FreeMASTER-WriteFloatVariable-function-issue/m-p/1189611#M469</link>
      <description>&lt;P&gt;Dear MichalH,&lt;/P&gt;&lt;P&gt;It was indeed a bug related to Region and Language, setting the format to English, or use a coma in the function ( with Dutch format), solves the issue.&lt;/P&gt;&lt;P&gt;Thank you very much for your answer !&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 09:39:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/FreeMASTER-WriteFloatVariable-function-issue/m-p/1189611#M469</guid>
      <dc:creator>Matisse_Boffy</dc:creator>
      <dc:date>2020-11-26T09:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: FreeMASTER WriteFloatVariable function issue</title>
      <link>https://community.nxp.com/t5/FreeMASTER/FreeMASTER-WriteFloatVariable-function-issue/m-p/1189618#M470</link>
      <description>&lt;P&gt;Dear Matisse,&lt;/P&gt;
&lt;P&gt;thank you for confirmation. It is actually a bug in FreeMASTER as it should not depend on system settings and should treat the numbers always in a JavaScript-compatible way (with a dot).&lt;/P&gt;
&lt;P&gt;As you already tested, the workaround is to set a locale to English. We will fix this issue in the next version.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Michal&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 09:44:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/FreeMASTER-WriteFloatVariable-function-issue/m-p/1189618#M470</guid>
      <dc:creator>MichalH</dc:creator>
      <dc:date>2020-11-26T09:44:16Z</dc:date>
    </item>
  </channel>
</rss>

