From 5d27d83c77cc015d6a0e3decfde672e43c82159c Mon Sep 17 00:00:00 2001 From: GHGiampy <83699429+GHGiampy@users.noreply.github.com> Date: Sat, 5 Feb 2022 17:23:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Clean=20up=20upload.py=20(#23679?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/scripts/upload.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/buildroot/share/scripts/upload.py b/buildroot/share/scripts/upload.py index f6b25396adad..c7730d8f299d 100644 --- a/buildroot/share/scripts/upload.py +++ b/buildroot/share/scripts/upload.py @@ -142,7 +142,7 @@ def _RemoveFirmwareFile(FirmwareFile): upload_port = _GetUploadPort(env) # Serial port to use # Set local upload params - upload_firmware_target_name = os.path.basename(upload_firmware_source_name) # WARNING! Need rework on "binary_stream" to allow filename > 8.3 + upload_firmware_target_name = os.path.basename(upload_firmware_source_name) # Target firmware filename upload_timeout = 1000 # Communication timout, lossy/slow connections need higher values upload_blocksize = 512 # Transfer block size. 512 = Autodetect @@ -154,11 +154,11 @@ def _RemoveFirmwareFile(FirmwareFile): # Set local upload params based on board type to change script behavior # "upload_delete_old_bins": delete all *.bin files in the root of SD Card upload_delete_old_bins = marlin_motherboard in ['BOARD_CREALITY_V4', 'BOARD_CREALITY_V4210', 'BOARD_CREALITY_V422', 'BOARD_CREALITY_V423', - 'BOARD_CREALITY_V427', 'BOARD_CREALITY_V431', 'BOARD_CREALITY_V452', 'BOARD_CREALITY_V453', + 'BOARD_CREALITY_V427', 'BOARD_CREALITY_V431', 'BOARD_CREALITY_V452', 'BOARD_CREALITY_V453', 'BOARD_CREALITY_V24S1'] # "upload_random_name": generate a random 8.3 firmware filename to upload upload_random_filename = marlin_motherboard in ['BOARD_CREALITY_V4', 'BOARD_CREALITY_V4210', 'BOARD_CREALITY_V422', 'BOARD_CREALITY_V423', - 'BOARD_CREALITY_V427', 'BOARD_CREALITY_V431', 'BOARD_CREALITY_V452', 'BOARD_CREALITY_V453', + 'BOARD_CREALITY_V427', 'BOARD_CREALITY_V431', 'BOARD_CREALITY_V452', 'BOARD_CREALITY_V453', 'BOARD_CREALITY_V24S1'] and not marlin_long_filename_host_support try: @@ -258,7 +258,7 @@ def _RemoveFirmwareFile(FirmwareFile): print('Trigger firmware update...') protocol.send_ascii('M997', True) - protocol: protocol.shutdown() + protocol.shutdown() print('Firmware update completed') except KeyboardInterrupt: