Subversion Repositories FlightCtrl

Rev

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

Rev 235 Rev 251
Line 2... Line 2...
2
 
2
 
3
volatile unsigned int CountMilliseconds = 0;
3
volatile unsigned int CountMilliseconds = 0;
4
volatile static unsigned int tim_main;
4
volatile static unsigned int tim_main;
5
volatile unsigned char UpdateMotor = 0;
5
volatile unsigned char UpdateMotor = 0;
-
 
6
volatile unsigned int beeptime = 0;
6
volatile unsigned int beeptime = 0;
7
volatile unsigned int cntKompass = 0;
Line 7... Line 8...
7
int ServoValue = 0;
8
int ServoValue = 0;
8
 
9
 
9
enum {
10
enum {
Line 39... Line 40...
39
        PORTD |= (1<<PD2);
40
        PORTD |= (1<<PD2);
40
        }
41
        }
41
     else  
42
     else  
42
        PORTD &= ~(1<<PD2);
43
        PORTD &= ~(1<<PD2);
Line 43... Line 44...
43
 
44
 
-
 
45
        if(EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV)
-
 
46
        {
44
  if(EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV) MM3_timer0();
47
                MM3_timer0();           // Kompass auslesen
-
 
48
 
-
 
49
                if (!cntKompass--)              // Aufruf mit 25 Hz
-
 
50
                {
45
 
51
                        KompassValue = MM3_heading();
-
 
52
                        KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180;
-
 
53
                        cntKompass = 320;
-
 
54
                }
Line 46... Line 55...
46
  //KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180;
55
        }