1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +01:00

fixed channel reversals

This commit is contained in:
Corvus Corax 2013-07-18 13:46:58 +02:00
parent 50561bfb5f
commit 7b5bf53200

View File

@ -1089,27 +1089,27 @@ static void processArm(ManualControlCommandData *cmd, ManualControlSettingsData
// Calc channel see assumptions7 // Calc channel see assumptions7
switch (settings->Arming) { switch (settings->Arming) {
case MANUALCONTROLSETTINGS_ARMING_ROLLLEFT: case MANUALCONTROLSETTINGS_ARMING_ROLLLEFT:
armingInputLevel = -1.0f * cmd->Roll;
break;
case MANUALCONTROLSETTINGS_ARMING_ROLLRIGHT:
armingInputLevel = 1.0f * cmd->Roll; armingInputLevel = 1.0f * cmd->Roll;
break; break;
case MANUALCONTROLSETTINGS_ARMING_PITCHAFT: case MANUALCONTROLSETTINGS_ARMING_ROLLRIGHT:
armingInputLevel = -1.0f * cmd->Pitch; armingInputLevel = -1.0f * cmd->Roll;
break; break;
case MANUALCONTROLSETTINGS_ARMING_PITCHFORWARD: case MANUALCONTROLSETTINGS_ARMING_PITCHFORWARD:
armingInputLevel = 1.0f * cmd->Pitch; armingInputLevel = 1.0f * cmd->Pitch;
break; break;
case MANUALCONTROLSETTINGS_ARMING_PITCHAFT:
armingInputLevel = -1.0f * cmd->Pitch;
break;
case MANUALCONTROLSETTINGS_ARMING_YAWLEFT: case MANUALCONTROLSETTINGS_ARMING_YAWLEFT:
armingInputLevel = -1.0f * cmd->Yaw; armingInputLevel = 1.0f * cmd->Yaw;
break; break;
case MANUALCONTROLSETTINGS_ARMING_YAWRIGHT: case MANUALCONTROLSETTINGS_ARMING_YAWRIGHT:
armingInputLevel = 1.0f * cmd->Yaw; armingInputLevel = -1.0f * cmd->Yaw;
break; break;
case MANUALCONTROLSETTINGS_ARMING_ACCESSORY0: case MANUALCONTROLSETTINGS_ARMING_ACCESSORY0:
case MANUALCONTROLSETTINGS_ARMING_ACCESSORY1: case MANUALCONTROLSETTINGS_ARMING_ACCESSORY1:
case MANUALCONTROLSETTINGS_ARMING_ACCESSORY2: case MANUALCONTROLSETTINGS_ARMING_ACCESSORY2:
armingInputLevel = (float)armSwitch; armingInputLevel = -1.0f * (float)armSwitch;
break; break;
} }