mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
SBM67: change the persisting logic
It looks like the 'NOT_CONNECTED' state does not get intercepted, change it to 'CONNECTING' as Gadgetbridge will attempt a reconnection immediately after disconnect
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ public class GenericBloodPressureSupport extends AbstractBTLESingleDeviceSupport
|
|||||||
final GBDevice.DeviceUpdateSubject subject = (GBDevice.DeviceUpdateSubject) intent.getSerializableExtra(GBDevice.EXTRA_UPDATE_SUBJECT);
|
final GBDevice.DeviceUpdateSubject subject = (GBDevice.DeviceUpdateSubject) intent.getSerializableExtra(GBDevice.EXTRA_UPDATE_SUBJECT);
|
||||||
|
|
||||||
if (GBDevice.DeviceUpdateSubject.CONNECTION_STATE.equals(subject) &&
|
if (GBDevice.DeviceUpdateSubject.CONNECTION_STATE.equals(subject) &&
|
||||||
GBDevice.State.NOT_CONNECTED.equals(gbDevice.getState()) &&
|
GBDevice.State.CONNECTING.equals(gbDevice.getState()) &&
|
||||||
!measurements.isEmpty()) {
|
!measurements.isEmpty()) {
|
||||||
// This particular device disconnects automatically once the transfer is finished, hence this method of persisting the samples works, but it's far from ideal
|
// This particular device disconnects automatically once the transfer is finished, hence this method of persisting the samples works, but it's far from ideal
|
||||||
persistMeasurements();
|
persistMeasurements();
|
||||||
|
|||||||
Reference in New Issue
Block a user