Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2751 - 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
extern unsigned char RedundanceBlOperation;
52
 
53
#include <avr/pgmspace.h>
54
 
55
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
56
 
57
#endif
58
 
59
#include <stdlib.h>
60
#include <string.h>
61
#include <avr/io.h>
62
#include <avr/pgmspace.h>
63
#include <avr/interrupt.h>
64
#include <avr/eeprom.h>
65
#include <avr/boot.h>
66
#include <avr/wdt.h>
67
 
68
#include "old_macros.h"
69
 
70
#include "printf_P.h"
71
#include "timer0.h"
72
#include "uart.h"
73
#include "analog.h"
74
#include "twimaster.h"
75
#include "menu.h"
76
#include "rc.h"
77
#include "fc.h"
78
#include "gps.h"
79
#include "spi.h"
80
#include "led.h"
81
#include "spektrum.h"
82
#include "capacity.h"
83
#include "eeprom.h"
84
#include "libfc.h"
85
#include "hottmenu.h"
86
#include "debug.h"
87
#include "sbus.h"
88
#include "jeti_ex.h"
89
 
90
#endif //_MAIN_H
91
 
92
 
93
 
94
 
95
 
96