Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 476 → Rev 477

/branches/v0.60_MicroMag3_Nick666/trunc/fc.c
57,21 → 57,23
 
unsigned char h,m,s;
volatile unsigned char Timeout = 0;
volatile int MesswertNick,MesswertRoll,MesswertGier;
int MesswertNick,MesswertRoll,MesswertGier;
volatile int AdNeutralNick = 0,AdNeutralRoll = 0,AdNeutralGier = 0;
volatile int Mittelwert_AccNick, Mittelwert_AccRoll,Mittelwert_AccHoch;
unsigned char CosinusNickWinkel = 0, CosinusRollWinkel = 0;
volatile long IntegralNick = 0,IntegralNick2 = 0;
volatile long IntegralRoll = 0,IntegralRoll2 = 0;
volatile long Integral_Gier = 0;
int Mittelwert_AccNick, Mittelwert_AccRoll,Mittelwert_AccHoch;
 
long IntegralNick = 0,IntegralNick2 = 0;
long IntegralRoll = 0,IntegralRoll2 = 0;
long Integral_Gier = 0;
volatile long Mess_IntegralNick = 0,Mess_IntegralNick2 = 0;
volatile long Mess_IntegralRoll = 0,Mess_IntegralRoll2 = 0;
volatile long Mess_Integral_Gier = 0,Mess_Integral_Gier2 = 0;
volatile long Mess_Integral_Hoch = 0;
int KompassValue = 0;
int KompassStartwert = 0;
int KompassRichtung = 0;
 
int KompassValue = 0;
int KompassStartwert = 0;
int KompassRichtung = 0;
uint8_t updKompass = 0;
 
unsigned char MAX_GAS,MIN_GAS;
unsigned char Notlandung = 0;
unsigned char HoehenReglerAktiv = 0;
79,9 → 81,9
float GyroFaktor;
float IntegralFaktor;
 
volatile int DiffNick,DiffRoll;
int Poti1 = 0, Poti2 = 0, Poti3 = 0, Poti4 = 0;
volatile unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links, Count;
int DiffNick,DiffRoll;
int Poti1 = 0, Poti2 = 0, Poti3 = 0, Poti4 = 0;
volatile unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links;
unsigned char MotorWert[5];
volatile unsigned char SenderOkay = 0;
int StickNick = 0,StickRoll = 0,StickGier = 0;
/branches/v0.60_MicroMag3_Nick666/trunc/fc.h
7,20 → 7,23
 
extern volatile unsigned char Timeout;
extern unsigned char Sekunde,Minute;
extern volatile long IntegralNick,IntegralNick2;
extern volatile long IntegralRoll,IntegralRoll2;
extern long IntegralNick,IntegralNick2;
extern long IntegralRoll,IntegralRoll2;
extern long Integral_Gier;
extern volatile long Mess_IntegralNick,Mess_IntegralNick2;
extern volatile long Mess_IntegralRoll,Mess_IntegralRoll2;
extern volatile long Mess_Integral_Hoch;
extern volatile long Integral_Gier,Mess_Integral_Gier,Mess_Integral_Gier2;
extern volatile long Mess_Integral_Gier,Mess_Integral_Gier2;
extern int KompassValue;
extern int KompassStartwert;
extern int KompassRichtung;
extern int HoehenWert;
extern int SollHoehe;
extern volatile int MesswertNick,MesswertRoll,MesswertGier;
extern volatile int AdNeutralNick,AdNeutralRoll,AdNeutralGier, Mittelwert_AccNick, Mittelwert_AccRoll;
extern volatile int NeutralAccX, NeutralAccY,Mittelwert_AccHoch;
extern int MesswertNick,MesswertRoll,MesswertGier;
extern int Mittelwert_AccNick, Mittelwert_AccRoll,Mittelwert_AccHoch;
 
extern volatile int AdNeutralNick,AdNeutralRoll,AdNeutralGier;
extern volatile int NeutralAccX, NeutralAccY;
extern volatile float NeutralAccZ;
 
 
35,16 → 38,11
 
unsigned char h,m,s;
volatile unsigned char Timeout;
unsigned char CosinusNickWinkel, CosinusRollWinkel;
volatile long IntegralNick,IntegralNick2;
volatile long IntegralRoll,IntegralRoll2;
volatile long Integral_Gier;
volatile long Mess_IntegralNick,Mess_IntegralNick2;
volatile long Mess_IntegralRoll,Mess_IntegralRoll2;
volatile long Mess_Integral_Gier;
volatile int DiffNick,DiffRoll;
 
 
int DiffNick,DiffRoll;
extern int Poti1, Poti2, Poti3, Poti4;
volatile unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links, Count;
volatile unsigned char Motor_Vorne,Motor_Hinten,Motor_Rechts,Motor_Links;
unsigned char MotorWert[5];
volatile unsigned char SenderOkay;
int StickNick,StickRoll,StickGier;
92,9 → 90,9
 
struct acc_neutral_struct
{
int X;
int Y;
float Z;
volatile int X;
volatile int Y;
volatile float Z;
};
 
extern struct acc_neutral_struct acc_neutral;
/branches/v0.60_MicroMag3_Nick666/trunc/main.h
40,12 → 40,6
#define CFG_GPS_AKTIV 0x20
 
 
//#define SYSCLK
//extern unsigned long SYSCLK;
extern volatile int i_Nick[20],i_Roll[20],DiffNick,DiffRoll;
extern volatile unsigned char SenderOkay;
extern unsigned char CosinusNickWinkel, CosinusRollWinkel;
 
extern void ReadParameterSet (unsigned char number, unsigned char *buffer, unsigned char length);
extern void WriteParameterSet(unsigned char number, unsigned char *buffer, unsigned char length);
extern unsigned char GetActiveParamSetNumber(void);
/branches/v0.60_MicroMag3_Nick666/trunc/timer0.c
1,7 → 1,6
#include "main.h"
 
volatile unsigned int CountMilliseconds = 0;
volatile static unsigned int tim_main;
volatile unsigned char UpdateMotor = 0;
volatile unsigned int beeptime = 0;
int ServoValue = 0;
47,7 → 46,6
 
void Timer_Init(void)
{
tim_main = SetDelay(10);
TCCR0B = CK8;
TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM
OCR0A = 0;