HPlus: Set date and time on connect
This commit is contained in:
parent
9a338c9bae
commit
9dd5967f4e
|
@ -106,6 +106,9 @@ public class HPlusSupport extends AbstractBTLEDeviceSupport {
|
||||||
|
|
||||||
//Initialize device
|
//Initialize device
|
||||||
setInitValues(builder);
|
setInitValues(builder);
|
||||||
|
setCurrentDate(builder);
|
||||||
|
setCurrentTime(builder);
|
||||||
|
|
||||||
syncPreferences(builder);
|
syncPreferences(builder);
|
||||||
|
|
||||||
builder.notify(getCharacteristic(HPlusConstants.UUID_CHARACTERISTIC_MEASURE), true);
|
builder.notify(getCharacteristic(HPlusConstants.UUID_CHARACTERISTIC_MEASURE), true);
|
||||||
|
@ -233,7 +236,7 @@ public class HPlusSupport extends AbstractBTLEDeviceSupport {
|
||||||
HPlusConstants.COMMAND_SET_PREF_DATE,
|
HPlusConstants.COMMAND_SET_PREF_DATE,
|
||||||
(byte) ((year / 256) & 0xff),
|
(byte) ((year / 256) & 0xff),
|
||||||
(byte) (year % 256),
|
(byte) (year % 256),
|
||||||
(byte) (month),
|
(byte) (month + 1),
|
||||||
(byte) (day)
|
(byte) (day)
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue