Subversion Repositories FlightCtrl

Rev

Rev 1561 | Rev 1638 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1561 Rev 1565
Line 333... Line 333...
333
                                                        }
333
                                                        }
334
                                                        RemainingPulse += ServoRollValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position
334
                                                        RemainingPulse += ServoRollValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position
335
                                                        ServoRollValue /= MULTIPLYER;
335
                                                        ServoRollValue /= MULTIPLYER;
336
                                                        //DebugOut.Analog[20] = ServoRollValue;
336
                                                        //DebugOut.Analog[20] = ServoRollValue;
337
                                                        break;
337
                                                        break;
338
                                         case 3: // 2 additions are probably faster than a conversion to u16 and multiplication by 2
-
 
339
                                                        RemainingPulse += Parameter_Servo3;
338
                                         case 3:
340
                                                        RemainingPulse += Parameter_Servo3;
339
                                                        RemainingPulse += ((int16_t)Parameter_Servo3 * MULTIPLYER) - (256 / 2) * MULTIPLYER;
341
                                                        break;
340
                                                        break;
342
                                         case 4:
341
                                         case 4:
343
                                                        RemainingPulse += Parameter_Servo4;
-
 
344
                                                        RemainingPulse += Parameter_Servo4;
342
                                                        RemainingPulse += ((int16_t)Parameter_Servo4 * MULTIPLYER) - (256 / 2) * MULTIPLYER;
345
                                                        break;
343
                                                        break;
346
                                         case 5:
344
                                         case 5:
347
                                                        RemainingPulse += Parameter_Servo5;
-
 
348
                                                        RemainingPulse += Parameter_Servo5;
345
                                                        RemainingPulse += ((int16_t)Parameter_Servo5 * MULTIPLYER) - (256 / 2) * MULTIPLYER;
349
                                                        break;
346
                                                        break;
350
                                                default: // other servo channels
347
                                                default: // other servo channels
351
                                                        RemainingPulse += 2 * PPM_in[ServoIndex]; // add channel value, factor of 2 because timer 1 increments 3.2µs
348
                                                        RemainingPulse += 2 * PPM_in[ServoIndex]; // add channel value, factor of 2 because timer 1 increments 3.2µs
352
                                                        break;
349
                                                        break;
353
                                        }
350
                                        }