|
|
|
|
142
|
upload_port = _GetUploadPort(env) # Serial port to use
|
142
|
upload_port = _GetUploadPort(env) # Serial port to use
|
143
|
|
143
|
|
144
|
# Set local upload params
|
144
|
# Set local upload params
|
145
|
- upload_firmware_target_name = os.path.basename(upload_firmware_source_name) # WARNING! Need rework on "binary_stream" to allow filename > 8.3
|
|
|
|
|
145
|
+ upload_firmware_target_name = os.path.basename(upload_firmware_source_name)
|
146
|
# Target firmware filename
|
146
|
# Target firmware filename
|
147
|
upload_timeout = 1000 # Communication timout, lossy/slow connections need higher values
|
147
|
upload_timeout = 1000 # Communication timout, lossy/slow connections need higher values
|
148
|
upload_blocksize = 512 # Transfer block size. 512 = Autodetect
|
148
|
upload_blocksize = 512 # Transfer block size. 512 = Autodetect
|
|
|
|
|
154
|
# Set local upload params based on board type to change script behavior
|
154
|
# Set local upload params based on board type to change script behavior
|
155
|
# "upload_delete_old_bins": delete all *.bin files in the root of SD Card
|
155
|
# "upload_delete_old_bins": delete all *.bin files in the root of SD Card
|
156
|
upload_delete_old_bins = marlin_motherboard in ['BOARD_CREALITY_V4', 'BOARD_CREALITY_V4210', 'BOARD_CREALITY_V422', 'BOARD_CREALITY_V423',
|
156
|
upload_delete_old_bins = marlin_motherboard in ['BOARD_CREALITY_V4', 'BOARD_CREALITY_V4210', 'BOARD_CREALITY_V422', 'BOARD_CREALITY_V423',
|
157
|
- 'BOARD_CREALITY_V427', 'BOARD_CREALITY_V431', 'BOARD_CREALITY_V452', 'BOARD_CREALITY_V453',
|
|
|
|
|
157
|
+ 'BOARD_CREALITY_V427', 'BOARD_CREALITY_V431', 'BOARD_CREALITY_V452', 'BOARD_CREALITY_V453',
|
158
|
'BOARD_CREALITY_V24S1']
|
158
|
'BOARD_CREALITY_V24S1']
|
159
|
# "upload_random_name": generate a random 8.3 firmware filename to upload
|
159
|
# "upload_random_name": generate a random 8.3 firmware filename to upload
|
160
|
upload_random_filename = marlin_motherboard in ['BOARD_CREALITY_V4', 'BOARD_CREALITY_V4210', 'BOARD_CREALITY_V422', 'BOARD_CREALITY_V423',
|
160
|
upload_random_filename = marlin_motherboard in ['BOARD_CREALITY_V4', 'BOARD_CREALITY_V4210', 'BOARD_CREALITY_V422', 'BOARD_CREALITY_V423',
|
161
|
- 'BOARD_CREALITY_V427', 'BOARD_CREALITY_V431', 'BOARD_CREALITY_V452', 'BOARD_CREALITY_V453',
|
|
|
|
|
161
|
+ 'BOARD_CREALITY_V427', 'BOARD_CREALITY_V431', 'BOARD_CREALITY_V452', 'BOARD_CREALITY_V453',
|
162
|
'BOARD_CREALITY_V24S1'] and not marlin_long_filename_host_support
|
162
|
'BOARD_CREALITY_V24S1'] and not marlin_long_filename_host_support
|
163
|
|
163
|
|
164
|
try:
|
164
|
try:
|
|
|
|
|
258
|
print('Trigger firmware update...')
|
258
|
print('Trigger firmware update...')
|
259
|
protocol.send_ascii('M997', True)
|
259
|
protocol.send_ascii('M997', True)
|
260
|
|
260
|
|
261
|
- protocol: protocol.shutdown()
|
|
|
|
|
261
|
+ protocol.shutdown()
|
262
|
print('Firmware update completed')
|
262
|
print('Firmware update completed')
|
263
|
|
263
|
|
264
|
except KeyboardInterrupt:
|
264
|
except KeyboardInterrupt:
|