1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-27 20:36:51 +01:00

Allow firmware files up to 1.5MB

This helps some experiments
This commit is contained in:
Andreas Shimokawa 2017-12-21 09:40:47 +01:00
parent ad750c0047
commit f6b183d39a
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ public abstract class AbstractMiBandFWHelper {
} }
try (InputStream in = new BufferedInputStream(uriHelper.openInputStream())) { try (InputStream in = new BufferedInputStream(uriHelper.openInputStream())) {
this.fw = FileUtils.readAll(in, 1024 * 1024); // 1 MB this.fw = FileUtils.readAll(in, 1024 * 1536); // 1.5 MB
determineFirmwareInfo(fw); determineFirmwareInfo(fw);
} catch (IOException ex) { } catch (IOException ex) {
throw ex; // pass through throw ex; // pass through

View File

@ -17,7 +17,7 @@ import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
@Ignore("Disabled for travis -- needs vm parameter -DMiFirmwareDir=/path/to/firmware/directory/") @Ignore("Disabled for travis -- needs vm parameter -DMiFirmwareDir=/path/to/firmware/directory/")
public class FirmwareTest { public class FirmwareTest {
private static final long MAX_FILE_SIZE_BYTES = 1024 * 1024; // 1MB private static final long MAX_FILE_SIZE_BYTES = 1024 * 1536; // 1.5MB
private static final int MI_FW_VERSION = 0; // FIXME private static final int MI_FW_VERSION = 0; // FIXME
private static final int MI1A_FW_VERSION = 0; // FIXME private static final int MI1A_FW_VERSION = 0; // FIXME
private static final int MI1S_FW1_VERSION = 0; private static final int MI1S_FW1_VERSION = 0;