Unknow error - help please

@dfrangu has reported an error with my Aviator Mk.1 watch face.

I display the date using text fields, one for each digit. For the first digit ( the tens ) I use:

Text: ($(floor(#Dd#/10))>0?(floor(#Dd#/10)):$)
Transparency: 100

When the date is the 28th, my watch, a Samsung Galaxy Watch, correctly displays “2”
On his watch, it displays “0”

Does anyone have any idea why that might be?

Has anyone else had a problem with this watch face?

His watch also has problems with the following:

Text: (floor(#BLN#/10))
Transparency: ($#BLN#<100&&(floor(#BLN#/10))>0?100:0$)

Displays nothing ( ie. blank ) when battery level was 98%; on my watch it would display “9”

text: (floor(#ZSC#/1000))
Trans: ($#ZSC#>=1000?100:0$)

Displays nothing ( ie. blank ) when steps was 8537; on my watch it would display “8”

The steps and battery hands work correctly on his watch so the flags must be returning the correct values. So, it looks like a problem with the floor function behaving differently on differnt watches but I cannot test this. Any ideas anyone?

Thanks
Mike

What kind of watch does he have?

And yeah, the floor function seems to be the first thing I’d narrow it down to.

1 Like

Thanks for the reply. I don’t know his watch model. He did send a photo but I am not familiar with the different smart watches. Do you recognise it?

Do you see anything wrong in my expressions? I am not using them in some strange way am I?

Thanks again
Mike

You are missing the ‘0’ after the ‘:’ here. Not sure if this was a typo. I assume this should be ‘0’?

Next one:
Transparency: ($#BLN#<100&&(floor(#BLN#/10))>0?100:0$)
It may be because of too many operators in the same string. <, &&, >

Final one:
try adding parenthesis on the Trans around #ZSC#

1 Like

Thanks for that.

I have made some tweaks.

  1. Put the tags in brackets ( although it does not seem to be a problem elsewhere
    (?))

  2. Replaced the text field for the 1st digit of the date with (floor((#Dd#/10))) and Trans now: ($(#Dd#)>9?100:0$)

I am not sure about ($#BLN#<100&&(floor(#BLN#/10))>0?100:0$), the documentation page at


seems to imply that such complicated expressions are ok (?)

Anyway, still not sure if it his watch or my expressions that are the problem :frowning:

Some thoughts:

  • Less is more, and be disciplined with syntax …
  • Don’t use brackets around conditionals: NOT ($x==y?yes:no$)
  • Use simpler maths: date 1-31, 10s digit floor(value/10). 1’s digit value%10
  • Don’t over complicate conditionals: ($(floor(#Dd#/10))>0?(floor(#Dd#/10)):$) should just be $#Dd#>9?floor(#Dd#/10):$
  • Similarly: ($#BLN#<100&&(floor(#BLN#/10))>0?100:0$) should just be $#BLN#<100&&#BLN#>9?100:0$

Thanks for that. I’ll make the further tweaks.

Have you come across certain watches producing different results with the expression floor ( #Dd# / 10) or similar?

Cheers
Mike

No.

But overly complicated syntax does not work the same on Creator as it does on watches (and varies between them).

2 Likes