mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 04:46:51 +01:00
adapt HuamiSupport to updated BLE Time handling
This commit is contained in:
parent
5097327234
commit
6cf079e55b
@ -427,9 +427,7 @@ public abstract class HuamiSupport extends AbstractBTLEDeviceSupport implements
|
||||
|
||||
public HuamiSupport setCurrentTimeWithService(TransactionBuilder builder) {
|
||||
GregorianCalendar now = BLETypeConversions.createCalendar();
|
||||
byte[] head = BLETypeConversions.calendarToRawBytes(now);
|
||||
byte[] tail = new byte[] { 0, BLETypeConversions.mapTimeZone(now, BLETypeConversions.TZ_FLAG_INCLUDE_DST_IN_TZ) };
|
||||
byte[] bytes = BLETypeConversions.join(head, tail);
|
||||
final byte[] bytes = getTimeBytes(now, TimeUnit.MINUTES);
|
||||
builder.write(getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_CURRENT_TIME), bytes);
|
||||
return this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user