1.1.9 spiffs firmware update seems to work

This commit is contained in:
Kevin Hester
2020-11-20 07:51:25 +08:00
parent 88b1ad5443
commit 6e2cb723ea
2 changed files with 8 additions and 4 deletions

View File

@@ -25,13 +25,13 @@ android {
}
} */
compileSdkVersion 29
buildToolsVersion "30.0.1" // Note: 30.0.0.2 doesn't yet work on Github actions CI
buildToolsVersion "30.0.2" // Note: 30.0.0.2 doesn't yet work on Github actions CI
defaultConfig {
applicationId "com.geeksville.mesh"
minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works)
targetSdkVersion 29
versionCode 20108 // format is Mmmss (where M is 1+the numeric major number
versionName "1.1.8"
versionCode 20109 // format is Mmmss (where M is 1+the numeric major number
versionName "1.1.9"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {

View File

@@ -349,7 +349,11 @@ class SoftwareUpdateService : JobIntentService(), Logging {
// Send all the blocks
while (firmwareNumSent < firmwareSize) {
progress = firmwareNumSent * 100 / firmwareSize
// If we are doing the spiffs partition, we limit progress to a max of 50%, so that the user doesn't think we are done
// yet
val maxProgress = if(flashRegion != FLASH_REGION_APPLOAD)
50 else 100
progress = firmwareNumSent * maxProgress / firmwareSize
debug("sending block ${progress}%")
var blockSize = 512 - 3 // Max size MTU excluding framing