920xt Simulator/Device Difference

So my 920xt was on my doorstep tonight! Yes!

I'm resting for a race this weekend so instead of immediately taking it for a ski or run I'm sitting in front of the computer playing with ConnectIQ.

I've been dabbling with this watch face that features my ski shops logo. Barring the fact that I'm no designer and it does not look very polished I see significant differences between the simulator and actual device.

Have I done something wrong?

Simulator:


Actual Watch:


Layout code:
<layout id="WatchFace" background="Gfx.COLOR_WHITE">
<drawable id="testd" />
<bitmap id="CyclovaXC" x="49" y="center" filename="../images/Logo.png" />
<label id="TimeLabel" x="5" y="111" font="Gfx.FONT_NUMBER_MILD" justification="Gfx.TEXT_JUSTIFY_LEFT" color="Gfx.COLOR_DK_GREEN" />
<label id="Seconds" x="73" y="131" font="Gfx.FONT_SMALL" justification="Gfx.TEXT_JUSTIFY_LEFT" color="Gfx.COLOR_BLACK" />
<label id="Steps" x="5" y="5" font="Gfx.FONT_SMALL" justification="Gfx.TEXT_JUSTIFY_LEFT" color="Gfx.COLOR_RED" />
<label id="Battery" x="200" y="131" font="Gfx.FONT_SMALL" justification="Gfx.TEXT_JUSTIFY_RIGHT" color="Gfx.COLOR_RED" />
<label id="Date" x="5" y="94" font="Gfx.FONT_SMALL" justification="Gfx.TEXT_JUSTIFY_LEFT" color="Gfx.COLOR_BLACK" />
</layout>
  • The number formatting also appears to function differently... I'm back to getting the non-two digit number on the actual device but not on the simulator.

    Sim:


    Device:
  • When formatting numbers, if you want two digits left padded with 0, use %02d as the format string. Additionally, you don't need to multiply the battery percent by 100. In the simulator the battery is set to 1%. Additionally, it looks like there may be some issue with the position of the numeric fonts (Gfx.FONT_NUMBER_MILD). You might have better luck with one of the others if it suits your needs.

    Travis
  • Thanks for the help on the formatting. I finally READ the other thread and now understand what the other posters were saying.

    The position of the FONT_NUMBER_MILD looked fine, it was the size that seemed off. In reading the devices.xml file, is the number associated with the font the height in pixels? If that is the case the largest "text" font is 20 and the smallest "number" font is 32.
  • I notice also, that all the Number Fonts are different between Simulator and real 920XT.
    Is there a way to correct this issue by change an ini-file of the Simulator? Otherwise, developing layouts it's a little bit tricky.



    function initialize()
    {
    fonts = [Gfx.FONT_XTINY, Gfx.FONT_TINY, // 0,1
    Gfx.FONT_SMALL, Gfx.FONT_MEDIUM, Gfx.FONT_LARGE, // 2,3,4
    Gfx.FONT_NUMBER_MILD, Gfx.FONT_NUMBER_MEDIUM, Gfx.FONT_NUMBER_HOT, Gfx.FONT_NUMBER_THAI_HOT]; // 5,6,7,8
    }

    function onUpdate(dc)
    {
    var text="1...2-";
    dc.setColor(Gfx.COLOR_WHITE, Gfx.COLOR_WHITE);
    dc.clear();
    dc.setColor( Gfx.COLOR_BLACK, Gfx.COLOR_TRANSPARENT );
    dc.drawText( 165, 130, fonts[0], text+"0", Gfx.TEXT_JUSTIFY_LEFT );
    dc.drawText( 165, 110, fonts[1], text+"1", Gfx.TEXT_JUSTIFY_LEFT );
    dc.drawText( 165, 90, fonts[2], text+"2", Gfx.TEXT_JUSTIFY_LEFT );
    dc.drawText( 160, 70, fonts[3], text+"3", Gfx.TEXT_JUSTIFY_LEFT );
    dc.drawText( 140, 45, fonts[4], text+"4", Gfx.TEXT_JUSTIFY_LEFT );
    dc.drawText( 105, 0, fonts[5], text+"5", Gfx.TEXT_JUSTIFY_LEFT );
    dc.drawText( 0, 0, fonts[6], text+"6", Gfx.TEXT_JUSTIFY_LEFT );
    dc.drawText( 0, 37, fonts[7], text+"7", Gfx.TEXT_JUSTIFY_LEFT );
    dc.drawText( 0, 85, fonts[8], text+"8", Gfx.TEXT_JUSTIFY_LEFT );
    }
  • Looks like the fonts got mapped on the device differently than we were expecting. We'll get this fixed, but in the mean time this can be fixed by editing <Connect IQ SDK Root>/bin/devices.xml. There's a font section under the <device id="fr920xt_sim"> section. Here's the actual mapping. Disclaimer: I'm working on something else so I haven't had a chance to verify that this is 100% correct, but according to the FR920XT font mappings this should be it. I wanted to post this in case someone was really wanting this fixed.

    <font id="numberMild">Digi 20</font>
    <font id="numberMedium">Digi 32</font>
    <font id="numberHot">Digi 38</font>
    <font id="numberThaiHot">Digi 62</font>
  • Hey Kyle,

    I can confirm that the suggested fix you mentioned does address the difference between the simulator and the actual device.

    Thanks
    Shane