PPM frame should now go up to 42ms

This commit is contained in:
bsongis
2012-06-01 19:46:00 +00:00
parent ef5441df09
commit 4711ca4c91
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -159,8 +159,8 @@ void setupPulsesPPM() // Don't enable interrupts through here
else
pwmptr->PWM_CH_NUM[3].PWM_CMR &= ~0x00000200 ; // CPOL
uint16_t rest = 22500u * 2; //Minimum Framelen=22.5 ms
rest += (int16_t(g_model.ppmFrameLength)) * 1000;
uint32_t rest = 22500u * 2; //Minimum Framelen=22.5 ms
rest += (int32_t(g_model.ppmFrameLength)) * 1000;
for (uint32_t i = 0; i < p; i++) { //NUM_CHNOUT
int16_t v = limit((int16_t)-PPM_range, g_chans512[i], (int16_t)PPM_range) + 2*PPM_CENTER;
rest -= (v);