• Administrator
  •  
    Support Ukraine
    If you experience any problems with the forum (it is not visible, there is no way to post messages, or some functionality does not work), please let us know. If you have problems with registration or you did not receive confirmation letter, let us know and we will activate your account manually.
    If you get an "The submitted form was invalid. Try submitting again" error, delete cookies, then try again.
     

Battery Drain & Compass Control on T-Rex 3 (Zepp OS)

Topics for the request of watch faces development.

Moderators: asoo, Watchmens

Forum rules
When adding a new topic, use the template: Topic title [device name]
For example: Requesting creation of watch face [T-Rex Pro]
All communication in this branch should only be in English.
Post Reply
jimibamper
Posts: 2
Joined: 19 Mar 2026, 19:18
Location: Ukraine
Contact:

Battery Drain & Compass Control on T-Rex 3 (Zepp OS)

Post by jimibamper »

Hi everyone! I'm working on a watch face for the T-Rex 3 and I'm facing a battery drain issue because the compass is constantly active.

Is there a way to implement a 'tap-to-toggle' feature to turn the compass (magnetometer) on/off? Or perhaps a way to set its update interval to save battery life? If anyone has experience with this in Zepp OS, I would appreciate any tips or code snippets. Thanks!
User avatar
asoo
Posts: 2110
Joined: 03 Jan 2019, 01:48
Location: ͼͽ Thailand ͼͽ
Has thanked: 405 times
Been thanked: 2024 times

Post by asoo »

jimibamper wrote: 27 Mar 2026, 06:23
Hi everyone! I'm working on a watch face for the T-Rex 3 and I'm facing a battery drain issue because the compass is constantly active.

Is there a way to implement a 'tap-to-toggle' feature to turn the compass (magnetometer) on/off? Or perhaps a way to set its update interval to save battery life? If anyone has experience with this in Zepp OS, I would appreciate any tips or code snippets. Thanks!

I'm not sure how you scripted the compass to run constantly, but if you're using Sasha's editor, I don't think the power consumption to much is due to the compass itself.

Because the editor already has this script to control on/off widget compass

Code: Select all

pause_call: (function () {
console.log('pause_call()');
if (compass) compass.stop();
}),

resume_call: (function () {
console.log('resume_call()');
if (compass && screenType == hmSetting.screen_type.WATCHFACE) compass.start();
}),
This means that when your screen is off or you're not on the main screen, the compass will stop working immediately and will resume when the screen is on again or you return to the main screen.

I think the high power consumption might be due to other widgets, or you might be using many widgets on your watchface, or in the AOD you might be calling seconds. I can only speculate because you haven't provided a project for further investigation.

Or, if you're sure the problem is actually with the compass, you could create buttons to disable or enable the functions:
compass.stop()
compass.start()
yourself, without having to use them through:
pause_call:
resume_call:

Examples of using the compass on/off button :
compassstopT3.zip
(10.65 KiB) Downloaded 27 times

If you are using Sasha's editor to create a compass widget and want to switch to a direct compass on/off control button,
remember to remove the controls in resume_call and pause_call

Code: Select all


-------------------------------- resume and pause in index.js  --------------------------------------------
resume_call: (function () {
console.log('resume_call()');
// if (compass && screenType == hmSetting.screen_type.WATCHFACE) compass.start(); // remove this line

}),
pause_call: (function () {
console.log('pause_call()');
// if (compass) compass.stop(); // remove this line

}),
However, in my testing, even though the power button can be used to turn it off compass, after the screen is off for a while and then turns back on, sometime the compass will turn on . I'm not sure what causes it, but this happens rarely.

Therefore, I think "resume_call" and "pause_call" are the most appropriate solutions.
ͼͽ To request please use the interrelated forum in action ͼͽ
Please do not PM to me for requests ported watchface.
jimibamper
Posts: 2
Joined: 19 Mar 2026, 19:18
Location: Ukraine
Contact:

Post by jimibamper »

Thank you very much for your answer!
Post Reply

Return to “Watchfaces creation (order table)”

Who is online

Users browsing this forum: No registered users and 1 guest