From 879f8352a3446188b4685e4c56cae8af991240d4 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 16 Dec 2017 11:21:11 -0500 Subject: [PATCH] RTH: Discontinue ReturnHome smart shot The ReturnHome smart shot presents a number of reliability and safety issues. As such, its use is being discontinued and we're using ArduCopter RTL mode instead. If anything still happens to call the return home smart shot, it will immediately change to the ArduCopter RTL mode. --- shotmanager/returnHome.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/shotmanager/returnHome.py b/shotmanager/returnHome.py index 4f6cad6..bfa730a 100644 --- a/shotmanager/returnHome.py +++ b/shotmanager/returnHome.py @@ -76,6 +76,13 @@ class returnHomeShot(): # assign the shotManager object self.shotmgr = shotmgr + # Exit the shot and use RTL Mode + self.vehicle.mode = VehicleMode("RTL") + self.shotmgr.rcMgr.enableRemapping( false ) + return + + ########################################################## + # grab a copy of home self.homeLocation = self.shotmgr.getHomeLocation() @@ -253,7 +260,7 @@ class returnHomeShot(): def handleButton(self, button, event): # any Pause button press or release should get out of RTL - if button == btn_msg.ButtonLoiter and event == btn_msg.Press: + if button == btn_msg.ButtonLoiter and event == btn_msg.ClickRelease: #exit to fly self.shotmgr.enterShot(shots.APP_SHOT_NONE)