power_switch

This class is used to turn the power of the Crazyflie on and off via a Crazyradio.


Classes

PowerSwitch

PowerSwitch(uri)

Class variables

BOOTLOADER_CMD_ALLOFF

BOOTLOADER_CMD_RESET

BOOTLOADER_CMD_RESET_INIT

BOOTLOADER_CMD_SYSOFF

BOOTLOADER_CMD_SYSON

Methods

def close(self)

def platform_power_down(self)

Power down the platform, both NRF and STM MCUs. Same as turning off the platform with the power button.


def reboot_to_bootloader(self)

Reboot the platform and start the bootloader


def reboot_to_fw(self)

Reboot the platform and start in firmware mode


def stm_power_cycle(self)

Restart the STM MCU by powering it off and on. Expansion decks will also be rebooted.


def stm_power_down(self)

Power down the STM MCU, the NRF will still be powered and handle basic radio communication. The STM can be restarted again remotely. Note: the power to expansion decks is also turned off.


def stm_power_up(self)

Power up (boot) the STM MCU and decks.