463,7 → 463,7 |
static int32_t IntegralErrorRoll = 0; |
static uint16_t RcLostTimer; |
static uint8_t delay_neutral = 0, delay_startmotors = 0, delay_stopmotors = 0; |
static uint16_t Modell_Is_Flying = 0; |
static uint16_t Model_Is_Flying = 0; |
static uint8_t HeightControlActive = 0; |
static int16_t HeightControlThrust = 0; |
static int8_t TimerDebugOut = 0; |
503,7 → 503,7 |
EmergencyLanding = 0; // emergency landing is over |
} |
ROT_ON; // set red led |
if(Modell_Is_Flying > 2000) // wahrscheinlich in der Luft --> langsam absenken |
if(Model_Is_Flying > 2000) // wahrscheinlich in der Luft --> langsam absenken |
{ |
ThrustMixFraction = ParamSet.EmergencyThrust; // set emergency thrust |
EmergencyLanding = 1; // enable emergency landing |
527,9 → 527,9 |
RcLostTimer = ParamSet.EmergencyThrustDuration * 50; |
if(ThrustMixFraction > 40) |
{ |
if(Modell_Is_Flying < 0xFFFF) Modell_Is_Flying++; |
if(Model_Is_Flying < 0xFFFF) Model_Is_Flying++; |
} |
if((Modell_Is_Flying < 200) || (ThrustMixFraction < 40)) |
if((Model_Is_Flying < 200) || (ThrustMixFraction < 40)) |
{ |
SumPitch = 0; |
SumRoll = 0; |
549,7 → 549,7 |
{ |
delay_neutral = 0; |
GRN_OFF; |
Modell_Is_Flying = 0; |
Model_Is_Flying = 0; |
// check roll/pitch stick position |
// if pitch stick is topmost or roll stick is leftmost --> change parameter setting |
// according to roll/pitch stick position |
590,7 → 590,7 |
delay_neutral = 0; |
GRN_OFF; |
SetParamWord(PID_ACC_PITCH, 0xFFFF); // make value invalid |
Modell_Is_Flying = 0; |
Model_Is_Flying = 0; |
SetNeutral(); |
// Save ACC neutral settings to eeprom |
SetParamWord(PID_ACC_PITCH, (uint16_t)NeutralAccX); |
614,7 → 614,7 |
if(++delay_startmotors > 200) // not immediately (wait 200 loops = 200 * 2ms = 0.4 s) |
{ |
delay_startmotors = 200; // do not repeat if once executed |
Modell_Is_Flying = 1; |
Model_Is_Flying = 1; |
MotorsOn = 1; |
SetPointYaw = 0; |
Reading_IntegralGyroYaw = 0; |
637,7 → 637,7 |
if(++delay_stopmotors > 200) // not immediately (wait 200 loops = 200 * 2ms = 0.4 s) |
{ |
delay_stopmotors = 200; // do not repeat if once executed |
Modell_Is_Flying = 0; |
Model_Is_Flying = 0; |
MotorsOn = 0; |
GPS_ClearHomePosition(); |
} |