Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2027 → Rev 2028

/trunk/eeprom.c
138,7 → 138,7
EE_Parameter.BitConfig = 0; // Looping usw.
EE_Parameter.GlobalConfig = CFG_ACHSENKOPPLUNG_AKTIV | CFG_KOMPASS_AKTIV | CFG_GPS_AKTIV | CFG_HOEHEN_SCHALTER;
EE_Parameter.ExtraConfig = CFG_GPS_AID | CFG2_VARIO_BEEP;
EE_Parameter.GlobalConfig3 = 0;
EE_Parameter.GlobalConfig3 = CFG3_VARIO_FAILSAFE;
EE_Parameter.Receiver = RECEIVER_JETI;
EE_Parameter.MotorSafetySwitch = 0;
EE_Parameter.ExternalControl = 0;
212,7 → 212,7
EE_Parameter.OrientationAngle = 0;
EE_Parameter.CareFreeModeControl = 0;
EE_Parameter.UnterspannungsWarnung = 33; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50)
EE_Parameter.NotGas = 45; // Wert : 0-247 // Gaswert bei Empangsverlust
EE_Parameter.NotGas = 80; // Wert : 0-247 // Gaswert bei Empangsverlust (in Prozent)
EE_Parameter.NotGasZeit = 90; // Wert : 0-247 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen
EE_Parameter.MotorSmooth = 0;
EE_Parameter.ComingHomeAltitude = 0; // 0 = don't change
388,6 → 388,10
if(setnumber > 5) setnumber = 5;
if(setnumber < 1) return 0;
LIBFC_CheckSettings();
if(EE_Parameter.GlobalConfig3 & CFG3_VARIO_FAILSAFE) // check the Setting: Not more than 100% emergency gas
{
if(EE_Parameter.NotGas > 99) EE_Parameter.NotGas = 80; // i.e. 80% of Hovergas
}
// update checksum
EE_Parameter.crc = RAM_Checksum((uint8_t*)(&EE_Parameter), sizeof(EE_Parameter)-1);
 
/trunk/fc.c
172,6 → 172,7
signed int KopplungsteilNickRoll,KopplungsteilRollNick;
signed int tmp_motorwert[MAX_MOTORS];
char VarioCharacter = ' ';
unsigned int HooverGasEmergencyPercent = 0; // The gas value for Emergency landing
 
#define LIMIT_MIN(value, min) {if(value <= min) value = min;}
#define LIMIT_MAX(value, max) {if(value >= max) value = max;}
678,12 → 679,19
static long ausgleichNick, ausgleichRoll;
int IntegralNickMalFaktor,IntegralRollMalFaktor;
unsigned char i;
unsigned int HooverGas80Percent;
Mittelwert();
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Gaswert ermitteln
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
HooverGas80Percent = HoverGas/(STICK_GAIN + STICK_GAIN/4); // 80% of Hovergas
if(EE_Parameter.GlobalConfig3 & CFG3_VARIO_FAILSAFE)
{
if(HoverGas && HoverGas < 150 * STICK_GAIN)
{
HooverGasEmergencyPercent = (HoverGas/(STICK_GAIN) * EE_Parameter.NotGas) / 100; // i.e. 80% of Hovergas
}
else HooverGasEmergencyPercent = 45; // default if the Hoovergas was could not calculated yet
} else HooverGasEmergencyPercent = EE_Parameter.NotGas;
 
GasMischanteil = StickGas;
if(GasMischanteil < MIN_GAS + 10) GasMischanteil = MIN_GAS + 10;
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
701,11 → 709,7
ROT_ON;
if(modell_fliegt > 1000 && Capacity.MinOfMaxPWM > 100) // wahrscheinlich in der Luft --> langsam absenken
{
GasMischanteil = EE_Parameter.NotGas;
if(EE_Parameter.GlobalConfig3 & CFG3_VARIO_FAILSAFE)
{
if(HoverGas && HoverGas < 150 * STICK_GAIN) GasMischanteil = HooverGas80Percent; // 80% of Hovergas
}
GasMischanteil = HooverGasEmergencyPercent;
FC_StatusFlags |= FC_STATUS_EMERGENCY_LANDING;
PPM_diff[EE_Parameter.Kanalbelegung[K_NICK]] = 0;
PPM_diff[EE_Parameter.Kanalbelegung[K_ROLL]] = 0;
1735,13 → 1739,14
FC_StatusFlags |= (FC_STATUS_VARIO_TRIM_UP|FC_STATUS_VARIO_TRIM_DOWN);
} // EOF no height control
 
// limit gas to parameter setting
// Linits the maximum gas in case of "Out of Range emergency landing"
if(NC_To_FC_Flags & NC_TO_FC_EMERGENCY_LANDING)
{
if(GasMischanteil/STICK_GAIN > HooverGas80Percent && HoverGas) GasMischanteil = HooverGas80Percent * STICK_GAIN;
if(GasMischanteil/STICK_GAIN > HooverGasEmergencyPercent && HoverGas) GasMischanteil = HooverGasEmergencyPercent * STICK_GAIN;
beeptime = 15000;
BeepMuster = 0x0E00;
}
// limit gas to parameter setting
LIMIT_MIN(GasMischanteil, (MIN_GAS + 10) * STICK_GAIN);
if(GasMischanteil > (MAX_GAS - 20) * STICK_GAIN) GasMischanteil = (MAX_GAS - 20) * STICK_GAIN;
 
/trunk/libfc644.a
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream