How to use the cflib.bootloader.Bootloader function in cflib

To help you get started, we’ve selected a few cflib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bitcraze / crazyflie-clients-python / src / cfloader / __init__.py View on Github external
[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"),
github bitcraze / crazyflie-clients-python / src / cfclient / ui / dialogs / bootloader.py View on Github external
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)
github bitcraze / crazyflie-clients-python / src / cfclient / ui / dialogs / cf1config.py View on Github external
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)