nrfutil clean up
This commit is contained in:
1 parent
396bf432a9
commit
fae7998836
4 files changed
+12
-9
No files matched your search
Binary file not shown.
@@ -244,8 +244,13 @@ global_bar = None
|
||||
|
||||
def update_progress(progress=0, done=False, log_message=""):
|
||||
del done, log_message # Unused parameters
|
||||
if global_bar:
|
||||
global_bar.update(max(1, progress))
|
||||
global global_bar
|
||||
|
||||
if global_bar is None:
|
||||
with click.progressbar(length=100) as bar:
|
||||
global_bar = bar
|
||||
|
||||
global_bar.update(max(1, progress))
|
||||
|
||||
|
||||
@dfu.command(short_help="Program a device with bootloader that support serial DFU")
|
||||
@@ -276,10 +281,7 @@ def serial(package, port, baudrate, flowcontrol):
|
||||
.format(package, port, "enabled" if flowcontrol else "disabled"))
|
||||
|
||||
try:
|
||||
with click.progressbar(length=100) as bar:
|
||||
global global_bar
|
||||
global_bar = bar
|
||||
dfu.dfu_send_images()
|
||||
dfu.dfu_send_images()
|
||||
|
||||
except Exception as e:
|
||||
click.echo("")
|
||||
|
||||
@@ -195,8 +195,9 @@ class Dfu(object):
|
||||
bootloader_size,
|
||||
application_size)
|
||||
|
||||
logger.info("Sending DFU start packet, afterwards we wait for the flash on "
|
||||
"target to be initialized before continuing.")
|
||||
#logger.info("Sending DFU start packet, afterwards we wait for the flash on "
|
||||
# "target to be initialized before continuing.")
|
||||
logger.info("Sending DFU start packet")
|
||||
self.dfu_transport.send_start_dfu(program_mode, softdevice_size, bootloader_size,
|
||||
application_size)
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ class DfuTransportSerial(DfuTransport):
|
||||
# nrf52 will erase the bank 0 up to Application size & Transfer App size from bank1 to bank0
|
||||
# There must a enough delay before finished to prevent Arduino IDE reopen Serial Monitor
|
||||
|
||||
logger.info("Activating new firmware")
|
||||
logger.info("\nActivating new firmware")
|
||||
#logger.info("Wait after Init Packet %s second", self.get_activate_wait_time())
|
||||
time.sleep( self.get_activate_wait_time() )
|
||||
|
||||
|
||||
Reference in new issue
Block a user