1285,7 → 1285,7 |
// if height control is activated |
if((EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG) && !(Looping_Roll || Looping_Nick)) // Höhenregelung |
{ |
#define HOVER_GAS_AVERAGE 4096L // 4096 * 2ms = 8.2s averaging |
#define HOVER_GAS_AVERAGE 16384L // 4096 * 2ms = 8.2s averaging |
#define HC_GAS_AVERAGE 4 // 4 * 2ms= 8ms averaging |
|
#if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
1293,7 → 1293,7 |
#else |
#define OPA_OFFSET_STEP 10 |
#endif |
int HCGas, HeightDeviation = 0,GasReduction; |
int HCGas, HeightDeviation = 0,GasReduction = 0; |
static int HeightTrimming = 0; // rate for change of height setpoint |
static int FilterHCGas = 0; |
static int StickGasHover = 120, HoverGasMin = 0, HoverGasMax = 1023; |
1495,7 → 1495,7 |
// if(tmp_int > 0) tmp_int = tmp_int + (tmp_int2 * tmp_int2); |
// else tmp_int = tmp_int - (tmp_int2 * tmp_int2); |
|
tmp_int = (tmp_int * (long)Parameter_Luftdruck_D) / 64L; // scale to d-gain parameter |
tmp_int = (tmp_int * (long)Parameter_Luftdruck_D) / 4L; // scale to d-gain parameter |
LIMIT_MIN_MAX(tmp_int,-64 * STICK_GAIN, 64 * STICK_GAIN); |
// HCGas -= tmp_int; |
DebugOut.Analog[19] = tmp_int; |