Subversion Repositories FlightCtrl

Rev

Rev 2176 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 ingob 1
#ifndef _MAIN_H
1622 killagreg 2
#define _MAIN_H
1 ingob 3
 
1923 holgerb 4
//#define DEBUG                                                 // use to activate debug output to MK-Tool: use Debug(text);
1438 ingob 5
//#define ACT_S3D_SUMMENSIGNAL
2008 holgerb 6
//#define UserParameter8_FAILSAFE
1928 holgerb 7
//#define RECEIVER_SPEKTRUM_DX7EXP
8
//#define RECEIVER_SPEKTRUM_DX8EXP
1438 ingob 9
 
2177 - 10
 
11
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))        ///MartinW
12
        #define WITH_MKTOOL_Display
13
        #define WITH_JETI_SIMULATION
14
        #define WITH_ExternControl
15
        #define WITH_ACC_Loop
16
        #define WITH_FULL_ANALOG_TEXT
17
        #define WITHSPECTRUM
18
        //#define WITH_REMAINCAPACITY // MartinR: entfernt, da Konflikt mit Libfc
19
//      #define WITH_PANOTRIGGER // MartinR: entfernt
20
#else
21
#endif
22
 
23
 
24
//#define WITH_MKTOOL_Display                   /// MartinW;  with MKTool Display 70604-63130
25
//#define WITHSPECTRUM                                  /// MartinW;  memsave
26
//#define WITH_FULL_ANALOG_TEXT                 /// MartinW;  memsave // MartinR: deaktiviert
27
//#define WITH_ExternControl                    /// MartinW;  memsave // MartinR: deaktiviert
28
//#define WITH_ORIGINAL_MOTORSMOOTHING  /// MartinW;  memsave 63312-63164
29
//#define WITH_JETI_SIMULATION                  /// MartinW;  memsave 63312-63016 // MartinR: deaktiviert
30
//#define WITH_JETI_BEEP                                        /// MartinW;  63072-63038; 63216-63050 // MartinR: deaktiviert
31
//#define WITH_PANOTRIGGER                              /// MartinW;  64336-64112
32
//#define WITH_HOTTMENU                                 /// Metro;  // MartinR: deaktiviert
33
//#define WITH_REMAINCAPACITY                   /// Metro;
34
 
35
 
36
 
37
 
38
 
39
 
40
 
1 ingob 41
// neue Hardware
1662 killagreg 42
#define ROT_OFF   {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB &=~0x01; else  PORTB |= 0x01;}
43
#define ROT_ON    {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB |= 0x01; else  PORTB &=~0x01;}
1 ingob 44
#define ROT_FLASH PORTB ^= 0x01
1058 killagreg 45
#define GRN_OFF   {if((PlatinenVersion < 12)) PORTB &=~0x02; else PORTB |= 0x02;}
46
#define GRN_ON    {if((PlatinenVersion < 12)) PORTB |= 0x02; else PORTB &=~0x02;}
173 holgerb 47
#define GRN_FLASH PORTB ^= 0x02
1 ingob 48
 
1435 killagreg 49
#define SYSCLK F_CPU
50
 
1 ingob 51
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
52
 
1155 hbuss 53
#define J3High    PORTD |= 0x20
54
#define J3Low     PORTD &= ~0x20
55
#define J4High    PORTD |= 0x10
56
#define J4Low     PORTD &= ~0x10
57
#define J5High    PORTD |= 0x08
58
#define J5Low     PORTD &= ~0x08
59
 
1 ingob 60
extern volatile unsigned char SenderOkay;
1236 killagreg 61
extern unsigned char BattLowVoltageWarning;
1 ingob 62
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
173 holgerb 63
extern unsigned char PlatinenVersion;
2029 holgerb 64
extern unsigned char FoundMotors,DisableRcOffBeeping;
1834 holgerb 65
extern unsigned char JetiBeep;
1268 hbuss 66
void LipoDetection(unsigned char print);
1512 holgerb 67
extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden;
2030 holgerb 68
extern void PrintLine(void);  // "================================="
1 ingob 69
 
1930 holgerb 70
#include <avr/pgmspace.h>
71
 
72
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
73
 
74
#endif
75
 
1 ingob 76
#include <stdlib.h>
77
#include <string.h>
78
#include <avr/io.h>
79
#include <avr/pgmspace.h>
80
#include <avr/interrupt.h>
81
#include <avr/eeprom.h>
82
#include <avr/boot.h>
83
#include <avr/wdt.h>
84
 
85
#include "old_macros.h"
86
 
87
#include "printf_P.h"
88
#include "timer0.h"
89
#include "uart.h"
90
#include "analog.h"
91
#include "twimaster.h"
92
#include "menu.h"
93
#include "rc.h"
94
#include "fc.h"
95
#include "gps.h"
304 ingob 96
#include "spi.h"
921 hbuss 97
#include "led.h"
1424 ingob 98
#include "spektrum.h"
1486 killagreg 99
#include "capacity.h"
1622 killagreg 100
#include "eeprom.h"
1435 killagreg 101
#include "libfc.h"
1917 holgerb 102
#include "hottmenu.h"
1636 ingob 103
#include "debug.h"
2012 holgerb 104
#include "sbus.h"
1 ingob 105
 
106
#endif //_MAIN_H
107
 
108
 
109
 
110
 
111
 
112