This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
expressions [2016/02/28 15:30] Wearable Software |
expressions [2021/02/17 21:40] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
+ | Use operators, mathematical functions or conditional statements to build a more dynamic watchface. | ||
===== Built-in operators ===== | ===== Built-in operators ===== | ||
+ | Watchface Builder supports following operators: | ||
* Addition: 2 + 2 | * Addition: 2 + 2 | ||
* Subtraction: | * Subtraction: | ||
Line 35: | Line 37: | ||
< | < | ||
Returns the integer value for the current temperature | Returns the integer value for the current temperature | ||
+ | |||
+ | ===== Conditional statements | ||
+ | You can use condition statements. The syntax is: | ||
+ | |||
+ | < | ||
+ | |||
+ | Following operators are supported for a condition: | ||
+ | * greater equal >= | ||
+ | * lower equal <= | ||
+ | * lower < | ||
+ | * greater > | ||
+ | * equals == | ||
+ | * not equals != | ||
+ | |||
+ | ==== Example ==== | ||
+ | For example if you want a blinking watchface layer set following expression on your opacity property. | ||
+ | |||
+ | < | ||
+ | |||
+ | Every time the seconds value changes and the value divided by two gives no rest, the layer will be displayed. |