Im kinda sad about onUdate needing to clear the screen

I'm developing a watchface specifically for the Instinct 2X and when I I actually used setclip inside the onUpdate function, battery life was amazing, but unfortunatly it caused problems with alerts and suchs the screen not clearing.

Then I decided with suggestions on here to go the offscreen buffer route and draw all my things only once to that and then draw the buffer at onUpdate and while the battery still is a lot better then drawing everything every second at onupdate, drawing the offscreen buffer still doesn't come close as to when I was doing setclip in onupdate.

Why is there no function that is called when clearing an alert? That would make it possible to use setclip inside onupdate too and really save a lot of battery. 

I ltterally managed to get my watch to about 1% day usage, but now with offscreen buffer i'm still at around 3% per day. my partialupdate is disabled and my onupdate is about 184us total in profiler (basically all it does is draw the time text and the buffer all the info on the buffer I redraw during 1 time after onexitsleep which I was also doing when using setclip), so I really think i'm at my max here when it comes to battery usage really and from here on its really just the full screen redraws at onupdate that are causing the higher usage.  

  • onUpdate is only called every second after things like a gesture or a notification, with the majority of the time, it being called only once a minute.

    What kind of a battery drain are you seeing?  How are you seeing it (on the watch face, in the glance loop, etc).  As I've said before, on some devices, the dc is cleared before onUpdate is called, and you won't see this in the sim and need to check on a real device, which could limit the devices you support.

    So in other words, each time onUpdate is called you want to draw the entire screen to be safe..

  • Im making it specifically towards the Instinct series. The clear is not called and screen is not cleared with system alerts. But in all other cases it works fine. I'm testing on a real device in this case. 

    Drawing only partial screen even onUpdate still seems to save a chunk of battery becasue in the end of the day the watch wakes up atleast every minute and in between also by false detections. Doing a full screen redraw compared to just a partial one still saves a lot of battery over the course of a whole day. Pretty much if I had some function to detect system alerts I could get away with it, but unfortunatly there isn't

    Im wondering if drawing multiple smaller offscreen bitmaps instead of one big one where i draw everything to could make a difference tho?

  • I also tried to draw only part of screen and gave up. Some notification are on full screen (e.g. low battery) some partial.

    Apps, and system use the SAME dc so notification draws on your drawing. On mips (and probably on instinct) system remember drawing in pixel so if you don't redraw your drawing pixel won't change. Screen is cleared on amoled and some mips.

    offscreen bitmaps won't solve your problem unless you have very complicated calculation, drawing bitmaps is usually very expensive

    3% per day is very good result

    use profiler to search a problem (cliping cost too)

  • What do you see for battery drain?  On a fully charged Instinct2, I see 25 days.  That equates to 4% a day (100/25).  And after running one of my watch faces for 48 hours, I see 3-4% per day.  And this includes onPartialUpdate to show seconds and one of my glance apps that has a background service running every 10 minutes.

    How are you seeing your 1%/3%?  Over how long a time? Are you running a full day when you are testing?  You may or may not be seeing the the decimal part and depending on rounding, 20.9 and 21.0 may look like 1% but really isn't.

  • Its over a full day and even multiple days. I have a battery datafield showing decimals too and also a datafield that shows the drain basically calculating battery since start and battery percentage current divided over the passed time. 

    My current version goes about 2.5% but when I had the setclip in onUpdate it was below 2% for sure. I'm trying to see if its possible to get it betweeen 1 to 2% per day. That would be awesome. 

  • With the 2x device the specs mention 40 days in watchface mode (Garmin tends to be a bit optimistic, as with the I2, it says 28 days but I've never seen the watch with more than 26 days remaining battery).

    So 40 days is more than 2%/day.  I really doubt you see less than that if everything is working correctly.  Unless, you're watch is being impacted by the solar charging..