20,14 → 20,13 |
volatile int16_t UBat = 100; |
volatile int16_t AdValueGyrPitch = 0, AdValueGyrRoll = 0, AdValueGyrYaw = 0; |
volatile int16_t AdValueAccRoll = 0, AdValueAccPitch = 0, AdValueAccTop = 0; |
volatile uint8_t messanzahl_AccHoch = 0; |
volatile int32_t AirPressure = 32000; |
volatile int16_t StartAirPressure; |
volatile uint16_t ReadingAirPressure = 1023; |
uint8_t DruckOffsetSetting; |
uint8_t PressureSensorOffset; |
volatile int16_t HightD = 0; |
volatile int16_t tmpAirPressure; |
volatile uint16_t ZaehlMessungen = 0; |
volatile uint16_t MeasurementCounter = 0; |
|
/*****************************************************/ |
/* Initialize Analog Digital Converter */ |
75,7 → 74,7 |
if(ReadingAirPressure < 900) break; |
} |
SetParamByte(PID_LAST_OFFSET, off); |
DruckOffsetSetting = off; |
PressureSensorOffset = off; |
Delay_ms_Mess(300); |
} |
|
96,7 → 95,7 |
case 0: |
yaw1 = ADC; // get Gyro Yaw Voltage 1st sample |
adc_channel = 1; // set next channel to ADC1 = ROLL GYRO |
ZaehlMessungen++; // increment total measurement counter |
MeasurementCounter++; // increment total measurement counter |
break; |
case 1: |
roll1 = ADC; // get Gyro Roll Voltage 1st sample |
151,7 → 150,6 |
{ |
if(NeutralAccZ > 600) NeutralAccZ-= 0.02; |
} |
messanzahl_AccHoch = 1; |
Current_AccZ = ADC; |
Reading_Integral_Top += AdValueAccTop; // Integrieren |
Reading_Integral_Top -= Reading_Integral_Top / 1024; // dämfen |