Skip to content

Commit

Permalink
Added message for doing crash recovery request to the supervisor.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoggy committed Feb 20, 2024
1 parent 7599d54 commit 342bc20
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cflib/crazyflie/platformservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

PLATFORM_SET_CONT_WAVE = 0
PLATFORM_REQUEST_ARMING = 1
PLATFORM_REQUEST_CRASH_RECOVERY = 2

VERSION_GET_PROTOCOL = 0
VERSION_GET_FIRMWARE = 1
Expand Down Expand Up @@ -99,6 +100,16 @@ def send_arming_request(self, do_arm: bool):
pk.data = (PLATFORM_REQUEST_ARMING, do_arm)
self._cf.send_packet(pk)

def send_crash_recovery_request(self):
"""
Send crash recovery request
"""
pk = CRTPPacket()
pk.set_header(CRTPPort.PLATFORM, PLATFORM_COMMAND)
pk.data = (PLATFORM_REQUEST_CRASH_RECOVERY, )
self._cf.send_packet(pk)

def get_protocol_version(self):
"""
Return version of the CRTP protocol
Expand Down

0 comments on commit 342bc20

Please sign in to comment.