juancarlostinoco / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

PPM sync detection is bellow max channel pulse width #626

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. use TX with PPM pulse greater than 2000 ms
2. when channel is set to max, PPM interrupt discard the full frame because it 
thinks it is a sync pulse.

How to fix:

Increase sync above MAX_PULSEWIDTH (2100)

--- 
/data/pot/rc/arducopter/firmware/Arducopter_2.5.4/libraries/APM_RC/APM_RC_APM1.c
pp  2012-03-13 22:21:32.000000000 +0100
+++ /home/alexw/tools/arduino/libraries/APM_RC/APM_RC_APM1.cpp  2012-05-09 
09:27:08.667907214 +0200
@@ -54,7 +54,7 @@
     Pulse_Width=Pulse-ICR4_old;               // Calculating pulse
   }

-  if (Pulse_Width>8000) {                     // SYNC pulse?
+  if (Pulse_Width>8800) {                     // SYNC pulse?
     PPM_Counter=0;
   }
   else {

Regards,

Alex

Original issue reported on code.google.com by alex...@gmail.com on 9 May 2012 at 8:10