Rev 1244 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1244 | Rev 1265 | ||
---|---|---|---|
Line 164... | Line 164... | ||
164 | // Arthur P: the original code allowed the motor value to drop to 0 or negative values |
164 | // Arthur P: the original code allowed the motor value to drop to 0 or negative values |
165 | // straight off, i.e. could amplify an intended decrease excessively while upregulation |
165 | // straight off, i.e. could amplify an intended decrease excessively while upregulation |
166 | // is dampened. The modification would still allow immediate drop below intended value |
166 | // is dampened. The modification would still allow immediate drop below intended value |
167 | // but would dampen this. This would still allow for airbraking of the prop to have effect |
167 | // but would dampen this. This would still allow for airbraking of the prop to have effect |
168 | // but it might lead to less sudden excessive drops in rpm with only gradual recovery. |
168 | // but it might lead to less sudden excessive drops in rpm with only gradual recovery. |
- | 169 | // 090807 Arthur P: Due to problems with uart.c which still refers to user parameter 1 and 2 and |
|
- | 170 | // possible timing issues with the shutter interval load, removed the shutter interval functions |
|
- | 171 | // and switched to use of userparam6 for the motor smoothing. |
|
Line 169... | Line 172... | ||
169 | 172 | ||
170 | { |
173 | { |
171 | if(Parameter_UserParam1 < 1) |
174 | if(Parameter_UserParam6 < 1) |
172 | { // Original function |
175 | { // Original function |
173 | motor = neu - (alt - neu)*1; |
176 | motor = neu - (alt - neu)*1; |
174 | } |
177 | } |
175 | else |
178 | else |
176 | { |
179 | { |
177 | if(Parameter_UserParam1 == 1) // If userpara1 = 1 then 150% down on the first step followed by upsmoothing. |
180 | if(Parameter_UserParam6 == 1) // If userpara1 = 1 then 150% down on the first step followed by upsmoothing. |
178 | { |
181 | { |
179 | motor = neu - (1*(alt - neu)/2); |
182 | motor = neu - (1*(alt - neu)/2); |
180 | } |
183 | } |
181 | else // If userpara1 > 1 then allow >= 50% of the intended step down to rapidly reach the intended value. |
184 | else // If userpara5 > 1 then allow >= 50% of the intended step down to rapidly reach the intended value. |
182 | { |
185 | { |
183 | motor = neu + ((alt - neu)/Parameter_UserParam1); |
186 | motor = neu + ((alt - neu)/Parameter_UserParam6); |
184 | } |
187 | } |
185 | } |
188 | } |
186 | } |
189 | } |
187 | //if(Poti2 < 20) return(neu); |
190 | //if(Poti2 < 20) return(neu); |