the problem with this code as discussed on irc was that it passes argument
to each serial related function. this is really ugly and totally not future
proof.

if this was to be merged it would need to be rewritten to either:

a) quick solution - make it similar to 8bit multiwii with setPort that
updates global port pointer for all write/read functions
b) more involved - rewrite serial/msp layer to have a "listener" that can
attach itself to any serial port. this way you could listen for msp on
serial 1 and USB vcp for example.
On Jun 1, 2014 8:08 PM, "Trey Marc" <notifications@github.com> wrote:

> In src/serial.c:
>
> >          }
> >      }
> >  }
> > +
> > +void serialCom(void)
> > +{
> > +    // in cli mode, all serial stuff goes to here. enter cli mode by sending #
> > +    if (cliMode) {
> > +        cliProcess();
> > +        return;
> > +    }
> > +
> > +	int idx;
> > +	for (idx = 0; idx < 3; idx++) {
>
> idx < NUMSERIALINSTANCES
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/multiwii/baseflight/pull/94/files#r13266129>.
>