Subversion Repositories FlightCtrl

Rev

Rev 2671 | Rev 2679 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2671 Rev 2676
Line 570... Line 570...
570
                        if(!(PINB & 0x04)) VersionInfo.HardwareError[1] |= FC_ERROR1_RC_VOLTAGE;
570
                        if(!(PINB & 0x04)) VersionInfo.HardwareError[1] |= FC_ERROR1_RC_VOLTAGE;
571
                        if(CheckDelay(timer))
571
                        if(CheckDelay(timer))
572
                        {
572
                        {
573
                                static unsigned char second;
573
                                static unsigned char second;
574
                                timer += 20; // 20 ms interval
574
                                timer += 20; // 20 ms interval
-
 
575
//DebugOut.Analog[] = LuftdruckTemperaturOffset;
575
                                CalcNickServoValue();
576
                                CalcNickServoValue();
576
                                if(!CalibrationDone) FC_StatusFlags3 |= FC_STATUS3_NOT_CALIBRATED; else FC_StatusFlags3 &= ~FC_STATUS3_NOT_CALIBRATED;
577
                                if(!CalibrationDone) FC_StatusFlags3 |= FC_STATUS3_NOT_CALIBRATED; else FC_StatusFlags3 &= ~FC_STATUS3_NOT_CALIBRATED;
577
                                // ++++++++++++++++++++++++++++
578
                                // ++++++++++++++++++++++++++++
578
                                // + New direction setpoint from NC
579
                                // + New direction setpoint from NC
579
                                if((NC_CompassSetpoint != -1) && !NeueKompassRichtungMerken)
580
                                if((NC_CompassSetpoint != -1) && !NeueKompassRichtungMerken)
Line 724... Line 725...
724
                                   else
725
                                   else
725
                                   if(ServoFailsafeActive) ServoFailsafeActive--;
726
                                   if(ServoFailsafeActive) ServoFailsafeActive--;
Line 726... Line 727...
726
 
727
 
727
                                   if(FC_StatusFlags & FC_STATUS_FLY) FlugSekunden++;
728
                                   if(FC_StatusFlags & FC_STATUS_FLY) FlugSekunden++;
728
                                   else timer2 = 1450; // 0,5 Minuten aufrunden
729
                                   else timer2 = 1450; // 0,5 Minuten aufrunden
729
                                   if(modell_fliegt < 1024)
730
                                   if(modell_fliegt < 1024 && !BaroCalState)
730
                                    {
731
                                    {
731
                                         if(StartLuftdruck < Luftdruck) StartLuftdruck += 5;
732
                                         if(StartLuftdruck < LuftdruckKompensiert) StartLuftdruck += 5;
732
                                         else
733
                                         else
733
                                         if(StartLuftdruck > Luftdruck) StartLuftdruck -= 5;
734
                                         if(StartLuftdruck > LuftdruckKompensiert) StartLuftdruck -= 5;
734
                                         FC_StatusFlags3 &= ~FC_STATUS3_REDUNDANCE_ERROR;
735
                                         FC_StatusFlags3 &= ~FC_STATUS3_REDUNDANCE_ERROR;
735
                                        }
736
                                        }
736
                                        else
737
                                        else
737
                                        {
738
                                        {
Line 771... Line 772...
771
                if(BytegapSPI == 0)  SPI_TransmitByte();  
772
                if(BytegapSPI == 0)  SPI_TransmitByte();  
772
           }  
773
           }  
773
         else if(BytegapSPI == 0)  SPI_TransmitByte();
774
         else if(BytegapSPI == 0)  SPI_TransmitByte();
774
    }
775
    }
775
}
776
}
776
//DebugOut.Analog[] 
777
//DebugOut.Analog[]