[+] Add current time decoder

This commit is contained in:
Azalea Gui
2023-01-24 10:44:59 -05:00
parent 6560546af0
commit 86ffa86609
@@ -0,0 +1,12 @@
package org.hydev.wearsync.bles.decoders
import com.welie.blessed.BluetoothBytesParser
import java.util.*
class CurrentTimeDecoder : IDecoder<Date>
{
override val sid = UUID.fromString("00001805-0000-1000-8000-00805f9b34fb")
override val cid = UUID.fromString("00002A2B-0000-1000-8000-00805f9b34fb")
override fun decode(value: ByteArray) = BluetoothBytesParser(value).dateTime
}