Subversion Repositories FlightCtrl

Rev

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