Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2506 - 1
#ifndef _MAIN_H
2
#define _MAIN_H
3
 
4
//#define REDUNDANT_FC_SLAVE
5
//#define REDUNDANT_FC_MASTER
6
 
7
//#define DEBUG                                                 // use to activate debug output to MK-Tool: use Debug(text);
8
//#define ACT_S3D_SUMMENSIGNAL
9
//#define UserParameter8_FAILSAFE
10
//#define RECEIVER_SPEKTRUM_DX7EXP
11
//#define RECEIVER_SPEKTRUM_DX8EXP
12
 
13
// neue Hardware
14
//#define ROT_OFF   {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB &=~0x01; else  PORTB |= 0x01;}
15
//#define ROT_ON    {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB |= 0x01; else  PORTB &=~0x01;}
16
 
17
#define ROT_OFF   {PORTB &=~0x01;}
18
#define ROT_ON    {PORTB |= 0x01;}
19
 
20
#define ROT_FLASH PORTB ^= 0x01
21
//#define GRN_OFF   {if((PlatinenVersion < 12) || PlatinenVersion == 25) PORTB &=~0x02; else PORTB |= 0x02;}
22
//#define GRN_ON    {if((PlatinenVersion < 12) || PlatinenVersion == 25) PORTB |= 0x02; else PORTB &=~0x02;}
23
#define GRN_OFF   {if(PlatinenVersion == 25) PORTB &=~0x02; else PORTB |= 0x02;}
24
#define GRN_ON    {if(PlatinenVersion == 25) PORTB |= 0x02; else PORTB &=~0x02;}
25
#define GRN_FLASH PORTB ^= 0x02
26
 
27
#define SYSCLK F_CPU
28
 
29
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
30
 
31
#define J3High    PORTD |= 0x20
32
#define J3Low     PORTD &= ~0x20
33
#define J4High    PORTD |= 0x10
34
#define J4Low     PORTD &= ~0x10
35
#define J5High    PORTD |= 0x08
36
#define J5Low     PORTD &= ~0x08
37
 
38
extern volatile unsigned char SenderOkay;
39
extern unsigned char BattLowVoltageWarning;
40
extern unsigned char BattAutoLandingVoltage, BattComingHomeVoltage;
41
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
42
extern unsigned char PlatinenVersion;
43
extern unsigned char FoundMotors,DisableRcOffBeeping;
44
extern unsigned char JetiBeep;
45
void LipoDetection(unsigned char print);
46
extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden;
47
extern void PrintLine(void);  // "================================="
48
extern unsigned char ActiveParamSet;
49
extern unsigned int BL3_Current(unsigned char who); // in 0,1A
50
extern unsigned char LipoCells;
51
 
52
#include <avr/pgmspace.h>
53
 
54
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
55
 
56
#endif
57
 
58
#include <stdlib.h>
59
#include <string.h>
60
#include <avr/io.h>
61
#include <avr/pgmspace.h>
62
#include <avr/interrupt.h>
63
#include <avr/eeprom.h>
64
#include <avr/boot.h>
65
#include <avr/wdt.h>
66
 
67
#include "old_macros.h"
68
 
69
#include "printf_P.h"
70
#include "timer0.h"
71
#include "uart.h"
72
#include "analog.h"
73
#include "twimaster.h"
74
#include "menu.h"
75
#include "rc.h"
76
#include "fc.h"
77
#include "gps.h"
78
#include "spi.h"
79
#include "led.h"
80
#include "spektrum.h"
81
#include "capacity.h"
82
#include "eeprom.h"
83
#include "libfc.h"
84
#include "hottmenu.h"
85
#include "debug.h"
86
#include "sbus.h"
87
#include "jeti_ex.h"
88
 
89
#endif //_MAIN_H
90
 
91
 
92
 
93
 
94
 
95