Two clips on 1Hz watchface

Former Member
Former Member
Hi,

Help please as I am stuck.

I'm trying to do this :
show a stepcounter with digits that updates every second at location x=70, y=160, width=90, height=25
show a seconds analog hand every second
The digits have to be behind the seconds hand

How do I arrange the clips ?
Where do I draw the text ?

Thanks,
Dirkvd001
  • I have two clip regions in a number of things (seconds and HR). Set the first clip, do the data for it, set the second clip, and do the data for it. In the case of HR, I only do it if it's changed since what was displayed the last time, and for seconds, I do digital, so the clip region is consistent and isn't that big. You have to be very careful in managing your power budget.

    I was doing steps as a test a while back, and those actually didn't change that fast, so that might help here.

    update: Maybe you have to clear the old sec hand position with one clip, handle the step count with another, and then do a 3rd for the new second hand.... But I think you'll be tight on the budget. A place to look is the analog sample in the SDK, because if I recall, it's got something like this behind the second hand.
  • Have a peek at the Analog sample app. It draws a second hand and the date. Should not be very different from what you're trying to achieve.

    Travis
  • Former Member
    Former Member over 6 years ago
    Travis and Jim's advice should help get you to a solution that will render the way you want it to, but Jim is correct that you may run into issues with power budget. You'll have to get things working first to get those results, but one thing to keep in mind as you are evaluating it is that from the perspective of your power budget, any clipping rectangles you use within the same second will be "added" to create a single clip that minimally contains them. This means, for example, that if you used a single pixel clip in the top left corner of the display, and another in the bottom right, the power budget would get hit for the entire display. You will want to keep your clips as close together as possible to minimize your power usage.
  • Along with that, make sure you have the delegate for exceeding the power budget, as if you do run into a problem, you can see where you are current at. If you exceed the budget by .1 ms,it will be likely be easier to find/resolve than if you exceed it by 10 ms.

    Oh, and you will only trip the delegate after a minute (the budget is an avg over a minute), but may not hit it for much longer, based on where things are, etc. Also the amount you can do and stay under budget may vary a bit based on the specific target you are running in the sim, and on a real device, how often things change in the real world - like HR in my case ad likely steps in yours....
  • Former Member
    Former Member over 6 years ago
    Thank you for your replies. I understand everything you guys say.

    However, I cannot make two clipping areas as the analog hand moves the entire screen in portions and the digits for the steps in a fixed position. The distance will get to big between both clips and I run out of memory.

    If I choose to update the steps only every 15 seconds, I can alter the clipping area to be only one area and succesfully display both the updated second hand and the digits for the steps. No memory issues occur and the delegate is not triggered.
    But between 0 - 15 - 30 - 45 seconds the buffered bitmap is not updated and will display the older value of steps saved on the onUpdate event.
    Can I trigger to update that buffered bitmap somehow so it is saved again and use that to do a partial update ?

    BTW : The date in the sample you talk about is only updated every minute and is written in the targetDc which is a buffered bitmap.

    Greetings,
    Dirk