Rev 1332 | Rev 1338 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1332 | Rev 1334 | ||
---|---|---|---|
Line 1301... | Line 1301... | ||
1301 | } |
1301 | } |
1302 | } |
1302 | } |
1303 | else |
1303 | else |
1304 | { //height control is activated |
1304 | { //height control is activated |
1305 | HoehenReglerAktiv = 1; // enable height control |
1305 | HoehenReglerAktiv = 1; // enable height control |
1306 | delay = 40; |
1306 | delay = 200; |
1307 | } |
1307 | } |
1308 | } |
1308 | } |
1309 | else // no switchable height control |
1309 | else // no switchable height control |
1310 | { |
1310 | { |
1311 | SollHoehe = ((int16_t) ExternHoehenValue + (int16_t) Parameter_MaxHoehe) * (int)EE_Parameter.Hoehe_Verstaerkung; |
1311 | SollHoehe = ((int16_t) ExternHoehenValue + (int16_t) Parameter_MaxHoehe) * (int)EE_Parameter.Hoehe_Verstaerkung; |
Line 1372... | Line 1372... | ||
1372 | SollHoehe = HoehenWert; // update setpoint to current height |
1372 | SollHoehe = HoehenWert; // update setpoint to current height |
1373 | if(EE_Parameter.ExtraConfig & CFG2_VARIO_BEEP) beeptime = 500; |
1373 | if(EE_Parameter.ExtraConfig & CFG2_VARIO_BEEP) beeptime = 500; |
1374 | } |
1374 | } |
1375 | } |
1375 | } |
1376 | // Trim height set point |
1376 | // Trim height set point |
1377 | if(abs(HeightTrimming) > 256) |
1377 | if(abs(HeightTrimming) > 512) |
1378 | { |
1378 | { |
1379 | SollHoehe += (HeightTrimming * EE_Parameter.Hoehe_Verstaerkung)/(5 * 512 / 2); // move setpoint |
1379 | SollHoehe += (HeightTrimming * EE_Parameter.Hoehe_Verstaerkung)/(5 * 512 / 2); // move setpoint |
1380 | HeightTrimming = 0; |
1380 | HeightTrimming = 0; |
1381 | if(EE_Parameter.ExtraConfig & CFG2_VARIO_BEEP) beeptime = 75; |
1381 | if(EE_Parameter.ExtraConfig & CFG2_VARIO_BEEP) beeptime = 75; |
1382 | //update hoover gas stick value when setpoint is shifted |
1382 | //update hoover gas stick value when setpoint is shifted |
Line 1386... | Line 1386... | ||
1386 | StickGasHoover = (StickGasHoover * UBat) / BattLowVoltageWarning; |
1386 | StickGasHoover = (StickGasHoover * UBat) / BattLowVoltageWarning; |
1387 | if(StickGasHoover < 70) StickGasHoover = 70; |
1387 | if(StickGasHoover < 70) StickGasHoover = 70; |
1388 | else if(StickGasHoover > 150) StickGasHoover = 150; |
1388 | else if(StickGasHoover > 150) StickGasHoover = 150; |
1389 | } |
1389 | } |
1390 | } |
1390 | } |
1391 | 1391 | ||
1392 | } //if MikroKopterFlags & MKFLAG_FLY |
1392 | } //if MikroKopterFlags & MKFLAG_FLY |
1393 | else |
1393 | else |
1394 | { |
1394 | { |
1395 | SollHoehe = HoehenWert - 400; |
1395 | SollHoehe = HoehenWert - 400; |
1396 | if(EE_Parameter.Hoehe_StickNeutralPoint) StickGasHoover = EE_Parameter.Hoehe_StickNeutralPoint; |
1396 | if(EE_Parameter.Hoehe_StickNeutralPoint) StickGasHoover = EE_Parameter.Hoehe_StickNeutralPoint; |