194,6 → 194,7 |
signed int DriftNick = 0, DriftRoll = 0; |
unsigned char ServoFailsafeActive = 0; // moves Servos into the FS-Position |
unsigned char Partner_StatusFlags = 0, Partner_StatusFlags2 = 0,Partner_StatusFlags3 = 0; |
signed char BaroExpandCnt = 0; // needed to detect a defctive baro-sensor |
|
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
#define OPA_OFFSET_STEP 5 |
1689,6 → 1690,7 |
if(OCR0A < (255 - OPA_OFFSET_STEP)) |
{ |
ExpandBaro -= 1; |
BaroExpandCnt -= 50; |
OCR0A = DruckOffsetSetting - OPA_OFFSET_STEP * ExpandBaro; // increase offset to shift ADC down |
OCR0B = 255 - OCR0A; |
beeptime = 300; |
1711,6 → 1713,7 |
if(OCR0A > OPA_OFFSET_STEP) |
{ |
ExpandBaro += 1; |
BaroExpandCnt += 50; // is decere |
OCR0A = DruckOffsetSetting - OPA_OFFSET_STEP * ExpandBaro; // decrease offset to shift ADC up |
OCR0B = 255 - OCR0A; |
beeptime = 300; |
1745,6 → 1748,7 |
#endif |
sei(); |
BaroExpandActive--; |
if(abs(BaroExpandCnt) > 75) VersionInfo.HardwareError[0] |= FC_ERROR0_PRESSURE; // defective Baro-Sensor detected |
} |
// if height control is activated by an rc channel |
if(Parameter_GlobalConfig & CFG_HOEHEN_SCHALTER) // Regler wird über Schalter gesteuert |