Rev 1322 | Rev 1378 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1322 | Rev 1328 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | volatile unsigned int cntKompass = 0; |
7 | volatile unsigned int cntKompass = 0; |
8 | volatile unsigned int beeptime = 0; |
8 | volatile unsigned int beeptime = 0; |
9 | volatile unsigned char SendSPI = 0, ServoActive = 0; |
9 | volatile unsigned char SendSPI = 0, ServoActive = 0; |
Line 10... | Line 10... | ||
10 | 10 | ||
11 | unsigned int BeepMuster = 0xffff; |
- | |
Line 12... | Line 11... | ||
12 | int ServoValue = 0; |
11 | unsigned int BeepMuster = 0xffff; |
13 | 12 | ||
Line 251... | Line 250... | ||
251 | } |
250 | } |
Line 252... | Line 251... | ||
252 | 251 | ||
Line 253... | Line 252... | ||
253 | RemainingPulse += ServoNickValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position |
252 | RemainingPulse += ServoNickValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position |
254 | - | ||
Line 255... | Line 253... | ||
255 | ServoNickValue /= MULTIPLYER; |
253 | |
256 | DebugOut.Analog[20] = ServoNickValue; |
254 | ServoNickValue /= MULTIPLYER; |
257 | 255 | ||
258 | // range servo pulse width |
256 | // range servo pulse width |
Line 313... | Line 311... | ||
313 | { |
311 | { |
314 | ServoNickValue = (int16_t)EE_Parameter.ServoNickMax * MULTIPLYER; |
312 | ServoNickValue = (int16_t)EE_Parameter.ServoNickMax * MULTIPLYER; |
315 | } |
313 | } |
316 | RemainingPulse += ServoNickValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position |
314 | RemainingPulse += ServoNickValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position |
317 | ServoNickValue /= MULTIPLYER; |
315 | ServoNickValue /= MULTIPLYER; |
318 | DebugOut.Analog[20] = ServoNickValue; |
- | |
319 | break; |
316 | break; |
320 | case 2: // Roll Compensation Servo |
317 | case 2: // Roll Compensation Servo |
321 | ServoRollOffset = (ServoRollOffset * 3 + (int16_t) Parameter_ServoRollControl * MULTIPLYER) / 4; // lowpass offset |
318 | ServoRollOffset = (ServoRollOffset * 3 + (int16_t) Parameter_ServoRollControl * MULTIPLYER) / 4; // lowpass offset |
322 | ServoRollValue = ServoRollOffset; // offset (Range from 0 to 255 * 3 = 765) |
319 | ServoRollValue = ServoRollOffset; // offset (Range from 0 to 255 * 3 = 765) |
323 | if(EE_Parameter.ServoCompInvert & 0x02) |
320 | if(EE_Parameter.ServoCompInvert & 0x02) |