11,14 → 11,13 |
//#define SYSCLK 16000000L //Quarz Frequenz in Hz |
#endif |
|
|
// neue Hardware |
#define ROT_OFF PORTB &=~0x01 |
#define ROT_ON PORTB |= 0x01 |
#define ROT_OFF {if(PlatinenVersion == 10) PORTB &=~0x01; else PORTB |= 0x01;} |
#define ROT_ON {if(PlatinenVersion == 10) PORTB |= 0x01; else PORTB &=~0x01;} |
#define ROT_FLASH PORTB ^= 0x01 |
#define GRN_OFF PORTB &=~0x02 |
#define GRN_ON PORTB |= 0x02 |
#define GRN_FLASH PORTD ^= 0x02 |
#define GRN_FLASH PORTB ^= 0x02 |
|
//#ifndef F_CPU |
//#error ################## F_CPU nicht definiert oder ungültig ############# |
30,6 → 29,7 |
|
#define EEPROM_ADR_VALID 1 |
#define EEPROM_ADR_ACTIVE_SET 2 |
#define EEPROM_ADR_LAST_OFFSET 3 |
|
#define EEPROM_ADR_PARAM_BEGIN 100 |
|
40,12 → 40,51 |
#define CFG_KOMPASS_FIX 0x10 |
#define CFG_GPS_AKTIV 0x20 |
|
#define CFG_LOOP_OBEN 0x01 |
#define CFG_LOOP_UNTEN 0x02 |
#define CFG_LOOP_LINKS 0x04 |
#define CFG_LOOP_RECHTS 0x08 |
|
long durchschnitt_x; |
long durchschnitt_y; |
long durchschnitt_z; |
|
int gps_h_d1; |
int gps_h_d2; |
|
long target_x, target_y, target_z; |
|
volatile int gps_error; |
volatile int gps_getpos; |
|
volatile int gps_p; //P-Anteil |
volatile int gps_d; //D-Anteil |
volatile int gps_acc; //Acc-Anteil |
|
int sticks_centered; |
int stick_time; |
|
long gps_home_x; |
long gps_home_y; |
long home_height; |
|
int homing_state; |
|
int way, way1, wayn, way2; |
|
volatile int gpsmax; |
|
volatile int komp_dreh; // verdrehten Kompasseinbau kompensieren (+/-Grad) |
volatile int gps_new; |
volatile int skal; //Skalierungsfaktor der Regelung (alter Wert: 10) (20) |
volatile int gps_gethome; |
|
//#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 unsigned char PlatinenVersion; |
|
extern void ReadParameterSet (unsigned char number, unsigned char *buffer, unsigned char length); |
extern void WriteParameterSet(unsigned char number, unsigned char *buffer, unsigned char length); |
52,15 → 91,6 |
extern unsigned char GetActiveParamSetNumber(void); |
extern unsigned char EEPromArray[]; |
|
long durchschnitt_northing; |
long durchschnitt_easting; |
|
volatile int gps_p; //P-Anteil (10) |
volatile int gps_d; //D-Anteil (4) |
volatile int skal; //Skalierungsfaktor der Regelung (alter Wert: 10) (20) |
|
volatile int gps_gethome; |
|
#include <stdlib.h> |
#include <string.h> |
#include <avr/io.h> |
72,7 → 102,7 |
|
#include "old_macros.h" |
|
#include "_Settings.h" |
#include "_settings.h" |
#include "printf_P.h" |
#include "timer0.h" |
#include "uart.h" |