[PD] Comport and UBW problems on Linux

Thomas O Fredericks tof at danslchamp.org
Thu Oct 11 21:23:54 CEST 2007


Hi Martin, I modified my local copy of comport to work with lists and it
solved all problems.

I sooo don't know how to code in C, but this is what I added to make it work
with lists:

//Added for LIST processing
static void comport_list(t_comport *x, t_symbol *s, int argc, t_atom *argv)
{

    unsigned char temp_array[argc];
    int i;
    for(i = 0; i < argc; i++)
    {
        temp_array[i] = ((unsigned char) atom_getint(argv + i)) & 0xFF;
        // post ("Data: %d", temp_array[i]);
    }

    int result = write(x->comhandle,(char *) &temp_array[0],argc);
    if (result < 0)
        post ("[comport] write returned %d, errno is %d", result, errno);
    //return result;


}
//Added end


Tom


On 10/11/07, Martin Peach <martin.peach at sympatico.ca> wrote:
>
> Thomas O Fredericks wrote:
> >
> > Hi Martin,
> >
> > just to make sure, the newest version of comport is in
> > iem/comport/comport right?
> Yep.
> >
> > "But the result should be the same, the data gets sent anyway, the
> > error is bogus."
> >
> > Nope, the data is never received by the device.
> OK, I'll look into it. I guess comport should have a way of sending
> lists of bytes as well.
>
> Martin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20071011/9c96c3b2/attachment.htm>


More information about the Pd-list mailing list