Rev 475 | Rev 482 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 475 | Rev 480 | ||
---|---|---|---|
Line 122... | Line 122... | ||
122 | { |
122 | { |
123 | ServoNickValue = (s16)ServoParams.NickMax * MULTIPLYER; |
123 | ServoNickValue = (s16)ServoParams.NickMax * MULTIPLYER; |
124 | } |
124 | } |
Line 125... | Line 125... | ||
125 | 125 | ||
126 | pulselen += ServoNickValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position |
126 | pulselen += ServoNickValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position |
127 | DebugOut.Analog[7] = ServoNickValue / MULTIPLYER; |
127 | // DebugOut.Analog[7] = ServoNickValue / MULTIPLYER; |
128 | LowPulseTime1 = PPM_FRAMELEN - pulselen; |
128 | LowPulseTime1 = PPM_FRAMELEN - pulselen; |
129 | TIM2->CR1 &= ~CR1_OLVL1_MASK; // make next a low pulse |
129 | TIM2->CR1 &= ~CR1_OLVL1_MASK; // make next a low pulse |
130 | } |
130 | } |
131 | else // start of low pulse |
131 | else // start of low pulse |
Line 162... | Line 162... | ||
162 | { |
162 | { |
163 | ServoRollValue = (s16)ServoParams.RollMax * MULTIPLYER; |
163 | ServoRollValue = (s16)ServoParams.RollMax * MULTIPLYER; |
164 | } |
164 | } |
Line 165... | Line 165... | ||
165 | 165 | ||
166 | pulselen += ServoRollValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position |
166 | pulselen += ServoRollValue - (256 / 2) * MULTIPLYER; // shift ServoNickValue to center position |
167 | DebugOut.Analog[8] = ServoRollValue / MULTIPLYER; |
167 | // DebugOut.Analog[8] = ServoRollValue / MULTIPLYER; |
168 | LowPulseTime2 = PPM_FRAMELEN - pulselen; |
168 | LowPulseTime2 = PPM_FRAMELEN - pulselen; |
169 | TIM2->CR1 &= ~CR1_OLVL2_MASK; // make next a low pulse |
169 | TIM2->CR1 &= ~CR1_OLVL2_MASK; // make next a low pulse |
170 | } |
170 | } |
171 | else |
171 | else |