How to use the odrive.dfuse.DfuState.DfuState function in odrive

To help you get started, we’ve selected a few odrive 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 madcowswe / ODrive / tools / odrive / dfuse / DfuDevice.py View on Github external
def set_address_safe(self, addr):
        self.set_address(addr)
        status = self.wait_while_state(DfuState.DFU_DOWNLOAD_BUSY)
        if status[1] != DfuState.DFU_DOWNLOAD_IDLE:
            raise RuntimeError("An error occured. Device Status: {!r}".format(status))
        # take device out of DFU_DOWNLOAD_SYNC and into DFU_IDLE
        self.abort()
        status = self.wait_while_state(DfuState.DFU_DOWNLOAD_SYNC)
        if status[1] != DfuState.DFU_IDLE:
            raise RuntimeError("An error occured. Device Status: {!r}".format(status))
github madcowswe / ODrive / tools / odrive / dfuse / DfuDevice.py View on Github external
def set_address_safe(self, addr):
        self.set_address(addr)
        status = self.wait_while_state(DfuState.DFU_DOWNLOAD_BUSY)
        if status[1] != DfuState.DFU_DOWNLOAD_IDLE:
            raise RuntimeError("An error occured. Device Status: {!r}".format(status))
        # take device out of DFU_DOWNLOAD_SYNC and into DFU_IDLE
        self.abort()
        status = self.wait_while_state(DfuState.DFU_DOWNLOAD_SYNC)
        if status[1] != DfuState.DFU_IDLE:
            raise RuntimeError("An error occured. Device Status: {!r}".format(status))
github madcowswe / ODrive / tools / odrive / dfuse / DfuDevice.py View on Github external
def set_address_safe(self, addr):
        self.set_address(addr)
        status = self.wait_while_state(DfuState.DFU_DOWNLOAD_BUSY)
        if status[1] != DfuState.DFU_DOWNLOAD_IDLE:
            raise RuntimeError("An error occured. Device Status: {!r}".format(status))
        # take device out of DFU_DOWNLOAD_SYNC and into DFU_IDLE
        self.abort()
        status = self.wait_while_state(DfuState.DFU_DOWNLOAD_SYNC)
        if status[1] != DfuState.DFU_IDLE:
            raise RuntimeError("An error occured. Device Status: {!r}".format(status))