diff --git a/cflib/crazyflie/platformservice.py b/cflib/crazyflie/platformservice.py index 8b96c214a..262587a25 100644 --- a/cflib/crazyflie/platformservice.py +++ b/cflib/crazyflie/platformservice.py @@ -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 @@ -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