Zepp OS: Fetch HR stats and sleep respiratory rate in normal builds

This commit is contained in:
José Rebelo
2025-03-23 16:15:13 +00:00
parent 8d1b321950
commit 160027d756
2 changed files with 15 additions and 12 deletions
@@ -522,6 +522,11 @@ public abstract class ZeppOsCoordinator extends HuamiCoordinator {
return false;
}
@Override
public boolean supportsTemperatureMeasurement() {
return false; // TODO: supportsDisplayItem(device, "temperature");
}
public boolean supportsAgpsUpdates() {
return true;
}
@@ -1718,20 +1718,18 @@ public abstract class HuamiSupport extends AbstractBTLEDeviceSupport implements
this.fetchOperationQueue.add(new FetchHrvOperation(this));
}
if (ZeppOsCoordinator.experimentalFeatures(getDevice())) {
if ((dataTypes & RecordedDataTypes.TYPE_HEART_RATE) != 0 && coordinator.supportsHeartRateStats()) {
this.fetchOperationQueue.add(new FetchHeartRateManualOperation(this));
this.fetchOperationQueue.add(new FetchHeartRateMaxOperation(this));
this.fetchOperationQueue.add(new FetchHeartRateRestingOperation(this));
}
if ((dataTypes & RecordedDataTypes.TYPE_HEART_RATE) != 0 && coordinator.supportsHeartRateStats()) {
this.fetchOperationQueue.add(new FetchHeartRateManualOperation(this));
this.fetchOperationQueue.add(new FetchHeartRateMaxOperation(this));
this.fetchOperationQueue.add(new FetchHeartRateRestingOperation(this));
}
if ((dataTypes & RecordedDataTypes.TYPE_SLEEP_RESPIRATORY_RATE) != 0 && coordinator.supportsSleepRespiratoryRate()) {
this.fetchOperationQueue.add(new FetchSleepRespiratoryRateOperation(this));
}
if ((dataTypes & RecordedDataTypes.TYPE_SLEEP_RESPIRATORY_RATE) != 0 && coordinator.supportsSleepRespiratoryRate()) {
this.fetchOperationQueue.add(new FetchSleepRespiratoryRateOperation(this));
}
if ((dataTypes & RecordedDataTypes.TYPE_TEMPERATURE) != 0) {
this.fetchOperationQueue.add(new FetchTemperatureOperation(this));
}
if ((dataTypes & RecordedDataTypes.TYPE_TEMPERATURE) != 0 && coordinator.supportsTemperatureMeasurement()) {
this.fetchOperationQueue.add(new FetchTemperatureOperation(this));
}
if ((dataTypes & RecordedDataTypes.TYPE_SLEEP) != 0 && coordinator.supportsSleepScore(gbDevice)) {