Vivoactive Can Update Forever at 1 Hz

There is a way to cause the Vivoactive to perform updates forever at 1 Hz on hardware, regardless of sleep mode, but I don't think this works on other devices. What is the expected behavior?

using Toybox.WatchUi as Ui;
using Toybox.Graphics as Gfx;

class SandboxView extends Ui.WatchFace {
var updateCount = 0;
var enterSleepCount = 0;
var exitSleepCount = 0;

function onLayout(dc) {
}

function onUpdate(dc) {
var string;

dc.setColor( Gfx.COLOR_BLACK, Gfx.COLOR_BLACK );
dc.clear();
dc.setColor( Gfx.COLOR_WHITE, Gfx.COLOR_TRANSPARENT );
string = "Updates: " + updateCount;
dc.drawText( 40, 10, Gfx.FONT_MEDIUM, string, Gfx.TEXT_JUSTIFY_LEFT );
string = "Enter sleep: " + enterSleepCount;
dc.drawText( 40, 40, Gfx.FONT_MEDIUM, string, Gfx.TEXT_JUSTIFY_LEFT );
string = "Exit sleep: " + exitSleepCount;
dc.drawText( 40, 70, Gfx.FONT_MEDIUM, string, Gfx.TEXT_JUSTIFY_LEFT );

if(updateCount % 2 != 0) {
Ui.requestUpdate();
}
updateCount++;
}

//! The user has just looked at their watch. Timers and animations may be started here.
function onExitSleep() {
exitSleepCount++;
}

//! Terminate any active timers and prepare for slow updates.
function onEnterSleep() {
enterSleepCount++;
}

}
  • Thanks--I've tested this and was able to reproduce it. This issue does not appear in the simulator or on other devices, so at least it's limited to vivoactive hardware. It's been reported, so we'll get it investigated!
  • so at least it's limited to vivoactive hardware.


    Thanks, Brandon. If this turns out to be a Vivoactive bug, it would still be nice to have a way to explicitly request UI updates in ways that transcend sleep mode. I understand that the design goal is low power consumption, but as a ConnectIQ developer I sometimes wish for more flexibility. Even if the user had to "opt in" to possibly increased power consumption with a permission, it might open the door for some novel apps.

    This is also the reason why the Heliocentric watch face works better on the Vivoactive than other devices. One man's bug is another man's feature. :D
  • This explains it! I thought I had caused permanent screen updates on my actual watch at one point. I just didn't know what it was about my code that had caused it, and assumed it was a different part that was causing it... but once I had refactored the code, it no longer worked and I just figured maybe I was crazy.
  • This has been fixed and is currently working on internal releases of vivoactive firmware. It will be available in the next public release of vivoactive firmware.