80,14 → 80,16 |
WinkelOut.CalcState++; |
if(WinkelOut.CalcState > 4) |
{ |
// WinkelOut.CalcState = 0; // in Uart.c |
// WinkelOut.CalcState = 0; // in SPI.c |
beeptime = 1000; |
} |
else Piep(WinkelOut.CalcState,150); |
} |
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
ShowCmpsCalibrateTime = 6; |
#endif |
} |
|
|
void LipoDetection(unsigned char print) |
{ |
unsigned int warning; |
224,7 → 226,7 |
DDRB = 0x00; |
PORTB = 0x00; |
DDRD = 0x0A; // UART & J3 J4 J5 |
PORTD = 0x5F; // PPM-Input & UART |
PORTD = 0x7F; // PPM-Input & UART |
for(timer = 0; timer < 1000; timer++); // verzögern |
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
unsigned char AccZ_ErrorCnt = 0; |
261,7 → 263,7 |
DDRC |=0x40; // HEF4017 Reset |
PORTC = 0xff; // Pullup SDA |
DDRB = 0x1B; // LEDs und Druckoffset |
PORTB = 0x01; // LED_Rot |
PORTB = 0x05; // LED_Rot & pullup on PB2 (RC-Voltage detection) |
|
HEF4017Reset_ON; |
MCUSR &=~(1<<WDRF); |
493,11 → 495,13 |
if(CalculateServoSignals) CalculateServo(); |
DatenUebertragung(); |
BearbeiteRxDaten(); |
if(!(PINB & 0x04)) VersionInfo.HardwareError[1] |= FC_ERROR1_RC_VOLTAGE; |
if(CheckDelay(timer)) |
{ |
static unsigned char second; |
timer += 20; // 20 ms interval |
CalcNickServoValue(); |
if(!CalibrationDone) FC_StatusFlags3 |= FC_STATUS3_NOT_CALIBRATED; else FC_StatusFlags3 &= ~FC_STATUS3_NOT_CALIBRATED; |
// ++++++++++++++++++++++++++++ |
// + New direction setpoint from NC |
if((NC_CompassSetpoint != -1) && !NeueKompassRichtungMerken) |
636,6 → 640,7 |
if(ShowSettingNameTime) ShowSettingNameTime--; |
if(Show_Load_Time) Show_Load_Time--; |
if(Show_Store_Time) Show_Store_Time--; |
if(ShowCmpsCalibrateTime) ShowCmpsCalibrateTime--; |
#endif |
if(NC_To_FC_Flags & NC_TO_FC_FAILSAFE_LANDING) ServoFailsafeActive = SERVO_FS_TIME; |
else |