79,6 → 79,7 |
unsigned char blinkcount_LED1 = 0;//Hilfszähler für die blinkende LED (310807Kr) |
unsigned int modell_fliegt_gps = 0;//(030907Kr) |
unsigned char Limit_D_Anteil = 0;//(210907Kr) |
unsigned char Limit_P_Anteil = 0;//(131107Kr) |
|
float GyroFaktor; |
float IntegralFaktor; |
327,9 → 328,9 |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
void DefaultKonstanten1(void) |
{ |
EE_Parameter.Kanalbelegung[K_NICK] = 1; |
EE_Parameter.Kanalbelegung[K_NICK] = 3; // (300807Kr) |
EE_Parameter.Kanalbelegung[K_ROLL] = 2; |
EE_Parameter.Kanalbelegung[K_GAS] = 3; |
EE_Parameter.Kanalbelegung[K_GAS] = 1; // (300807Kr) |
EE_Parameter.Kanalbelegung[K_GIER] = 4; |
EE_Parameter.Kanalbelegung[K_POTI1] = 5; |
EE_Parameter.Kanalbelegung[K_POTI2] = 6; |
351,7 → 352,7 |
EE_Parameter.KompassWirkung = 128; // Wert : 0-250 |
EE_Parameter.Gyro_P = 120; //80 // Wert : 0-250 |
EE_Parameter.Gyro_I = 150; // Wert : 0-250 |
EE_Parameter.UnterspannungsWarnung = 95; // Wert : 0-250 // (160607Kr) |
EE_Parameter.UnterspannungsWarnung = 94; // Wert : 0-250 |
EE_Parameter.NotGas = 35; // Wert : 0-250 // Gaswert bei Empangsverlust |
EE_Parameter.NotGasZeit = 20; // Wert : 0-250 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen |
EE_Parameter.UfoAusrichtung = 0; // X oder + Formation |
374,9 → 375,9 |
|
void DefaultKonstanten2(void) |
{ |
EE_Parameter.Kanalbelegung[K_NICK] = 1; |
EE_Parameter.Kanalbelegung[K_NICK] = 3; // (300807Kr) |
EE_Parameter.Kanalbelegung[K_ROLL] = 2; |
EE_Parameter.Kanalbelegung[K_GAS] = 3; |
EE_Parameter.Kanalbelegung[K_GAS] = 1; // (300807Kr) |
EE_Parameter.Kanalbelegung[K_GIER] = 4; |
EE_Parameter.Kanalbelegung[K_POTI1] = 5; |
EE_Parameter.Kanalbelegung[K_POTI2] = 6; |
398,7 → 399,7 |
EE_Parameter.KompassWirkung = 128; // Wert : 0-250 |
EE_Parameter.Gyro_P = 175; //80 // Wert : 0-250 |
EE_Parameter.Gyro_I = 175; // Wert : 0-250 |
EE_Parameter.UnterspannungsWarnung = 95; // Wert : 0-250 // (160607Kr) |
EE_Parameter.UnterspannungsWarnung = 94; // Wert : 0-250 |
EE_Parameter.NotGas = 35; // Wert : 0-250 // Gaswert bei Empangsverlust |
EE_Parameter.NotGasZeit = 20; // Wert : 0-250 // Zeit bis auf NotGas geschaltet wird, wg. Rx-Problemen |
EE_Parameter.UfoAusrichtung = 0; // X oder + Formation |
656,20 → 657,21 |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
#define LED1_ONTIME 20 |
#define LED1_TOTALTIME 60 //um das Blinkverhalten per Fernsteuerung zu beeinflussen, kann in der LED Routine anstelle von "LED1_TOTALTIME" auch "Parameter_UserParam4" stehen |
|
LED1_OFF; |
|
if(Parameter_UserParam4 >= 200) |
if(LED1_TOTALTIME >= 200) |
{ |
LED1_ON; |
blinkcount_LED1 = 0; |
} |
|
else if(blinkcount_LED1 >= Parameter_UserParam4 && Parameter_UserParam4 > 0 && MotorenEin == 1) |
else if(blinkcount_LED1 >= LED1_TOTALTIME && LED1_TOTALTIME > 0 && MotorenEin == 1) |
{ |
LED1_ON; |
|
if(blinkcount_LED1 >= LED1_ONTIME + Parameter_UserParam4) |
if(blinkcount_LED1 >= LED1_ONTIME + LED1_TOTALTIME) |
{ |
LED1_OFF; |
blinkcount_LED1 = 0; |
813,7 → 815,8 |
{ |
P_GPS_Verstaerkung = Parameter_UserParam1; |
D_GPS_Verstaerkung = Parameter_UserParam2; |
Limit_D_Anteil = Parameter_UserParam3; |
Limit_P_Anteil = Parameter_UserParam3; |
Limit_D_Anteil = Parameter_UserParam4; |
gps_main(); |
} |
else |
828,47 → 831,50 |
{ |
TimerWerteausgabe = 49; |
|
DebugOut.Analog[0] = SenderOkay; |
DebugOut.Analog[1] = GPS_Roll; |
DebugOut.Analog[2] = GPS_Nick; |
DebugOut.Analog[3] = GPS_Positionsabweichung_North; |
DebugOut.Analog[4] = GPS_Positionsabweichung_East; |
DebugOut.Analog[5] = P_Einfluss_East; |
DebugOut.Analog[6] = D_Einfluss_East; |
DebugOut.Analog[7] = P_Einfluss_North; |
DebugOut.Analog[8] = D_Einfluss_North; |
DebugOut.Analog[9] = Soll_Position_North; |
DebugOut.Analog[10] = Soll_Position_East; |
DebugOut.Analog[11] = Parameter_UserParam1; |
DebugOut.Analog[12] = Parameter_UserParam2; |
DebugOut.Analog[13] = Poti3; |
DebugOut.Analog[14] = KompassValue; |
DebugOut.Analog[15] = NORTH_MITTEL; |
DebugOut.Analog[16] = EAST_MITTEL; |
DebugOut.Analog[0] = IntegralNick / EE_Parameter.GyroAccFaktor; |
DebugOut.Analog[1] = IntegralRoll / EE_Parameter.GyroAccFaktor; |
DebugOut.Analog[2] = Mittelwert_AccNick; |
DebugOut.Analog[3] = Mittelwert_AccRoll; |
DebugOut.Analog[4] = Parameter_UserParam1; |
DebugOut.Analog[5] = Parameter_UserParam2; |
DebugOut.Analog[6] = Parameter_UserParam3; |
DebugOut.Analog[7] = Parameter_UserParam4; |
DebugOut.Analog[8] = KompassValue; |
DebugOut.Analog[9] = UBat; |
DebugOut.Analog[10] = SenderOkay; |
DebugOut.Analog[11] = actualPos.GPSFix; |
DebugOut.Analog[12] = motor_rx[0]; //Motorstrom vorne |
DebugOut.Analog[13] = motor_rx[1]; //Motorstrom hinten |
DebugOut.Analog[14] = motor_rx[2]; //Motorstrom links |
DebugOut.Analog[15] = motor_rx[3]; //Motorstrom rechts |
DebugOut.Analog[16] = Poti3; |
DebugOut.Analog[17] = actualPos.altitude; |
DebugOut.Analog[18] = actualPos.GSpeed; |
DebugOut.Analog[19] = actualPos.northing; |
DebugOut.Analog[20] = actualPos.easting; |
DebugOut.Analog[21] = actualPos.velNorth; |
DebugOut.Analog[22] = actualPos.velEast; |
DebugOut.Analog[23] = UBat; |
DebugOut.Analog[24] = (motor_rx[0]+motor_rx[1]+motor_rx[2]+motor_rx[3]); //Gesamtstrom |
DebugOut.Analog[25] = StickRoll; |
DebugOut.Analog[26] = HoehenWert; |
DebugOut.Analog[27] = IntegralNick / EE_Parameter.GyroAccFaktor; |
DebugOut.Analog[28] = IntegralRoll / EE_Parameter.GyroAccFaktor; |
DebugOut.Analog[29] = Mittelwert_AccNick; |
DebugOut.Analog[30] = Mittelwert_AccRoll; |
DebugOut.Analog[31] = StickNick; |
//DebugOut.Analog[32] = StickGier; |
//DebugOut.Analog[33] = actualPos.GPSFix; |
//DebugOut.Analog[34] = motor_rx[0]; //Motorstrom vorne |
//DebugOut.Analog[35] = motor_rx[1]; //Motorstrom hinten |
//DebugOut.Analog[36] = motor_rx[2]; //Motorstrom links |
//DebugOut.Analog[37] = motor_rx[3]; //Motorstrom rechts |
//DebugOut.Analog[38] = GPS_Home_North; |
//DebugOut.Analog[39] = GPS_Home_East; |
//DebugOut.Analog[40] = newData_navPosUtm; |
DebugOut.Analog[18] = actualPos.velNorth; |
DebugOut.Analog[19] = actualPos.velEast; |
DebugOut.Analog[20] = GPS_Positionsabweichung_North; |
DebugOut.Analog[21] = GPS_Positionsabweichung_East; |
DebugOut.Analog[22] = P_Einfluss_North; |
DebugOut.Analog[23] = P_Einfluss_East; |
DebugOut.Analog[24] = D_Einfluss_North; |
DebugOut.Analog[25] = D_Einfluss_East; |
DebugOut.Analog[26] = GPS_North; |
DebugOut.Analog[27] = GPS_East; |
DebugOut.Analog[28] = GPS_Roll; |
DebugOut.Analog[29] = GPS_Nick; |
DebugOut.Analog[30] = StickNick; |
DebugOut.Analog[31] = StickRoll; |
|
//DebugOut.Analog[32] = (motor_rx[0]+motor_rx[1]+motor_rx[2]+motor_rx[3]); //Gesamtstrom |
//DebugOut.Analog[33] = StickGier; |
//DebugOut.Analog[34] = actualPos.GSpeed; |
//DebugOut.Analog[35] = GPS_Home_North; |
//DebugOut.Analog[36] = GPS_Home_East; |
//DebugOut.Analog[37] = Soll_Position_North; |
//DebugOut.Analog[38] = Soll_Position_East; |
//DebugOut.Analog[39] = actualPos.northing; |
//DebugOut.Analog[40] = actualPos.easting; |
//DebugOut.Analog[41] = NORTH_MITTEL; |
//DebugOut.Analog[42] = EAST_MITTEL; |
|
} |
|
905,7 → 911,7 |
{ |
if(Parameter_MaxHoehe < 50) |
{ |
SollHoehe = HoehenWert - 40; // Parameter_MaxHoehe ist der PPM-Wert des Schalters // (160607Kr) |
SollHoehe = HoehenWert - 20; // Parameter_MaxHoehe ist der PPM-Wert des Schalters |
HoehenReglerAktiv = 0; |
} |
else |
913,7 → 919,7 |
} |
else |
{ |
SollHoehe = Parameter_MaxHoehe * EE_Parameter.Hoehe_Verstaerkung - 40; // (160607Kr) |
SollHoehe = Parameter_MaxHoehe * EE_Parameter.Hoehe_Verstaerkung - 20; |
HoehenReglerAktiv = 1; |
} |
|