mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
turn on Jetpack Compose for GUI building
This commit is contained in:
parent
ff1d7733a4
commit
6d4e0e0184
9 changed files with 56 additions and 11 deletions
|
|
@ -43,17 +43,15 @@ class SoftwareUpdateService : JobIntentService() {
|
|||
lateinit var firmwareStream: InputStream
|
||||
|
||||
fun startUpdate() {
|
||||
if (updateService != null) {
|
||||
totalSizeDesc = updateService.getCharacteristic(SW_UPDATE_TOTALSIZE_CHARACTER)!!
|
||||
|
||||
firmwareStream = assets.open("firmware.bin")!!
|
||||
firmwareStream = assets.open("firmware.bin")
|
||||
|
||||
// Start the update by writing the # of bytes in the image
|
||||
val numBytes = firmwareStream.available()
|
||||
assert(totalSizeDesc.setValue(numBytes, BluetoothGattCharacteristic.FORMAT_UINT32, 0))
|
||||
assert(updateGatt.writeCharacteristic(totalSizeDesc))
|
||||
assert(updateGatt.readCharacteristic(totalSizeDesc))
|
||||
}
|
||||
}
|
||||
|
||||
// Send the next block of our file to the device
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue