You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Do you turn off the watch at night?

    Please don't do this! As long as the clock face just updates every minute, having it on over night shouldn't be a big deal.

    But yes, updating once a second can be a big draw. If you're just updating the seconds digits on a digital clock it won't be too bad but very few clock faces do this - they usually redraw everything

    drawImages will do just the bounding rect, but if you've specified a background image, then the bounding rect is going to be the entire area of that background image so that won't help you. There are some analog clock apps that are a bit smarter about the area they update, but even so it will hurt battery updating every second.

    Is yours this app?­us

    Because it seems you clear the screen (twice), and then redraw everything (including all widgets) once a second:­lob/master/apps/seiko-5actus/app.js#L162­-L165

    So actually I'd say 3 days life is probably not a huge surprise from that...

    You could use some code like this though, and ensure you redraw just the area around the second hand (and where it was) and it would probably have a pretty drastic effect:­lob/master/apps/analogimgclk/app.js#L41-­L95

  • That is correct and I see now where I’ve gone wrong, my intention was to draw the background once and then not have it redraw and only redraw the hands, not sure why I put it in the display refresh loop, was a bit silly of me. I’ll have to update that code to not redraw everything like that and see what happens, but I’d agree that my watch face is most definitely my issue of only getting 3 days battery life.
    Also not sure why I’m making it redraw twice, I typically don’t get a chance for hobbies until after I’ve put my son to bed, so I’m just going to blame it on end of day brain fog haha.

    That analogimgclk has some nice code in it, I’ll have to have a proper look at how it’s handling the images and implement something similar into mine.

    I’ll have to find some time this week to sit down and rewrite a chunk of that code as there’s a few things I can see I want to change and optimise in it


Avatar for Gordon @Gordon started