From 5bcd4963652fb547af555935e0a8ad7fdb170838 Mon Sep 17 00:00:00 2001
From: Paul Beuchat <beuchatp@control.ee.ethz.ch>
Date: Mon, 27 Apr 2020 20:19:45 +0200
Subject: [PATCH] Fixed error in CrazyRadio python node due to still invovling
 wrong send to commander function

---
 dfall_ws/src/dfall_pkg/crazyradio/CrazyRadio.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dfall_ws/src/dfall_pkg/crazyradio/CrazyRadio.py b/dfall_ws/src/dfall_pkg/crazyradio/CrazyRadio.py
index c202a391..ca3dd25a 100755
--- a/dfall_ws/src/dfall_pkg/crazyradio/CrazyRadio.py
+++ b/dfall_ws/src/dfall_pkg/crazyradio/CrazyRadio.py
@@ -221,7 +221,7 @@ class CrazyRadioClient:
 
     def disconnect(self):
         print "[CRAZY RADIO] sending Motors OFF command before disconnecting"
-        self._send_to_commander_motor(0, 0, 0, 0)
+        cf_client._send_to_commander(0, 0, 0, 0, CF_ONBOARD_CONTROLLER_MODE_OFF, 0, CF_ONBOARD_CONTROLLER_MODE_OFF, 0, CF_ONBOARD_CONTROLLER_MODE_OFF, 0, CF_ONBOARD_CONTROLLER_MODE_OFF, 0)
         # change state to motors OFF
         msg = IntWithHeader()
         msg.shouldCheckForAgentID = False
@@ -811,7 +811,7 @@ if __name__ == '__main__':
     rospy.loginfo("[CRAZY RADIO] Turning off crazyflie")
 
     # Send the motors off command
-    cf_client._send_to_commander_motor(0, 0, 0, 0)
+    cf_client._send_to_commander(0, 0, 0, 0, CF_ONBOARD_CONTROLLER_MODE_OFF, 0, CF_ONBOARD_CONTROLLER_MODE_OFF, 0, CF_ONBOARD_CONTROLLER_MODE_OFF, 0, CF_ONBOARD_CONTROLLER_MODE_OFF, 0)
 
     # Send a "Motors OFF" on behalf of the "FlyingAgentClient"
     # > This serves the purpose of changing the flying state
-- 
GitLab