Merge remote-tracking branch 'origin/master' into dlech

This commit is contained in:
David Lechner
2021-08-13 10:46:01 -05:00
6 changed files with 51 additions and 19 deletions
+4 -2
View File
@@ -55,6 +55,7 @@ import {
import { RootState } from '../reducers';
import { defined, hex, maybe } from '../utils';
import { fmod, sumComplement32 } from '../utils/math';
import { isAndroid } from '../utils/os';
import {
FailToFinishReasonType,
FlashFirmwareActionType,
@@ -376,8 +377,9 @@ function* flashFirmware(action: FlashFirmwareFlashAction): Generator {
yield* disconnectAndCancel();
}
// 14 is "safe" size for all hubs
const maxDataSize = MaxProgramFlashSize.get(info.hubType) || 14;
// 14 is "safe" size for all hubs and Android
const maxDataSize =
(!isAndroid() && MaxProgramFlashSize.get(info.hubType)) || 14;
let runningChecksum = 0xff;