mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-28 03:25:49 +01:00
A few fixes to the init sequence
This commit is contained in:
parent
8fd0e1f13f
commit
6f18a1dd73
@ -51,7 +51,7 @@ public class GetConfigurationOperation extends AbstractBTLEOperation<CasioGBX100
|
||||
operationStatus = OperationStatus.FINISHED;
|
||||
if (getDevice() != null) {
|
||||
try {
|
||||
TransactionBuilder builder = performInitialized("finishe operation");
|
||||
TransactionBuilder builder = performInitialized("finished operation");
|
||||
builder.wait(0);
|
||||
builder.setGattCallback(null); // unset ourselves from being the queue's gatt callback
|
||||
builder.queue(getQueue());
|
||||
|
@ -110,7 +110,16 @@ public class SetConfigurationOperation extends AbstractBTLEOperation<CasioGBX10
|
||||
data[i] = (byte)~data[i];
|
||||
}
|
||||
|
||||
if(Arrays.equals(oldData, data)) {
|
||||
// This allows changing month and day of birth on the watch
|
||||
// without having it overwritten on every sync
|
||||
boolean match = true;
|
||||
for(int i=0; i<8; i++) {
|
||||
if(data[i] != oldData[i]) {
|
||||
match = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(match) {
|
||||
LOG.info("No configuration update required");
|
||||
requestTargetSettings();
|
||||
} else {
|
||||
@ -179,9 +188,8 @@ public class SetConfigurationOperation extends AbstractBTLEOperation<CasioGBX10
|
||||
|
||||
operationStatus = OperationStatus.FINISHED;
|
||||
if (getDevice() != null) {
|
||||
unsetBusy();
|
||||
try {
|
||||
TransactionBuilder builder = performInitialized("finishe operation");
|
||||
TransactionBuilder builder = performInitialized("finished operation");
|
||||
builder.setGattCallback(null); // unset ourselves from being the queue's gatt callback
|
||||
builder.wait(0);
|
||||
builder.queue(getQueue());
|
||||
|
Loading…
Reference in New Issue
Block a user