Rev 438 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 438 | Rev 455 | ||
---|---|---|---|
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; |
- | |
7 | volatile unsigned int cntKompass = 800; |
6 | volatile unsigned int beeptime = 0; |
Line 8... | Line 7... | ||
8 | int ServoValue = 0; |
7 | int ServoValue = 0; |
9 | 8 | ||
10 | enum { |
9 | enum { |
Line 43... | Line 42... | ||
43 | PORTD &= ~(1<<PD2); |
42 | PORTD &= ~(1<<PD2); |
Line 44... | Line 43... | ||
44 | 43 | ||
45 | if(EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV) |
44 | if(EE_Parameter.GlobalConfig & CFG_KOMPASS_AKTIV) |
46 | { |
45 | { |
47 | timer0_MM3(); // Kompass auslesen |
- | |
48 | - | ||
49 | if (!cntKompass--) // Aufruf mit 10 Hz |
- | |
50 | { |
- | |
51 | KompassValue = heading_MM3(); |
- | |
52 | KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180; |
- | |
53 | cntKompass = 980; |
- | |
54 | } |
46 | timer0_MM3(); // Kompass auslesen |
55 | } |
47 | } |
Line 56... | Line 48... | ||
56 | } |
48 | } |