From e6e65aee2c2fe3af4df57ebb544f54f252f87c17 Mon Sep 17 00:00:00 2001 From: Amir Aryanpour Date: Sat, 4 Jan 2020 15:07:46 +0000 Subject: [PATCH] File size changed --- code/Dialog_text.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/Dialog_text.py b/code/Dialog_text.py index 4afec82..6e95aa0 100644 --- a/code/Dialog_text.py +++ b/code/Dialog_text.py @@ -516,7 +516,7 @@ def choose_img(self): Select the firmware Select the firmware, copy the user's firmware to the current working directory, and calculate the SHA256 value of the file, and verify whether the file is Dout, - and the firmware size is less than 508k, + and the firmware size is less than 608k, and whether it is a ".bin "file :return: """ @@ -554,19 +554,19 @@ def choose_img(self): QMessageBox.information( self, "ERROR", - "Firmware file cannot be greater than 508k; The firmware must be Dout", + "Firmware file cannot be greater than 608k; The firmware must be Dout", QMessageBox.Yes, QMessageBox.Yes) def get_file_to_work(self, bin_file): """ calculate the SHA256 value of the file, and verify whether the file is Dout, - and the firmware size is less than 508k, + and the firmware size is less than 608k, """ try: with open(bin_file, 'rb') as file_obj: b = bytearray(file_obj.read()) - if (b[2] == 3)and(len(b) < 508000): + if (b[2] == 3)and(len(b) < 608000): file_obj.seek(0, 0) img = file_obj.read() else: