Subversion Repositories FlightCtrl

Rev

Rev 2006 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef _MAIN_H
#define _MAIN_H

//#define DEBUG                                                 // use to activate debug output to MK-Tool: use Debug(text);
//#define ACT_S3D_SUMMENSIGNAL
//#define RECEIVER_SPEKTRUM_DX7EXP
//#define RECEIVER_SPEKTRUM_DX8EXP


#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))        ///MartinW
        #define WITH_MKTOOL_Display
        #define WITH_JETI_SIMULATION
        #define WITH_ExternControl
        #define WITH_FULL_ANALOG_TEXT
        #define WITHSPECTRUM
        //#define WITH_REMAINCAPACITY
#else
#endif

//#define WITH_MKTOOL_Display                   /// MartinW;  with MKTool Display 70604-63130
//#define WITHSPECTRUM                                  /// MartinW;  memsave
//#define WITH_FULL_ANALOG_TEXT                 /// MartinW;  memsave
//#define WITH_ExternControl                    /// MartinW;  memsave
//#define WITH_ORIGINAL_MOTORSMOOTHING  /// MartinW;  memsave 63312-63164
//#define WITH_JETI_SIMULATION                  /// MartinW;  memsave 63312-63016
//#define WITH_PANOTRIGGER                              /// MartinW;  64336-64112
//#define WITH_HOTTMENU                                 /// Metro;
//#define WITH_REMAINCAPACITY                   /// Metro;







// neue Hardware
#define ROT_OFF   {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB &=~0x01; else  PORTB |= 0x01;}
#define ROT_ON    {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB |= 0x01; else  PORTB &=~0x01;}
#define ROT_FLASH PORTB ^= 0x01
#define GRN_OFF   {if((PlatinenVersion < 12)) PORTB &=~0x02; else PORTB |= 0x02;}
#define GRN_ON    {if((PlatinenVersion < 12)) PORTB |= 0x02; else PORTB &=~0x02;}
#define GRN_FLASH PORTB ^= 0x02

#define SYSCLK F_CPU

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#define J3High    PORTD |= 0x20
#define J3Low     PORTD &= ~0x20
#define J4High    PORTD |= 0x10
#define J4Low     PORTD &= ~0x10
#define J5High    PORTD |= 0x08
#define J5Low     PORTD &= ~0x08

extern volatile unsigned char SenderOkay;
extern unsigned char BattLowVoltageWarning;
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
extern unsigned char PlatinenVersion;
extern unsigned char SendVersionToNavi;
extern unsigned char FoundMotors;
extern unsigned char JetiBeep;
void LipoDetection(unsigned char print);
extern unsigned int FlugMinuten,FlugMinutenGesamt,FlugSekunden;
#include <avr/pgmspace.h>

#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))

#endif

#include <stdlib.h>
#include <string.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include <avr/eeprom.h>
#include <avr/boot.h>
#include <avr/wdt.h>

#include "old_macros.h"

#include "printf_P.h"
#include "timer0.h"
#include "uart.h"
#include "analog.h"
#include "twimaster.h"
#include "menu.h"
#include "rc.h"
#include "fc.h"
#include "gps.h"
#include "spi.h"
#include "led.h"
#include "spektrum.h"
#include "capacity.h"
#include "eeprom.h"
#include "libfc.h"
#include "hottmenu.h"
#include "debug.h"


#endif //_MAIN_H