Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2127 → Rev 2154

/branches/V0.88e_ACC-HH_HR_MartinR/fc.c
199,7 → 199,7
unsigned char Parameter_Servo3,Parameter_Servo4,Parameter_Servo5;
unsigned char CareFree = 0;
//const signed char sintab[31] = { 0, 2, 4, 6, 7, 8, 8, 8, 7, 6, 4, 2, 0, -2, -4, -6, -7, -8, -8, -8, -7, -6, -4, -2, 0, 2, 4, 6, 7, 8, 8}; // 15° steps // MartinR: so war es
const signed char sintab[62] = { 0, 2, 4, 6, 8, 10, 11, 13, 14, 15, 15, 16, 16, 16, 15, 14, 13, 11, 10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10, -11, -13, -14, -15, -15, -16, -16, -16, -15, -15, -14, -13, -11, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 11, 13, 14, 15, 15, 16, 16, 16}; // 7,5° steps //MartinR
const signed char sintab[62] = { 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 16, 16, 16, 16, 16, 15, 14, 13, 12, 10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10, -12, -13, -14, -15, -16, -16, -16, -16, -16, -15, -14, -13, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 16, 16, 16}; // 7,5° steps //MartinR
signed char cosinus, sinus; // MartinR : extern für PAN-Funktion
 
signed int ExternStickNick = 0,ExternStickRoll = 0,ExternStickGier = 0, ExternHoehenValue = -20;
1046,9 → 1046,9
else
{
//FromNC_Rotate_C = sintab[EE_Parameter.OrientationAngle + 6]; //MartinR: so war es
FromNC_Rotate_C = sintab[EE_Parameter.OrientationAngle * 2 + 12]; //MartinR: feinere Auflösung
FromNC_Rotate_C = (sintab[EE_Parameter.OrientationAngle * 2 + 12]) / 2; //MartinR: feinere Auflösung
//FromNC_Rotate_S = sintab[EE_Parameter.OrientationAngle]; //MartinR: so war es
FromNC_Rotate_S = sintab[EE_Parameter.OrientationAngle * 2]; //MartinR: feinere Auflösung
FromNC_Rotate_S = (sintab[EE_Parameter.OrientationAngle * 2]) / 2; //MartinR: feinere Auflösung
StickNick = ((FromNC_Rotate_C * stick_nick) + (FromNC_Rotate_S * stick_roll)) / 8;
StickRoll = ((FromNC_Rotate_C * stick_roll) - (FromNC_Rotate_S * stick_nick)) / 8;
}