Rev 1068 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1068 | Rev 1076 | ||
---|---|---|---|
Line 172... | Line 172... | ||
172 | if( ServoValue < ( (int) EE_Parameter.ServoNickMin * 3 ) ) |
172 | if( ServoValue < ( (int) EE_Parameter.ServoNickMin * 3 ) ) |
173 | ServoValue = (int) EE_Parameter.ServoNickMin * 3; |
173 | ServoValue = (int) EE_Parameter.ServoNickMin * 3; |
174 | else if( ServoValue > ( (int) EE_Parameter.ServoNickMax * 3 ) ) |
174 | else if( ServoValue > ( (int) EE_Parameter.ServoNickMax * 3 ) ) |
175 | ServoValue = (int) EE_Parameter.ServoNickMax * 3; |
175 | ServoValue = (int) EE_Parameter.ServoNickMax * 3; |
Line -... | Line 176... | ||
- | 176 | ||
- | 177 | long integral; |
|
- | 178 | ||
- | 179 | /* Über Parameter läßt sich zwischen "+" und "X" - Formations |
|
- | 180 | * umschalten (sh. parameter.h) |
|
- | 181 | */ |
|
- | 182 | if( PARAM_X_FORMATION ) { |
|
- | 183 | integral = IntegralNick - IntegralRoll; |
|
- | 184 | } else { |
|
- | 185 | integral = IntegralNick; |
|
- | 186 | } |
|
176 | 187 | ||
177 | if( EE_Parameter.ServoNickCompInvert & 0x01 ) |
188 | if( EE_Parameter.ServoNickCompInvert & 0x01 ) |
178 | ServoValue += ( (long) ( (long) EE_Parameter.ServoNickComp * ( IntegralNick - IntegralRoll ) ) >> DIV_128 ) / ( 512L >> DIV_4 ); |
189 | ServoValue += ( (long) ( (long) EE_Parameter.ServoNickComp * integral ) >> DIV_128 ) / ( 512L >> DIV_4 ); |
179 | else |
190 | else |
Line 180... | Line 191... | ||
180 | ServoValue -= ( (long) ( (long) EE_Parameter.ServoNickComp * ( IntegralNick - IntegralRoll ) ) >> DIV_128 ) / ( 512L >> DIV_4 ); |
191 | ServoValue -= ( (long) ( (long) EE_Parameter.ServoNickComp * integral ) >> DIV_128 ) / ( 512L >> DIV_4 ); |
Line 181... | Line 192... | ||
181 | 192 | ||
182 | DebugOut.Analog[20] = ServoValue; |
193 | DebugOut.Analog[20] = ServoValue; |