From 1ecd244affb82068cad6b3901e58776ceb996167 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Mon, 6 Jun 2011 10:46:07 -0500 Subject: [PATCH] OP-493 OP-505 OP-511: Fixed bug with the direct mapping where it looked at throttle curve source instead of directly bypassing --- flight/Modules/Actuator/actuator.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/flight/Modules/Actuator/actuator.c b/flight/Modules/Actuator/actuator.c index 9d21dba5a..1deceab0e 100644 --- a/flight/Modules/Actuator/actuator.c +++ b/flight/Modules/Actuator/actuator.c @@ -254,11 +254,16 @@ static void actuatorTask(void* parameters) status[ct] = 0; } - // If an accessory channel is selected + // If an accessory channel is selected for direct bypass mode + // In this configuration the accessory channel is scaled and mapped + // directly to output. Note: THERE IS NO SAFETY CHECK HERE FOR ARMING + // these also will not be updated in failsafe mode. I'm not sure what + // the correct behavior is since it seems domain specific. I don't love + // this code if( (mixers[ct].type >= MIXERSETTINGS_MIXER1TYPE_ACCESSORY0) && (mixers[ct].type <= MIXERSETTINGS_MIXER1TYPE_ACCESSORY2)) { - if(AccessoryDesiredInstGet(mixerSettings.Curve2Source - MIXERSETTINGS_CURVE2SOURCE_ACCESSORY0,&accessory) == 0) + if(AccessoryDesiredInstGet(mixers[ct].type - MIXERSETTINGS_MIXER1TYPE_ACCESSORY0,&accessory) == 0) status[ct] = accessory.AccessoryVal; else status[ct] = -1;