Can someone please explain me, how I can display the heartbeat in colour on my watchface made with Watch Face Studio.
The plan is to display:
- 0-70 bpm in green
- 70-100 bpm in yellow
- more than 100 bpm in red
Will this be possible ?
Thanks in advance.
You use 3 identical images one in green one in yellow and one in red.
for the opacity of each one use Tags based on [HR] to show and hide them
There is an example of Ternary operations using Battery percent [BATT_PER] HERE just change that the [HR]
Hope this helps if not let us know where you are stuck. I can create one for you but it is better to understand this yourself.
Ron
Samsung Developer Relations
Hi Ron,
thanks for your feedback.
I tried the follwing 3 steps:
[HR] <70? 1: 0
([HR] >= 70) * ([HR] <100? 1: 0
[HR] >= 100? 1: 0
But it doesn’t work. Can you explain me, where will be my mistake and give me the corrected formula ?
Thanks in advance.
Kind Regards,
Peter
[HR] <70? 1: 0
([HR] >= 70) * ([HR] <100? 1: 0
[HR] >= 100? 1: 0
You are returning the value of 1 or 0 not true false
Start with 0 opacity for 3 overlapping identical images and for opacity
Green
[HR] <70? 100: 0
Yellow
( ([HR] >= 70) * ([HR] <100) ) ? 100 : 0
Red
[HR] >= 100 ? 100 : 0
Ron
Samsung Developer Relations
Hi Ron,
thank you very much, but I’m not able, to bring it in my watchface, as I want.
What is wrong, I made it acc. your post ?
Can you please check and give me the update form ?
Thanks,
Peter
Peter
Start with each image’s opacity as zero
not
[HR] >= 100? 1: 0
[HR] >= 100 ? 100 : 0
If the tag is mis-formed it will return zero so make sure you don’t have some other character by mistake
Ron
My plan was to display the heartbeat in various colours in Watch Face Studio:
0-70 bpm in green
70-100 bpm in yellow
More than 100 bpm in red
Thanks to Ron, it took a little time for me, but I found the working-solution
Green
([HR] <70? [HR] : “”)
Yellow
( ([HR] >= 70) * ([HR] <100) ) ? 100 : 0
Red
([HR] >= 100 ? [HR] : “”)
Here is the result:
Regards,
Peter