[CIQBUG] Low Power mode not re-entered properly

I've been tinkering with WatchFace gesture support, and it seems to have a rather annoying bug. I'm not sure if this is a firmware bug (fr920xt-3.03), or if it is an issue with ConnectIQ. To reproduce...

  • set a watch face that uses gesture support to be the active clock on your device.
  • lift your arm to look at the watch face to trigger the gesture support which takes the device out of low-power mode.
  • while still not in low-power mode, count to 5 then press the up or down key to get to the step information screen.
  • while on the step information screen, count to 6, then press the up or down key to get back to the watch face.
  • notice that the watch face is being updated once a minute, but the application does not appear to have been notified about the exit from low power mode.
  • if you trigger the gesture support again, things will return to normal.


Travis
  • Here is the sample code that I'm using for testing.

    When the watch face believes it is in low-power mode, it displays the current time in green text in the format HH:MM:SS, otherwise it displays it with orange text in the format HH:MM:SS. You are seeing the bug if the time is displayed in orange (in the format HH:MM:SS), but is not updating once a second.

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

    class TestWatchFace extends Ui.WatchFace
    {
    hidden var low_power_mode = true;

    function initialize() {
    }

    function onLayout(dc) {
    low_power_mode = true;
    }

    function onShow() {
    }

    function onUpdate(dc) {
    dc.setColor(Gfx.COLOR_BLACK, Gfx.COLOR_BLACK);
    dc.clear();

    var cx = dc.getWidth() / 2;
    var cy = dc.getHeight() / 2;

    var format;
    var color;

    if (low_power_mode) {
    format = "$1$:$2$";
    color = Gfx.COLOR_GREEN;
    }
    else {
    format = "$1$:$2$:$3$";
    color = Gfx.COLOR_ORANGE;
    }

    var time = Sys.getClockTime();
    time.hour %= 12;

    var text = Lang.format(format, [
    time.hour,
    time.min.format("%02d"),
    time.sec.format("%02d")
    ]);

    dc.setColor(color, Gfx.COLOR_TRANSPARENT);
    dc.drawText(cx, cy, Gfx.FONT_NUMBER_HOT, text, Gfx.TEXT_JUSTIFY_CENTER | Gfx.TEXT_JUSTIFY_VCENTER);
    }

    function onHide() {
    }

    function onEnterSleep() {
    low_power_mode = true;
    Ui.requestUpdate();
    }

    function onExitSleep() {
    low_power_mode = false;
    Ui.requestUpdate();
    }
    }
  • I used this issue as an opportunity to try out the new application logging feature. I instrumented onEnterSleep(), onExitSleep() and onUpdate(), and used the watch face to reproduce the steps listed above. Here is the logging output.

    onShow
    onUpdate
    onUpdate
    onUpdate
    onEnterSleep
    onUpdate
    onUpdate
    onExitSleep
    onUpdate
    ...
    onUpdate
    onExitSleep
    onUpdate
    ...
    onUpdate


    As you can see, the watch face exits sleep mode and doesn't return to sleep mode before exiting sleep mode again.
  • Former Member
    Former Member over 10 years ago
    We discovered and fixed this issue shortly after the 3.03 beta was generated. It should be fixed as soon as the next update comes out.
  • Let this issue and other known bugs be listed in some kind of "Known issues" sticky thread. It would be a good practice, don't you think?
  • I just tested this on FR920XT 3.07 beta firmware, and was not able to reproduce it. Travis, let me know if you still encounter this sort of issue.

    Thanks!