Page 1 of 1

Convert for GTR 4

Posted: 14 Jul 2024, 21:56
by mrbutthead
Hello. Please help me port this wf for GTR 4. The editor does not port the heart rate graph correctly.
https://amazfitwatchfaces.com/balance/view/597

Re: Convert for GTR 4

Posted: 15 Jul 2024, 03:14
by asoo
mrbutthead wrote: 14 Jul 2024, 21:56
Hello. Please help me port this wf for GTR 4. The editor does not port the heart rate graph correctly.
https://amazfitwatchfaces.com/balance/view/597
This watchface make "graph heart rate" by use "user_script.js" and "resume_call.js"
after you convert to GTR4, you must to edit user_script.js and add resume_call.js before pack

This is user_script.js for GTR4

Code: Select all

min_heart_txt = hmUI.createWidget(hmUI.widget.TEXT, {
x: 350,
y: 359,
w: 49,
h: 49,
text_size: 20,
text: '',
color: 0x000000,
align_h: hmUI.align.LEFT,
show_level: hmUI.show_level.ONLY_NORMAL,
});

max_heart_txt = hmUI.createWidget(hmUI.widget.TEXT, {
x: 350,
y: 316,
w: 49,
h: 49,
text_size: 20,
text: '',
color: 0x000000,
align_h: hmUI.align.LEFT,
show_level: hmUI.show_level.ONLY_NORMAL,
});
  
hmUI.createWidget(hmUI.widget.GRADKIENT_POLYLINE, {
x: 97,
y: 311,
w: 245,
h: 68,
line_color: 0xcc2124,
line_width: 3,

color_from: 0x7b1214,
color_to: 0x7b1214,
curve_style: true,
type: hmUI.data_type.HEART
});
This "resume_call.js" for GTR4

Code: Select all

HeartUpdate()
From the work you upload on the web,
I hope the next time you will be able to do it yourself.
Download
Understand before downloading
This watch face I made will not accept any further edit requests.
This dial has some elements that are different from the original.
You can bring this watchface to upload it on the web,
But if this dial has an original on this website, please request permission from the owner of the work before proceeding.
I will not take any responsibility. regarding actions that have not yet received consent from the owner of the work .
And please do not give credit to me
and please take responsibility for the work you upload yourself.
This watch face was not test on real device .
Therefore, users please manage the risk yourself.

If anyone wants to make additional changes to be compatible with your existing device, please do so yourself.

PS.
If the requester has not yet asked for permission from the owner of the work to adapt it. If the owner requests deletion, I will delete it immediately.


Modified sample file
Pilot540_GTR_4.zip
(140.02 KiB) Downloaded 80 times

Re: Convert for GTR 4

Posted: 15 Jul 2024, 08:30
by mrbutthead
@asoo Thanks for the wf and for the explanation of the code