Rev 1598 | Rev 1636 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1598 | Rev 1622 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef _MAIN_H |
1 | #ifndef _MAIN_H |
2 | #define _MAIN_H |
2 | #define _MAIN_H |
Line 3... | Line -... | ||
3 | - | ||
Line 4... | Line 3... | ||
4 | #define QUADRO |
3 | |
Line 5... | Line 4... | ||
5 | 4 | ||
6 | //#define ACT_S3D_SUMMENSIGNAL |
5 | //#define ACT_S3D_SUMMENSIGNAL |
Line 14... | Line 13... | ||
14 | #define GRN_FLASH PORTB ^= 0x02 |
13 | #define GRN_FLASH PORTB ^= 0x02 |
Line 15... | Line 14... | ||
15 | 14 | ||
Line 16... | Line 15... | ||
16 | #define SYSCLK F_CPU |
15 | #define SYSCLK F_CPU |
17 | - | ||
18 | //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
- | |
19 | #define EE_DATENREVISION 82 // Parameter fürs Koptertool; wird angepasst, wenn sich die EEPROM-Daten geändert haben |
- | |
20 | #define MIXER_REVISION 1 // wird angepasst, wenn sich die Mixer-Daten geändert haben |
- | |
21 | - | ||
22 | #define EEPROM_ADR_VALID 1 |
- | |
23 | #define EEPROM_ADR_ACTIVE_SET 2 |
- | |
24 | #define EEPROM_ADR_LAST_OFFSET 3 |
- | |
25 | - | ||
26 | #define EEPROM_ADR_ACC_NICK 4 |
- | |
27 | #define EEPROM_ADR_ACC_ROLL 6 |
- | |
28 | #define EEPROM_ADR_ACC_Z 8 |
- | |
29 | #define EEPROM_ADR_MINUTES 10 |
- | |
30 | #define EEPROM_ADR_MINUTES2 14 |
- | |
31 | - | ||
32 | #define EEPROM_ADR_CHANNELS 80 |
- | |
33 | - | ||
34 | #define EEPROM_ADR_PARAM_LENGTH 98 |
- | |
35 | #define EEPROM_ADR_PARAM_BEGIN 100 |
- | |
36 | - | ||
37 | #define EEPROM_ADR_MIXER_TABLE 1000 // 1001 - 1100 |
- | |
38 | - | ||
39 | #define CFG_HOEHENREGELUNG 0x01 |
- | |
40 | #define CFG_HOEHEN_SCHALTER 0x02 |
- | |
41 | #define CFG_HEADING_HOLD 0x04 |
- | |
42 | #define CFG_KOMPASS_AKTIV 0x08 |
- | |
43 | #define CFG_KOMPASS_FIX 0x10 |
- | |
44 | #define CFG_GPS_AKTIV 0x20 |
- | |
45 | #define CFG_ACHSENKOPPLUNG_AKTIV 0x40 |
- | |
46 | #define CFG_DREHRATEN_BEGRENZER 0x80 |
- | |
47 | - | ||
48 | #define CFG_LOOP_OBEN 0x01 |
- | |
49 | #define CFG_LOOP_UNTEN 0x02 |
- | |
50 | #define CFG_LOOP_LINKS 0x04 |
- | |
51 | #define CFG_LOOP_RECHTS 0x08 |
- | |
52 | #define CFG_MOTOR_BLINK 0x10 |
- | |
53 | #define CFG_MOTOR_OFF_LED1 0x20 |
- | |
54 | #define CFG_MOTOR_OFF_LED2 0x40 |
- | |
55 | #define CFG_RES4 0x80 |
- | |
56 | - | ||
57 | #define CFG2_HEIGHT_LIMIT 0x01 |
- | |
58 | #define CFG2_VARIO_BEEP 0x02 |
- | |
59 | #define CFG_SENSITIVE_RC 0x04 |
- | |
60 | - | ||
61 | #define RECEIVER_PPM 0 |
- | |
62 | #define RECEIVER_SPEKTRUM 1 |
- | |
63 | #define RECEIVER_SPEKTRUM_HI_RES 2 |
- | |
64 | #define RECEIVER_SPEKTRUM_LOW_RES 3 |
- | |
65 | #define RECEIVER_JETI 4 |
- | |
Line 66... | Line 16... | ||
66 | #define RECEIVER_ACT_DSL 5 |
16 | |
67 | #define RECEIVER_UNKNOWN 0xFF |
17 | //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
68 | 18 | ||
69 | #define J3High PORTD |= 0x20 |
19 | #define J3High PORTD |= 0x20 |
Line 76... | Line 26... | ||
76 | extern volatile unsigned char SenderOkay; |
26 | extern volatile unsigned char SenderOkay; |
77 | extern unsigned char BattLowVoltageWarning; |
27 | extern unsigned char BattLowVoltageWarning; |
78 | extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
28 | extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
79 | extern unsigned char PlatinenVersion; |
29 | extern unsigned char PlatinenVersion; |
80 | extern unsigned char SendVersionToNavi; |
30 | extern unsigned char SendVersionToNavi; |
81 | void ReadParameterSet (unsigned char number, unsigned char *buffer, unsigned char length); |
- | |
82 | void WriteParameterSet(unsigned char number, unsigned char *buffer, unsigned char length); |
- | |
83 | extern unsigned char GetActiveParamSetNumber(void); |
- | |
84 | void SetActiveParamSetNumber(unsigned char number); |
- | |
- | 31 | ||
- | 32 | ||
85 | void LipoDetection(unsigned char print); |
33 | void LipoDetection(unsigned char print); |
86 | extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden; |
34 | extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden; |
Line 87... | Line 35... | ||
87 | 35 | ||
88 | #include <stdlib.h> |
36 | #include <stdlib.h> |
Line 109... | Line 57... | ||
109 | #include "gps.h" |
57 | #include "gps.h" |
110 | #include "spi.h" |
58 | #include "spi.h" |
111 | #include "led.h" |
59 | #include "led.h" |
112 | #include "spektrum.h" |
60 | #include "spektrum.h" |
113 | #include "capacity.h" |
61 | #include "capacity.h" |
- | 62 | #include "eeprom.h" |
|
114 | #include "libfc.h" |
63 | #include "libfc.h" |
Line 115... | Line -... | ||
115 | - | ||
116 | - | ||
117 | - | ||
118 | #ifndef EEMEM |
- | |
119 | #define EEMEM __attribute__ ((section (".eeprom"))) |
- | |
120 | #endif |
- | |
121 | - | ||
122 | #define DEBUG_DISPLAY_INTERVALL 123 // in ms |
- | |
123 | - | ||
124 | 64 |