[PD-dev] [ pure-data-Bugs-1944125 ] comport: stop bit settings

SourceForge.net noreply at sourceforge.net
Tue Sep 16 22:23:23 CEST 2008


Bugs item #1944125, was opened at 2008-04-16 11:24
Message generated for change (Comment added) made by mrpeach
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1944125&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: externals
Group: None
>Status: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: Thomas Grill (xovo)
Assigned to: Winfried Ritsch (ritsch)
Summary: comport: stop bit settings

Initial Comment:
It seems that the comport object doesn't handle stop bit settings correctly (at least under Windows). I have frequent crashes with keyspan drivers (which seem to be buggy too) because of that.

x->dcb.StopBits has three possible settings
0 for 1 stop bit, 1 for 1.5 bits, 2 for 2 bits

There seems to be a mismatch between the set_serial function, with
x->stop_bits = x->dcb.StopBits;
and the set_stopflag function, where there's only a a check whether nr == 1.

A quick and dirty fix that works for me is to set (in set_serial):
x->stop_bits = (x->dcb.StopBits)?1:0;

but that's no real solution.

----------------------------------------------------------------------

>Comment By: Martin Peach (mrpeach)
Date: 2008-09-16 16:23

Message:
This should work properly now. Setting 1.5 stop bits still gives an error
if the hardware can't do it, but 1 and 2 seem to work.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1944125&group_id=55736




More information about the Pd-dev mailing list