Ticket Created
over 5 years ago

WERETECH-8570

WERETECH-8569

in connectiq-sdk-win-3.1.7-2020-01-23-a3869d977 watchface diagnostics doesn't work

Hi

In new SDK watch face diagnostic no more works. All is good in previous version

  • Agree!  for the 2nd+ runs, you have to turn off low power then turn it back on, and I see that works.  The menu isn't showing the proper state if you were in low power and did another run.

  • I see what you're talking about now, however I do get onPartialUpdate calls back if I toggle  Low Power Mode 2 times.

    Low Power Mode: LPM   High Power Mode: HPM

    Per your instructions:
    1. With the simulator closed, run the WF (it starts in HPM).
    2. toggle to LPM (now LPM).
    3. then run in the sim again without closing.

    Those steps result in a strange state.

    In the "strange" state, the Settings menu will show that LPM is enabled, however, the wf is actually in HPM. The Setting is incorrectly showing that LPM is enabled. In this state, If you un-check LPM, the wf tries to switch to HPM, but it is already in HPM so the wf power mode doesn't change. You have to toggle it LPM back on again to start getting onPartialUpdates again.

    So I think the actual bug is that the Settings toggle doesn't properly report the current power state when you re-run the WF when the sim is open and in LPM.

    That is the issue that I'm going to report.

    I don't think the fact that it is returning 0 when the sim starts in HPM is an issue.

  • That works with the first run in the sim, but not for subsequent runs.  After the first run, toggling lowPower on/off make no difference, and onPartialUpdate never gets called (only onUpdate(), but it's called every second even when it's set for lowPower) and therefore, no stats in watch face diagnostics..

  • you are on the right track here. However, I think this is working correctly, we just haven't seen it before because the simulator used to always start in LowPower mode.

    Just to clarify:

    The watchface diagnostics are designed to be helpful with partial updates to make sure we don't go beyond battery restrictions in low power mode.

    in 3.1.7 we made a change where the simulated WF starts in high power mode (as it would on a device), but in 3.1.6 and earlier, the simulated wf starts in low power mode.

    Since we don't have battery restrictions in high power mode, and the WF now starts in High Power Mode, 0 is an accurate reading when the app first starts.

    To see values, in the simulator, enable the "Settings" > "Low Power Mode" setting. You should now see WatchFace Diagnostics.

    We should clarify that the WatchFace needs to be in low power mode in able to see these values. I will make a request to add that clarification.

  • Actually, I found the root cause here as well as a work-around.

    After you run an app in the sim the first time, the sim stays in high power mode, and when in high power mode, the stats aren't collected, so there's nothing to display.

    Try this. 

    Close the sim, and do a run that opens the sim and starts your watch face.  Then under settings, turn on low power mode.  If you view diagnostics, you'll see real data.

    But if after that you do another run with the sim still open, no diagnostics, and toggling low power on/off doesn't help. The sim stays in high power, and onPartialUpdate is never called.

    I'm using the 3.1.7 SDK, and to reproduce this, simply put a println in onPartialUpdate in a WF that does 1hz.  The first time you run it in the sim and drop to low power mode, you'll see the println.  Do another run without closing the sim, and in low power, no println calls are seen.