Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
[target, type] = t.split("-")
if target in targetnames:
targetnames[target] += (type,)
else:
targetnames[target] = (type,)
else:
print("Action", sys.argv[0], "unknown!")
link.close()
sys.exit(-1)
# Currently there's two different targets available
targets = ()
try:
# Initialise the bootloader lib
bl = Bootloader(clink)
#########################################
# Get the connection with the bootloader
#########################################
# The connection is done by reseting to the bootloader (default)
if boot == "reset":
print("Reset to bootloader mode ..."),
sys.stdout.flush()
if bl.start_bootloader(warm_boot=True):
print(" done!")
else:
print("Failed to warmboot")
bl.close()
sys.exit(-1)
else: # The connection is done by a cold boot ...
print("Restart the Crazyflie you want to bootload in the next"),
def __init__(self):
super(CrazyloadThread, self).__init__()
self._bl = Bootloader()
self._bl.progress_cb = self.statusChanged.emit
# Make sure that the signals are handled by this thread event loop
self.moveToThread(self)
self.program.connect(self.programAction)
self.initiateColdBootSignal.connect(self.initiateColdBoot)
self.resetCopterSignal.connect(self.resetCopter)
def __init__(self):
super(CrazyloadThread, self).__init__()
# Make sure that the signals are handled by this thread event loop
self.moveToThread(self)
self._bl = Bootloader()
self._bl.progress_cb = self.statusChanged.emit
self.writeConfigSignal.connect(self.writeConfigAction)
self.initiateColdBootSignal.connect(self.initiateColdBoot)
self.resetCopterSignal.connect(self.resetCopter)