Subversion Repositories FlightCtrl

Rev

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

Rev 1982 Rev 2008
Line 11... Line 11...
11
volatile int  Aktuell_Nick,Aktuell_Roll,Aktuell_Gier,Aktuell_ax, Aktuell_ay,Aktuell_az, UBat = 100;
11
volatile int  Aktuell_Nick,Aktuell_Roll,Aktuell_Gier,Aktuell_ax, Aktuell_ay,Aktuell_az, UBat = 100;
12
volatile int  AdWertNickFilter = 0, AdWertRollFilter = 0, AdWertGierFilter = 0;
12
volatile int  AdWertNickFilter = 0, AdWertRollFilter = 0, AdWertGierFilter = 0;
13
volatile int  HiResNick = 2500, HiResRoll = 2500;
13
volatile int  HiResNick = 2500, HiResRoll = 2500;
14
volatile int  AdWertNick = 0, AdWertRoll = 0, AdWertGier = 0;
14
volatile int  AdWertNick = 0, AdWertRoll = 0, AdWertGier = 0;
15
volatile int  AdWertAccRoll = 0,AdWertAccNick = 0,AdWertAccHoch = 0;
15
volatile int  AdWertAccRoll = 0,AdWertAccNick = 0,AdWertAccHoch = 0;
16
volatile char messanzahl_AccHoch = 0;
-
 
17
volatile long Luftdruck = 32000;
16
volatile long Luftdruck = 32000;
18
volatile long SummenHoehe = 0;
17
volatile long SummenHoehe = 0;
19
volatile int  StartLuftdruck;
18
volatile int  StartLuftdruck;
20
volatile unsigned int  MessLuftdruck = 1023;
19
volatile unsigned int  MessLuftdruck = 1023;
21
unsigned char DruckOffsetSetting;
20
unsigned char DruckOffsetSetting;
22
signed char ExpandBaro = 0;
21
signed char ExpandBaro = 0;
23
volatile int VarioMeter = 0;
22
volatile int VarioMeter = 0;
24
volatile unsigned int ZaehlMessungen = 0;
23
volatile unsigned int ZaehlMessungen = 0;
25
unsigned char AnalogOffsetNick = 115,AnalogOffsetRoll = 115,AnalogOffsetGier = 115;
24
unsigned char AnalogOffsetNick = 115,AnalogOffsetRoll = 115,AnalogOffsetGier = 115;
26
volatile unsigned char AdReady = 1;
25
volatile unsigned char AdReady = 1;
27
float NeutralAccZ_float;
-
 
-
 
26
 
28
//#######################################################################################
27
//#######################################################################################
29
//
-
 
30
void ADC_Init(void)
28
void ADC_Init(void)
31
//#######################################################################################
29
//#######################################################################################
32
{
30
{
33
    ADMUX = 0;//Referenz ist extern
31
    ADMUX = 0;//Referenz ist extern
34
    ANALOG_ON;
32
    ANALOG_ON;
Line 205... Line 203...
205
                 subcount -= 5;
203
                 subcount -= 5;
206
                 if(modell_fliegt < 500) subcount -= 10;
204
                 if(modell_fliegt < 500) subcount -= 10;
207
                 if(subcount < -100) { NeutralAccZ--; subcount += 100;}
205
                 if(subcount < -100) { NeutralAccZ--; subcount += 100;}
208
                }
206
                }
209
             }
207
             }
210
            messanzahl_AccHoch = 1;
208
//            messanzahl_AccHoch = 1;
211
            Aktuell_az = ADC;
209
            Aktuell_az = ADC;
212
            Mess_Integral_Hoch += AdWertAccHoch;      // Integrieren
210
            Mess_Integral_Hoch += AdWertAccHoch;      // Integrieren
213
            Mess_Integral_Hoch -= Mess_Integral_Hoch / 1024; // dämfen
211
            Mess_Integral_Hoch -= Mess_Integral_Hoch / 1024; // dämfen
214
                kanal = AD_DRUCK;
212
                kanal = AD_DRUCK;
215
            break;
213
            break;