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;