Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1689 → Rev 1690

/trunk/eeprom.c
164,9 → 164,9
EE_Parameter.Gyro_Gier_P = 80; // Wert : 0-247
EE_Parameter.Gyro_Gier_I = 150; // Wert : 0-247
EE_Parameter.Gyro_Stability = 6; // Wert : 1-8
EE_Parameter.UnterspannungsWarnung = 33; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50)
EE_Parameter.NotGas = 35; // Wert : 0-247 // Gaswert bei Empangsverlust
EE_Parameter.NotGasZeit = 60; // Wert : 0-247 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen
EE_Parameter.UnterspannungsWarnung = 34; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50)
EE_Parameter.NotGas = 45; // Wert : 0-247 // Gaswert bei Empangsverlust
EE_Parameter.NotGasZeit = 90; // Wert : 0-247 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen
EE_Parameter.I_Faktor = 32;
EE_Parameter.UserParam1 = 0; // zur freien Verwendung
EE_Parameter.UserParam2 = 0; // zur freien Verwendung
273,7 → 273,7
EE_Parameter.Gyro_Gier_P = 90; // Wert : 0-247
EE_Parameter.Gyro_Gier_I = 120; // Wert : 0-247
EE_Parameter.Gyro_Stability = 6; // Wert : 1-8
EE_Parameter.UnterspannungsWarnung = 33; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50)
EE_Parameter.UnterspannungsWarnung = 34; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50)
EE_Parameter.NotGas = 35; // Wert : 0-247 // Gaswert bei Empangsverlust
EE_Parameter.NotGasZeit = 60; // Wert : 0-247 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen
EE_Parameter.I_Faktor = 32;
381,7 → 381,7
EE_Parameter.Gyro_Gier_P = 100; // Wert : 0-247
EE_Parameter.Gyro_Gier_I = 120; // Wert : 0-247
EE_Parameter.Gyro_Stability = 6; // Wert : 1-8
EE_Parameter.UnterspannungsWarnung = 33; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50)
EE_Parameter.UnterspannungsWarnung = 34; // Wert : 0-247 ( Automatische Zellenerkennung bei < 50)
EE_Parameter.NotGas = 35; // Wert : 0-247 // Gaswert bei Empangsverlust
EE_Parameter.NotGasZeit = 60; // Wert : 0-247 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen
EE_Parameter.I_Faktor = 16;
414,7 → 414,7
EE_Parameter.AchsKopplung2 = 80;
EE_Parameter.CouplingYawCorrection = 70;
EE_Parameter.GyroAccAbgleich = 32; // 1/k
EE_Parameter.DynamicStability = 50;
EE_Parameter.DynamicStability = 70;
EE_Parameter.J16Bitmask = 95;
EE_Parameter.J17Bitmask = 243;
EE_Parameter.WARN_J16_Bitmask = 0xAA;
/trunk/fc.c
593,7 → 593,7
MIN_GAS = EE_Parameter.Gas_Min;
 
tmp = EE_Parameter.OrientationModeControl;
if(tmp > 50 && NaviDataOkay > 200)
if(tmp > 50)
{
#ifdef SWITCH_LEARNS_CAREFREE
if(!CareFree) ControlHeading = (((int) EE_Parameter.OrientationAngle * 15 + KompassValue) % 360) / 2;
603,6 → 603,12
}
else CareFree = 0;
 
if(CareFree && FromNaviCtrl.CompassValue == -2 && BeepMuster == 0xffff)
{
beeptime = 15000;
BeepMuster = 0xA400;
CareFree = 0;
}
if(CareFree) {if(Parameter_AchsKopplung1 < 210) Parameter_AchsKopplung1 += 30;}
}
 
1628,10 → 1634,6
if(SummeNick > (STICK_GAIN * 16000L)) SummeNick = (STICK_GAIN * 16000L);
if(SummeNick < -(16000L * STICK_GAIN)) SummeNick = -(16000L * STICK_GAIN);
 
DebugOut.Analog[16] = MesswertNick;
DebugOut.Analog[17] = DiffNick;
 
 
if(Parameter_UserParam5 > 50)
pd_ergebnis_nick = (EE_Parameter.Gyro_Stability * DiffNick) / 8 + SummeNick / Ki; // PI-Regler für Nick
else
1651,10 → 1653,10
if(SummeRoll > (STICK_GAIN * 16000L)) SummeRoll = (STICK_GAIN * 16000L);
if(SummeRoll < -(16000L * STICK_GAIN)) SummeRoll = -(16000L * STICK_GAIN);
 
