1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-20 03:50:43 +02:00

Huami: Fetch SpO2 on devices that support it

This commit is contained in:
José Rebelo 2024-01-09 17:43:43 +00:00
parent 5e6d18d413
commit aeec68aeef

View File

@ -1686,11 +1686,11 @@ public abstract class HuamiSupport extends AbstractBTLEDeviceSupport implements
this.fetchOperationQueue.add(new FetchPaiOperation(this));
}
if (Huami2021Coordinator.experimentalFeatures(getDevice())) {
if ((dataTypes & RecordedDataTypes.TYPE_SPO2) != 0 && coordinator.supportsSpo2()) {
this.fetchOperationQueue.add(new FetchSpo2NormalOperation(this));
}
if ((dataTypes & RecordedDataTypes.TYPE_SPO2) != 0 && coordinator.supportsSpo2()) {
this.fetchOperationQueue.add(new FetchSpo2NormalOperation(this));
}
if (Huami2021Coordinator.experimentalFeatures(getDevice())) {
if ((dataTypes & RecordedDataTypes.TYPE_HEART_RATE) != 0 && coordinator.supportsHeartRateStats()) {
this.fetchOperationQueue.add(new FetchHeartRateManualOperation(this));
this.fetchOperationQueue.add(new FetchHeartRateMaxOperation(this));