• Amministratore
  •  
    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.

Moderatori: asoo, Watchmens

Regole del forum
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.
Rispondi
jimibamper
Messaggi: 2
Iscritto il: 19 mar 2026, 19:18
Località: Ukraine
Contatta:

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

Messaggio da 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!
Avatar utente
asoo
Messaggi: 2110
Iscritto il: 03 gen 2019, 01:48
Località: ͼͽ Thailand ͼͽ
Has thanked: 405 times
Been thanked: 2024 times

Messaggio da asoo »

jimibamper ha scritto: 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

Codice: Seleziona tutto

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) Scaricato 27 volte

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

Codice: Seleziona tutto


-------------------------------- 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
Messaggi: 2
Iscritto il: 19 mar 2026, 19:18
Località: Ukraine
Contatta:

Messaggio da jimibamper »

Thank you very much for your answer!
Rispondi

Torna a “Watchfaces creation (order table)”

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite