Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1681 → Rev 1682

/trunk/fc.c
179,7 → 179,6
DebugOut.Analog[9] = UBat;
DebugOut.Analog[10] = SenderOkay;
DebugOut.Analog[11] = ErsatzKompass / GIER_GRAD_FAKTOR;
DebugOut.Analog[16] = Capacity.MinOfMaxPWM;
DebugOut.Analog[20] = ServoNickValue;
DebugOut.Analog[22] = Capacity.ActualCurrent;
DebugOut.Analog[23] = Capacity.UsedCapacity;
190,7 → 189,8
// DebugOut.Analog[28] = (int)FromNaviCtrl_Value.Kalman_MaxFusion;
// DebugOut.Analog[29] = (int)FromNaviCtrl_Value.Kalman_K;
//DebugOut.Analog[28] = I2CError;
DebugOut.Analog[29] = FromNaviCtrl_Value.SerialDataOkay;
// DebugOut.Analog[29] = FromNaviCtrl_Value.SerialDataOkay;
DebugOut.Analog[29] = Capacity.MinOfMaxPWM;
DebugOut.Analog[30] = GPS_Nick;
DebugOut.Analog[31] = GPS_Roll;
}
594,7 → 594,10
tmp = EE_Parameter.OrientationModeControl;
if(tmp > 50 && NaviDataOkay > 200)
{
CareFree = 1;
#ifdef SWITCH_LEARNS_CAREFREE
if(!CareFree) ControlHeading = (((int) EE_Parameter.OrientationAngle * 15 + KompassValue) % 360) / 2;
#endif
CareFree = 1;
if(tmp >= 248 && Poti[255 - tmp] < 50) CareFree = 0;
}
else CareFree = 0;
669,11 → 672,11
{
SummeNick = 0;
SummeRoll = 0;
sollGier = 0;
Mess_Integral_Gier = 0;
if(modell_fliegt == 250)
{
NeueKompassRichtungMerken = 1;
sollGier = 0;
Mess_Integral_Gier = 0;
// Mess_Integral_Gier2 = 0;
}
} else FCFlags |= FCFLAG_FLY;
1619,12 → 1622,17
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Nick-Achse
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#define ABSCHWAECHEN 2
DiffNick = MesswertNick - StickNick; // Differenz bestimmen
if(IntegralFaktor) SummeNick += IntegralNickMalFaktor - StickNick; // I-Anteil bei Winkelregelung
else SummeNick += DiffNick; // I-Anteil bei HH
if(SummeNick > (STICK_GAIN * 16000L)) SummeNick = (STICK_GAIN * 16000L);
if(SummeNick < -(16000L * STICK_GAIN)) SummeNick = -(16000L * STICK_GAIN);
pd_ergebnis_nick = DiffNick + SummeNick / Ki; // PI-Regler für Nick
if(Parameter_UserParam5 > 50)
pd_ergebnis_nick = DiffNick/ABSCHWAECHEN + SummeNick / Ki; // PI-Regler für Nick
else
pd_ergebnis_nick = DiffNick + SummeNick / Ki; // PI-Regler für Nick
 
// Motor Vorn
tmp_int = (long)((long)Parameter_DynamicStability * (long)(GasMischanteil + abs(GierMischanteil)/2)) / 64;
if(pd_ergebnis_nick > tmp_int) pd_ergebnis_nick = tmp_int;
1638,11 → 1646,20
else SummeRoll += DiffRoll; // I-Anteil bei HH
if(SummeRoll > (STICK_GAIN * 16000L)) SummeRoll = (STICK_GAIN * 16000L);
if(SummeRoll < -(16000L * STICK_GAIN)) SummeRoll = -(16000L * STICK_GAIN);
 
if(Parameter_UserParam5 > 50)
pd_ergebnis_roll = DiffRoll/ABSCHWAECHEN + 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;
if(pd_ergebnis_roll < -tmp_int) pd_ergebnis_roll = -tmp_int;
 
DebugOut.Analog[17] = SummeRoll / 4;
DebugOut.Analog[16] = SummeNick / 4;
DebugOut.Analog[18] = Mess_Integral_Gier/2;
 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Universal Mixer
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/trunk/jetimenu.c
42,7 → 42,7
// 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));
JetiBox_printfxy(0,0,"Temperatures");
JetiBox_printfxy(0,1,"%4i %4i %4i", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature);
JetiBox_printfxy(0,1,"%3i %3i %3i %3i", Motor[0].Temperature, Motor[1].Temperature, Motor[2].Temperature, Motor[3].Temperature);
}
 
void Menu_Battery(uint8_t key)
/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
312,7 → 312,7
BeepMuster = 0x0c00;
}
}
if(NaviDataOkay)
if(NaviDataOkay > 200)
{
NaviDataOkay--;
FCFlags &= ~FCFLAG_SPI_RX_ERR;
319,9 → 319,15
}
else
{
if(NC_Version.Compatible && BeepMuster == 0xffff)
{
beeptime = 15000;
BeepMuster = 0xA000;
}
GPS_Nick = 0;
GPS_Roll = 0;
if(!beeptime) FCFlags |= FCFLAG_SPI_RX_ERR;
//if(!beeptime)
FCFlags |= FCFLAG_SPI_RX_ERR;
}
if(UBat < BattLowVoltageWarning)
{
/trunk/main.h
1,10 → 1,12
#ifndef _MAIN_H
#define _MAIN_H
 
 
//#define DEBUG // use to activate debug output to MK-Tool: use Debug(text);
 
//#define ACT_S3D_SUMMENSIGNAL
//#define RECEIVER_SPEKTRUM_EXP
//#define SWITCH_LEARNS_CAREFREE
 
// neue Hardware
#define ROT_OFF {if((PlatinenVersion == 10)||(PlatinenVersion >= 20)) PORTB &=~0x01; else PORTB |= 0x01;}
/trunk/uart.c
98,10 → 98,10
"Motor 2 ",
"Motor 3 ",
"Motor 4 ", //15
"BL Limit ",
" ",
" ",
" ",
" ",
"Servo ", //20
"Hovergas ",
"Current [0.1A] ",
111,7 → 111,7
" ",
" ",
"I2C-Error ",
" ", // "Navi Serial Data",
"BL Limit ",
"GPS_Nick ", //30
"GPS_Roll "
};
/trunk/version.txt
402,3 → 402,8
0.79j S.Pendsa & H.Buss 22.06.2010
- RECEIVER_SPEKTRUM_EXP
0.79k H.Buss
- #define SWITCH_LEARNS_CAREFREE eingeführt
- Piepen, wenn NC-Kommunikation wegfällt
- Da kann man mit UserParameter5 wieder das Verhalten der 0.79b herstellen