Rev 2010 | Rev 2012 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2010 | Rev 2011 | ||
---|---|---|---|
Line 212... | Line 212... | ||
212 | { // inverting movement of servo |
212 | { // inverting movement of servo |
213 | nick = ServoNickOffset / 16 - nick; |
213 | nick = ServoNickOffset / 16 - nick; |
214 | } |
214 | } |
215 | if(Parameter_UserParam1) ServoNickValue = ((ServoNickValue * Parameter_UserParam1) + nick) / (Parameter_UserParam1 + 1); |
215 | if(Parameter_UserParam1) ServoNickValue = ((ServoNickValue * Parameter_UserParam1) + nick) / (Parameter_UserParam1 + 1); |
216 | else ServoNickValue = nick; |
216 | else ServoNickValue = nick; |
217 | DebugOut.Analog[16] = nick; |
- | |
218 | DebugOut.Analog[17] = ServoNickValue; |
- | |
219 | // limit servo value to its parameter range definition |
217 | // limit servo value to its parameter range definition |
220 | if(ServoNickValue < ((int16_t)EE_Parameter.ServoNickMin * MULTIPLYER) ) |
218 | if(ServoNickValue < ((int16_t)EE_Parameter.ServoNickMin * MULTIPLYER) ) |
221 | { |
219 | { |
222 | ServoNickValue = (int16_t)EE_Parameter.ServoNickMin * MULTIPLYER; |
220 | ServoNickValue = (int16_t)EE_Parameter.ServoNickMin * MULTIPLYER; |
223 | } |
221 | } |
Line 241... | Line 239... | ||
241 | { // inverting movement of servo |
239 | { // inverting movement of servo |
242 | roll = ServoRollOffset / 16 - roll; |
240 | roll = ServoRollOffset / 16 - roll; |
243 | } |
241 | } |
244 | if(Parameter_UserParam2) ServoRollValue = ((ServoRollValue * Parameter_UserParam2) + roll) / (Parameter_UserParam2 + 1); |
242 | if(Parameter_UserParam2) ServoRollValue = ((ServoRollValue * Parameter_UserParam2) + roll) / (Parameter_UserParam2 + 1); |
245 | else ServoRollValue = roll; |
243 | else ServoRollValue = roll; |
246 | DebugOut.Analog[18] = roll; |
- | |
247 | DebugOut.Analog[19] = ServoRollValue; |
- | |
248 | // limit servo value to its parameter range definition |
244 | // limit servo value to its parameter range definition |
249 | if(ServoRollValue < ((int16_t)EE_Parameter.ServoRollMin * MULTIPLYER) ) |
245 | if(ServoRollValue < ((int16_t)EE_Parameter.ServoRollMin * MULTIPLYER) ) |
250 | { |
246 | { |
251 | ServoRollValue = (int16_t)EE_Parameter.ServoRollMin * MULTIPLYER; |
247 | ServoRollValue = (int16_t)EE_Parameter.ServoRollMin * MULTIPLYER; |
252 | } |
248 | } |