if(Parameter_UserParam5 > 50)
//if(Parameter_UserParam5 > 50)
pd_ergebnis_roll = (EE_Parameter.Gyro_Stability * DiffRoll) / 8 + SummeRoll / Ki; // PI-Regler für Roll
else
pd_ergebnis_roll = DiffRoll + SummeRoll / Ki; // PI-Regler für Roll
//else
// pd_ergebnis_roll = DiffRoll + SummeRoll / Ki; // PI-Regler für Roll
 
tmp_int = (long)((long)Parameter_DynamicStability * (long)(GasMischanteil + abs(GierMischanteil)/2)) / 64;
if(pd_ergebnis_roll > tmp_int) pd_ergebnis_roll = tmp_int;
1683,9 → 1685,12
else if(Mixer.Motor[i][3] == -64) tmp_int -= GierMischanteil;
else tmp_int += ((long)GierMischanteil * Mixer.Motor[i][3]) / 64L;
 
//if(Parameter_UserParam4 < 50)
{
if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing
else tmp_int = 2 * tmp_int - tmp_motorwert[i]; // MotorSmoothing
 
}
/*
if(Parameter_UserParam5 > 50)
{
/trunk/fc.h
51,6 → 51,7
extern int ErsatzKompassInGrad; // Kompasswert in Grad
extern long HoehenWert;
extern long SollHoehe;
extern unsigned char CareFree;
extern int MesswertNick,MesswertRoll,MesswertGier;
extern int AdNeutralNick,AdNeutralRoll,AdNeutralGier, Mittelwert_AccNick, Mittelwert_AccRoll,Mittelwert_AccHoch;
extern unsigned int NeutralAccX, NeutralAccY;
/trunk/jetimenu.c
41,22 → 41,17
{ //0123456789ABCDEF
// JetiBox_printfxy(0,0,"Nick Roll Yaw");
// JetiBox_printfxy(0,1,"%4i %4i %4i", (int16_t)(IntegralNick/1024), (int16_t)(IntegralRoll/1024), (int16_t)(ErsatzKompass / GIER_GRAD_FAKTOR));
if(RequiredMotors <= 4)
{
JetiBox_printfxy(0,0,"Temperatures");
JetiBox_printfxy(0,1,"%3i %3i %3i %3i", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature);
}
else
if(RequiredMotors <= 6)
{
JetiBox_printfxy(0,0,"%3i %3i %3i %3i", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature);
JetiBox_printfxy(0,1,"%3i %3i C ", Motor[4].Temperature, Motor[5].Temperature);
}
else
{
JetiBox_printfxy(0,0,"%3i %3i %3i %3i", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature);
JetiBox_printfxy(0,1,"%3i %3i %3i %3i", Motor[4].Temperature, Motor[5].Temperature, Motor[6].Temperature, Motor[7].Temperature);
}
if(RequiredMotors <= 4)
{
JetiBox_printfxy(0,1,"Temperatures ");
}
else
if(RequiredMotors <= 6)
{
JetiBox_printfxy(8,1,"\%cC ",0xdf);
}
}
 
void Menu_Battery(uint8_t key)
70,27 → 65,24
{
if(NaviDataOkay)
{
JetiBox_printfxy(0,0,"Sat:%02d", GPSInfo.NumOfSats);
JetiBox_printfxy(0,0,"%2um/s Sat:%d ",GPSInfo.Speed,GPSInfo.NumOfSats);
switch (GPSInfo.SatFix)
{
case SATFIX_NONE:
JetiBox_printfxy(7,0,"NoFix");
case SATFIX_3D:
JetiBox_printfxy(12,0," 3D");
break;
 
case SATFIX_2D:
JetiBox_printfxy(7,0,"2DFix");
break;
case SATFIX_3D:
JetiBox_printfxy(7,0,"3DFix");
break;
case SATFIX_NONE:
default:
JetiBox_printfxy(7,0,"??Fix");
JetiBox_printfxy(12,0,"NoFx");
break;
}
if(GPSInfo.Flags & FLAG_DIFFSOLN)
{
JetiBox_printfxy(9,0,"/DGPS");
JetiBox_printfxy(12,0,"DGPS");
}
JetiBox_printfxy(0,1,"Home:%03dm %03d%c", GPSInfo.HomeDistance/10, GPSInfo.HomeBearing, 0xDF);
JetiBox_printfxy(0,1,"Home:%3dm %3d%c", GPSInfo.HomeDistance/10, GPSInfo.HomeBearing, 0xDF);
}
else
{ //0123456789ABCDEF
/trunk/libfc1284.a
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/libfc644.a
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/main.c
329,6 → 329,7
GPS_Roll = 0;
//if(!beeptime)
FCFlags |= FCFLAG_SPI_RX_ERR;
FromNaviCtrl.CompassValue = -2;
}
if(UBat < BattLowVoltageWarning)
{
/trunk/makefile
6,7 → 6,7
#-------------------------------------------------------------------
VERSION_MAJOR = 0
VERSION_MINOR = 79
VERSION_PATCH = 12
VERSION_PATCH = 13
VERSION_SERIAL_MAJOR = 11 # Serial Protocol
VERSION_SERIAL_MINOR = 0 # Serial Protocol
NC_SPI_COMPATIBLE = 13 # Navi-Kompatibilität
/trunk/spi.c
19,7 → 19,7
unsigned char *SPI_TX_Buffer;
 
unsigned char SPITransferCompleted, SPI_ChkSum;
unsigned char SPI_RxDataValid,NaviDataOkay = 0;
unsigned char SPI_RxDataValid,NaviDataOkay = 250;
 
unsigned char SPI_CommandSequence[] = {SPI_FCCMD_STICK, SPI_FCCMD_USER, SPI_FCCMD_PARAMETER1, SPI_FCCMD_STICK, SPI_FCCMD_MISC, SPI_FCCMD_VERSION, SPI_FCCMD_STICK, SPI_FCCMD_SERVOS, SPI_FCCMD_ACCU};
unsigned char SPI_CommandCounter = 0;
271,7 → 271,8
GPS_Nick = FromNaviCtrl.GPS_Nick;
GPS_Roll = FromNaviCtrl.GPS_Roll;
}
if(FromNaviCtrl.CompassValue <= 360) KompassValue = FromNaviCtrl.CompassValue;
 
if(FromNaviCtrl.CompassValue <= 360) KompassValue = FromNaviCtrl.CompassValue;
KompassRichtung = ((540 + KompassValue - KompassStartwert) % 360) - 180;
 
if(FromNaviCtrl.BeepTime > beeptime && !WinkelOut.CalcState) beeptime = FromNaviCtrl.BeepTime;
300,6 → 301,7
GPSInfo.Flags = FromNaviCtrl.Param.Byte[0];
GPSInfo.NumOfSats = FromNaviCtrl.Param.Byte[1];
GPSInfo.SatFix = FromNaviCtrl.Param.Byte[2];
GPSInfo.Speed = FromNaviCtrl.Param.Byte[3];
GPSInfo.HomeDistance = FromNaviCtrl.Param.Int[2];
GPSInfo.HomeBearing = FromNaviCtrl.Param.sInt[3];
break;
/trunk/spi.h
150,6 → 150,7
unsigned char Flags; // Status Flags
unsigned char NumOfSats; // number of satelites
unsigned char SatFix; // type of satfix
unsigned char Speed; // m/sek
unsigned int HomeDistance; // distance to Home in dm
int HomeBearing; // bearing to home in deg
};
/trunk/version.txt
414,4 → 414,18
0.79M H.Buss
- AccZ wurde zu langsam nachgeführt
- JetiMenü: bis acht Temperaturen
- JetiMenü: bis acht Temperaturen der BL-Regler
 
0.79N H.Buss
- Notgas = 45
- NotgasZeit = 90
- Beginnersetting: EE_Parameter.DynamicStability = 70;
- EE_Parameter.UnterspannungsWarnung = 34
- GyroStability = 6
- MotorSmooth() an
- GPSInfo.Speed im JEti-Display
- Beepen, wenn Carefree ohne Navi
- Beepen, NC ausfällt