mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
less logspam
This commit is contained in:
parent
278d82e99a
commit
518241c3c9
2 changed files with 7 additions and 3 deletions
|
|
@ -374,13 +374,17 @@ class SoftwareUpdateService : JobIntentService(), Logging {
|
|||
throw DeviceRejectedException()
|
||||
|
||||
// Send all the blocks
|
||||
var oldProgress = -1 // used to limit # of log spam
|
||||
while (firmwareNumSent < 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
|
||||
sendProgress(context, firmwareNumSent * maxProgress / firmwareSize, isAppload)
|
||||
debug("sending block ${progress}%")
|
||||
if(progress != oldProgress) {
|
||||
debug("sending block ${progress}%")
|
||||
oldProgress = progress;
|
||||
}
|
||||
var blockSize = 512 - 3 // Max size MTU excluding framing
|
||||
|
||||
if (blockSize > firmwareStream.available())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue