Complete
over 4 years ago

WERETECH-8476

Display bug from firmware update or SDK? Fenix 6x Sapphire misreporting screen shape (probably)

I have three products that all use logic based on screen shape and obscurity flags to layout the screen.

They seem to work well until I released an upgrade recently... changing SDK 3.1.5 to SDK 3.1.6 despite the known issues in debug environment because I wanted to support the newer watches. This immediately resulted in a bug report from a customer. So I downgraded to SDK 3.1.5 and the bug persisted.

As the identical (seriously) code used to work and now doesn't with both the newer and the older SDK, I have to put this down to external factors.

The customer confirms that there was a system update between his using my DataField and his noticing the bug. Therefore, it looks probable that the firmware might be at issue.

For reference, the following conditional breaks on Fenix 6s Sapphire and didn't previously..

var settings = System.getDeviceSettings();

var isSemiRound = settings.screenShape == System.SCREEN_SHAPE_SEMI_ROUND;
if (!isSemiRound && obscurityFlags == (OBSCURE_RIGHT | OBSCURE_LEFT | OBSCURE_BOTTOM | OBSCURE_TOP)) {
 // THIS SHOULD MATCH THE FENIX 6S
} else {

  // THIS SHOULD NOT MATCH THE FENIX 6S

 }

The code is misreporting so that it displays for a square layout when it should display for a round one.

I am at a loss to know what to do here. 

PLEASE HELP!

  • Hi,

    I replied to Stephen over the weekend and it doesn't seem to be displaying...

    So, to ensure the data gets there:

    1. Yes, flags are DataField.getObscurityFlags();

    2. (8 | 4 | 2 | 1) == 15 because the binary operator does (1000 | 100 | 10 | 1) == (1111)

    3. This code is _not_ new code - it works when the input data is good

    4. The device as reported to me by the customer is:

    Fenix 6x Sapphire Asia.

    Software ver. 5.10

    Sorry to repeat myself if my comments are simply awaiting moderation somewhere, but if that is the case, then PLEASE make that information available to me so that I don't have to follow up like this.

    G

  • Former Member

    I was taking a look and its not clear to me what the issue is here. From what I can tell, both System.DeviceSettings().screenshape, and WatchUi.DataField.getObsurityFlags() are returning the correct values on the fenix6 devices. 6xproSolar fw4.62, 6XproSolar fw 5.00, F6XPro fw6.00, F6 fw 5.75. SDK's 3.1.7, 3.1.5

    With the code you supplied in the post, is "obsuciryFlags" == to the value returned from WatchUi.Datafield.getObsurityFlags() or is that var something else?

    If it is equal to getObscurityFlags(), then I don't think that conditional statement is doing what you would want. getObscurityFlags() returns the SUM of all the OBSCURE_* enum values. This would mean that a 1 data field layout on a fenix 6 device would return a value of 15 (8+4+2+1) which looks to me like it would hit the "else" of your conditional.

    Am I missing something here? Any guidance here would be appreciated.

  • Former Member
    Former Member over 5 years ago

    i'm getting similar reports from Fenix 6 Pro users where getObscurityFlags is returning values different than what the simulator does.  i upgraded to the most recent SDK and they are on the newest Firmware but still broken.

  • Former Member
    Former Member over 5 years ago

    Hey,

    We've got a ticket created for you and will try it out on a device ASAP. I agree that it sounds like the device is reporting the wrong screen shape.