From 276efaa94ae2d99aeca63a2c0b0752132e381560 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 16 Dec 2017 11:14:30 -0500 Subject: [PATCH] RC: Use ArduCopter throttle failsafe correctly This ensures that if the RC control is lost, the throttle channel will drop below the ArduCopter FS_THR_VALUE in both the 3DR ArduCopter releases and the ArduCopter master releases. the PixRC file in SoloLink does the same thing, so this is kind of redundent. --- shotmanager/rcManager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shotmanager/rcManager.py b/shotmanager/rcManager.py index 6d9d141..1b232f0 100644 --- a/shotmanager/rcManager.py +++ b/shotmanager/rcManager.py @@ -43,7 +43,7 @@ CHANNEL8_MIN = 0 CHANNEL8_MAX = 1000 CHANNEL8_MID = ( CHANNEL8_MAX - CHANNEL8_MIN ) / 2.0 + CHANNEL8_MIN -THROTTLE_FAILSAFE = 950 +THROTTLE_FAILSAFE = 900 DEAD_ZONE = 0.009 TICKS_UNTIL_RC_STALE = 20 # ticks @@ -132,7 +132,7 @@ class rcManager(): def remap(self): if self.failsafe or self.channels == None: # send default values to the Pixhawk - self.channels = [DEFAULT_RC_MID, DEFAULT_RC_MID, DEFAULT_RC_MID, DEFAULT_RC_MID, DEFAULT_RC_MIN, CHANNEL6_MAX, DEFAULT_RC_MIN, CHANNEL8_MID ] + self.channels = [DEFAULT_RC_MID, DEFAULT_RC_MID, THROTTLE_FAILSAFE, DEFAULT_RC_MID, DEFAULT_RC_MIN, CHANNEL6_MAX, DEFAULT_RC_MIN, CHANNEL8_MID ] normChannels = [0]*8 @@ -150,7 +150,7 @@ class rcManager(): # channel 8 (index 7) is the raw gimbal paddle and is a special case # its values go from CHANNEL8_MIN - CHANNEL8_MAX - # this value is used to understand user input + # this value is used in smart shots where the pitch paddle is used for altitude up/down (such as in zipline free look) # >500 = tilt up, 500 = no tilt, < 500 tilt down normChannels[RAW_PADDLE] = self.normalizeRC( self.channels[RAW_PADDLE], CHANNEL8_MIN, CHANNEL8_MAX)