Subversion Repositories FlightCtrl

Rev

Rev 1653 | Rev 1658 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1653 Rev 1654
Line 94... Line 94...
94
//int  Poti1 = 0, Poti2 = 0, Poti3 = 0, Poti4 = 0, Poti5 = 0, Poti6 = 0, Poti7 = 0, Poti8 = 0;
94
//int  Poti1 = 0, Poti2 = 0, Poti3 = 0, Poti4 = 0, Poti5 = 0, Poti6 = 0, Poti7 = 0, Poti8 = 0;
95
unsigned char Poti[9] = {0,0,0,0,0,0,0,0};
95
unsigned char Poti[9] = {0,0,0,0,0,0,0,0};
96
volatile unsigned char SenderOkay = 0;
96
volatile unsigned char SenderOkay = 0;
97
int StickNick = 0,StickRoll = 0,StickGier = 0,StickGas = 0;
97
int StickNick = 0,StickRoll = 0,StickGier = 0,StickGas = 0;
98
char MotorenEin = 0;
98
char MotorenEin = 0;
99
unsigned char RequiredMotors = 0;
-
 
100
long HoehenWert = 0;
99
long HoehenWert = 0;
101
long SollHoehe = 0;
100
long SollHoehe = 0;
102
int LageKorrekturRoll = 0,LageKorrekturNick = 0;
101
int LageKorrekturRoll = 0,LageKorrekturNick = 0;
103
//float Ki =  FAKTOR_I;
102
//float Ki =  FAKTOR_I;
104
int Ki = (10300/2) / 33;
103
int Ki = (10300/2) / 33;
Line 1633... Line 1632...
1633
        {
1632
        {
1634
                signed int tmp_int;
1633
                signed int tmp_int;
1635
                if(Mixer.Motor[i][0] > 0)
1634
                if(Mixer.Motor[i][0] > 0)
1636
                {
1635
                {
1637
                        // Gas
1636
                        // Gas
1638
                        if(Mixer.Motor[i][0] == 64) tmp_int = GasMischanteil * 2; else tmp_int =  ((long)GasMischanteil * Mixer.Motor[i][0]) / 32L;
1637
                        if(Mixer.Motor[i][0] == 64) tmp_int = GasMischanteil * 2; else tmp_int =  ((long)GasMischanteil * Mixer.Motor[i][0]) / 32L;
1639
                        // Nick
1638
                        // Nick
1640
                        if(Mixer.Motor[i][1] == 64) tmp_int += pd_ergebnis_nick;
1639
                        if(Mixer.Motor[i][1] == 64) tmp_int += pd_ergebnis_nick;
1641
                        else if(Mixer.Motor[i][1] == -64) tmp_int -= pd_ergebnis_nick;
1640
                        else if(Mixer.Motor[i][1] == -64) tmp_int -= pd_ergebnis_nick;
1642
                        else tmp_int += ((long)pd_ergebnis_nick * Mixer.Motor[i][1]) / 64L;
1641
                        else tmp_int += ((long)pd_ergebnis_nick * Mixer.Motor[i][1]) / 64L;
1643
            // Roll
1642
            // Roll