166,21 → 166,24 |
// is dampened. The modification would still allow immediate drop below intended value |
// but would dampen this. This would still allow for airbraking of the prop to have effect |
// but it might lead to less sudden excessive drops in rpm with only gradual recovery. |
// 090807 Arthur P: Due to problems with uart.c which still refers to user parameter 1 and 2 and |
// possible timing issues with the shutter interval load, removed the shutter interval functions |
// and switched to use of userparam6 for the motor smoothing. |
|
{ |
if(Parameter_UserParam1 < 1) |
if(Parameter_UserParam6 < 1) |
{ // Original function |
motor = neu - (alt - neu)*1; |
} |
else |
{ |
if(Parameter_UserParam1 == 1) // If userpara1 = 1 then 150% down on the first step followed by upsmoothing. |
if(Parameter_UserParam6 == 1) // If userpara1 = 1 then 150% down on the first step followed by upsmoothing. |
{ |
motor = neu - (1*(alt - neu)/2); |
} |
else // If userpara1 > 1 then allow >= 50% of the intended step down to rapidly reach the intended value. |
else // If userpara5 > 1 then allow >= 50% of the intended step down to rapidly reach the intended value. |
{ |
motor = neu + ((alt - neu)/Parameter_UserParam1); |
motor = neu + ((alt - neu)/Parameter_UserParam6); |
} |
} |
} |