Complete
over 4 years ago

WERETECH-11068

Fixed

onExitSleep is called after each wrist gesture even in high power

Fenix 6 Series - 15.73

My watch face has got indicator low power which is bright after call onEnterSleep so I now when is low power.

In onExitSleep I start count something for zero and need 10 second and i dev version I show this counter.

I can see such strange behaviour:

- enter sleep - indicator bright

- wrist gesture - indicator not bright , counter 0, 1, 2...

- next wrist gesture - indicator still not bright , counter 0,1...

it means that system call onExitSleep  wihout onEnterSleep  or onEnterSleep  and onExitSleep  one by one

In my opinion it should work else:

- enter sleep - indicator bright

- wrist gesture - indicator not bright , counter 0, 1, 2...

- next wrist gesture - indicator still not bright , counter 3, 4,...

  • I cant' see Richard.ConnectIQ post so  I repeat it:

    We have been looking into this issue, but have so far been unable to reproduce what you are experiencing. With a simple watch-app that increments a counter every time it enters and exits sleep the values are always in sync.

    FIRST this is no watch-app becouse watch app doesn't have onXXXSleep it's watch face

    As it seems to call onEnterSleep and onExitSleep on every wrist gesture. If you do a wrist movement halfway so the device is facing away from you it executes the onEnterSleep function and the screen is black. If you then move your wrist towards you again it executes onExitSleep. Therefore a full wrist gesture of facing away and then back towards you will execute both one after the other each time. 

    If you are experiencing something other than this would you be able to provide some code that demonstrates what you are attempting to do?

    I've made another test and and my observation was right.

    simple code

    //global

    var gT3=0;

    //view

    function onExitSleep()
    {
            gT3--;

    }

    function onEnterSleep()
    {
            gT3++;

    }

    function onUpdate(dc)

    {

    //draw (gT3);

    }

    wf start: gT3=0 OK

    enter sleep: 1 OK

    wrist gesture: 0 OK

    wait..., sleep: 1 OK

    wrist gesture: 0 OK

    wrist gesture: -1 NOT OK

    wrist gesture: -2 NOT OK

    ..... -8 NOT OK

    wait... sleep -7

    so it menas that every wrist gesture calls onExitSleep independed of state watch (in high power) an there is no onEnterSleep call before onExitSleep

  • There is nothing special in my code, counter=0 in onExit and showing this counter in every onUpdate.

    But even system call onEnterSleep it shouldn't happen because:

    - 00:00:00 watch starts - high power - indicator not bright - OK

    - 00:00:10 onEnterSleep - indicator bright - OK - WATCH IS ABOUT 10 s in HIGH POWER

    - 00:00:15 wrist gesture - indicator not bright - it means onExitSleep was called, counter 0, 1, 2... HIGH POWER should be for about 10s

    - 00:00:18 +3 seconds, next wrist gesture indicator still not bright (means no low power, or there was quick onEnterSleep  and I can't noticed it), counter 0,1... - counter starts from 0 it means onExitSleep was called (only in onExitSleep there is counter=0) but I'm still in HIGH POWER  (3rd second)

     I'm sure in 100% system call onExitSleep during high power.

    I'll write some test to check if there is onEnterSleep during high power (before about 10th s period)

  • We have been looking into this issue, but on every watch we test onEnterSleep and onExitSleep are always in sync. With a simple enter and exit sleep counter they increment together. 

    Would you be able to share some code so we can better see what you are experiencing?

  • well, all forum has a lot of "functional bug" , I don't understand how it possible to write software in such way

  • Also, this comment section is broken -- it doesn't show more than 5 replies unless you click "oldest" or "newest".