mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
Mi Band 8: Add realtime stats failsafe
This commit is contained in:
parent
fcf680f799
commit
76c2a18af5
@ -425,6 +425,12 @@ public class XiaomiHealthService extends AbstractXiaomiService {
|
||||
private void handleRealtimeStats(final XiaomiProto.RealTimeStats realTimeStats) {
|
||||
LOG.debug("Got realtime stats");
|
||||
|
||||
if (!realtimeOneShot && !realtimeStarted) {
|
||||
// Failsafe in case it gets out of sync, stop it
|
||||
enableRealtimeStats(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (realtimeOneShot) {
|
||||
if (realTimeStats.getHeartRate() <= 10) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user