Complete
over 5 years ago

WERETECH-8149

requiresBurnInProtection returns "true" on Fenix 5X 14.72 Beta

In WF CircularDidital, I have the code:

    function onEnterSleep() {
		var settings = Sys.getDeviceSettings();
		if (settings has :requiresBurnInProtection && settings.requiresBurnInProtection) {
			mIsBurnInProtection = true;
		}
        WatchUi.requestUpdate();
    }

...
    function onUpdate(dc) {
...    
        if (mIsBurnInProtection) {
        	AlwaysOn(dc);
        	return;
        }
...
    }

When this code is executed on Fenix5x 14.72 Beta, the "AlwaysOn (dc)" function is called. It is not called immediately, but a few seconds after the activation of WF, apparently after onEnterSleep()

I did it for Venu, but I did not expect it to work for other watches. I can solve it by adding a screen resolution to the analysis, but it shouldn’t be like that!

  • You could ask the user to try it, but on my f5x, I only see "l" and "h".  Same with other watches with CIQ 3.1, except the venu.

  • I do not have a Fenix 5X. A user of my WF informed me and showed me a picture that is drawn in my function "AlwaysOn (dc)"

  • Yes, the "has" will be true on watches with 3.1, but "settings.requiresBurnInProtection" will be false, so the if statement should fail.

    There's something else going on here.

    Attached is a slightly modified version of the watch face template in eclipse, where after the time it will show

    "v" - in low power and requiresBurnInProtection is true (the venu)

    "l" - in low power and requiresBurnInProtection is false (watches except the venu)

    "h" - in high power

    run it on your f5x.

    What do you see?

    wf.zip

  • var mIsBurnInProtection=false;
    ...
        function onExitSleep() {
    		mIsBurnInProtection = false;
            WatchUi.requestUpdate();    // this is probably redundant but better safe than sorry (or so they say)
        }
    

    As for the fact that one "has" is enough - I agree with you.
    However, in the option you have proposed, "has: requiresBurnInProtection" will turn "true"

  • Are you sure you're initializing mIsBurnInProtection to false?  And setting it back to false in onExitSleep()?

    Also, I'd only do the "has" in initialize and set a boolean, as "has" is expensive vs a boolean check, and doesn't change.

    with the 14:72 FW, it's CIQ 3.1, and "has" requiresBurnInProtection, but it should always be false, My WFs with Venu's "always on" run fine on this FW using similar logic