From 384f8ad18421f312b17b99fe019e164d3b4fd5a0 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Thu, 28 Jan 2021 23:28:46 -0500 Subject: [PATCH] firmware_flasher: support bootloader v1 --- src/main/python/firmware_flasher.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/python/firmware_flasher.py b/src/main/python/firmware_flasher.py index 2f2fd77..a2b1c88 100644 --- a/src/main/python/firmware_flasher.py +++ b/src/main/python/firmware_flasher.py @@ -17,9 +17,6 @@ from util import tr, chunks, find_vial_devices, pad_for_vibl from vial_device import VialBootloader, VialKeyboard -BL_SUPPORTED_VERSION = 0 - - def send_retries(dev, data, retries=200): """ Sends usb packet up to 'retries' times, returns True if success, False if failed """ @@ -61,7 +58,7 @@ def cmd_flash(device, firmware, enable_insecure, log_cb, progress_cb, complete_c send_retries(device, pad_for_vibl(b"VC\x00")) ver = device.recv(8)[0] log_cb("* Bootloader version: {}".format(ver)) - if ver != BL_SUPPORTED_VERSION: + if ver not in [0, 1]: return error_cb("Error: Unsupported bootloader version") send_retries(device, pad_for_vibl(b"VC\x01"))