Power budget is exceeded when you use dc.drawAngledText(ArrayOfXYZ0Z7[8] , ArrayOfXYZ0Z7[9] , ArrayFONTArc[2], seconds , CENTER,45);

Hi

With recents options power budget is exceded  when font is  

$.dc2.getVectorFont({ :face=>"RobotoCondensedRegular", :size=>heightdiv2*.25}   not a big size 
Total time is more 60000  and display time is more 50000 permanently.
Before I used a draw bitmap
When I use profiler,  dc.drawAngledText CPU consumption is higher than my development which consisted of displaying character by character at a given position on the screen.

Why so much consumption
  • Use "Watchface diagnostics" instead of the profiler for investigation of this.  Remember, it's a 30ms max average over a minute, and with watch face diagnostics, you can see the value every second.

    There are things like loadResource() that will cause the the power budget to be exceeded if used in onPartialUpdate.  Your clip region can also do it even with small draws.  Multiple clip regios also get combined, so if you have a small clip region at the top and another small one at the bottom, the clip region becomes the top row of the top region to the bottom row of the bottom region.

    Not sure about vector fonts, but with custom fonts, they have a bigger impact on the budget than regular native fonts, so you can't use a custom font that's as high as a native font.

    I'd experiment with things like the size of the vector font and clip region using watch face diagnostics to help narrow things down.  I don't think the profiler will help much in this case.

  • Jimmy
    I use exactly the same clip for both fonts.
    The fonts are preloaded at the start of the program
    If I use my user font the power budget is never exceeded
    If I use the internal Garmin font with the dc.drawAngledText function the power budget explodes

  • I expect there is some reason you can't use a scalable fonts in onPartialUpdate.  It could be it uses the file system, like is the case with loadResource().

  • Ok, so I hacked one of my watch faces to use a vector font and  dc.drawRadialText() in onPartialUpdate for the seconds.  Normally, I use drawText() and the same font I use for HH:MM.  I kept the clip region the same as before.

    drawAngledText() is the same as drawRadialText() when it comes to the impact.

    It's run for about 10 minutes in low power with no issue with the power budget.  It might be 1-2ms more with the vector font, but that's it.

    I do Graphics.getVectorFont() in onLayout() (You can see I also use it on the left and right arcs but only in high power) In your call, I see you are using dc2 and not Graphics for the call.  Where are you doing that?

    Here's my call to getVectorFont()
    labFont=Graphics.getVectorFont({:face=>["RobotoCondensedRegular","RobotoRegular"], :size=>labFontH});
    if you are doing the getVectorFont() in your onParticalUpdate() code, move it to someplace like onLayout() as that is hitting the file system and you only need to get the font once.
  • I understand my mistake

    In onpartialupdate, I made  dc.clearClip(); event if I made a little rectangle erase (size of seconds)

    If I delete this now power budget is less than 8000.

    It's curious in my configuration watchface diagnostics doesn't have an auto update like in a previous version

    Thanks Jim for your answer Didier

  • Watch face diagnostics should update every second in low power mode, but I'm not seeing it update either.

  • You have to do something in onPartialUpdate - I can see changing every second...