Read more than 8 PPM Channels

Post Reply
LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Read more than 8 PPM Channels

Post by LuFa »

Hi ,

since we have more and more functions , i need some more channels :)
Is it possible to read more than 8 PPM Channels with the Mwii Code ?

Here is the Part for read the PPM Channels (I think :) )

Code: Select all

#if defined(SERIAL_SUM_PPM)
  void rxInt() {
    uint16_t now,diff;
    static uint16_t last = 0;
    static uint8_t chan = 0;
 
    now = micros();
    diff = now - last;
    last = now;
    if(diff>3000) chan = 0;
    else {
         //Only if the signal is between these values it is valid, otherwise the failsafe counter should move up
        rcValue[chan] = diff;
        #if defined(FAILSAFE)if(900<diff && diff<2200 && chan<8 ) {
          if(failsafeCnt > 20) failsafeCnt -= 20; else failsafeCnt = 0;   // clear FailSafe counter - added by MIS  //incompatible to quadroppm
        #endif
      }
    chan++;
  }
}
#endif


so if i right , there is only one line wich is need to change :

Code: Select all

if(900<diff && diff<2200 && chan<8 ) {


to for example for 10 channels :

Code: Select all

if(900<diff && diff<2200 && chan<10 ) {


am i right ?

bg

arkcom
Posts: 6
Joined: Sun Aug 19, 2012 10:35 am

Re: Read more than 8 PPM Channels

Post by arkcom »

There isn't enough time to update more than 8 channels at 50hz. You would need some custom PPM.

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: Read more than 8 PPM Channels

Post by cGiesen »

I have add up to 12 channels. For me it looks good.

Search for AUX Patch

LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Re: Read more than 8 PPM Channels

Post by LuFa »

and how did you have add it ?

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: Read more than 8 PPM Channels

Post by cGiesen »

It's not only the row you write.
Serial must transmit this information to.
The variable have to hold the informatiom, otherwise you have a stackoverflow ( take me 3 days of searching)
And so on

Post Reply