diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2012-03-07 18:07:50 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2012-03-07 18:07:50 +0000 |
commit | 17bd34efc3705c9736e722e2078906fbab19a96f (patch) | |
tree | 94772d42bead22a15de20701ff49ece1b4287a14 | |
parent | 551302e63e1e682401049c861fc370855d49ad77 (diff) |
set default poll time to 10ms since for most uses of serial at 115200 baud or less, the data doesn't come any faster than every 10ms
svn path=/trunk/externals/iem/comport/; revision=16053
-rw-r--r-- | comport/comport.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/comport/comport.c b/comport/comport.c index 1f8c93a..67ba462 100644 --- a/comport/comport.c +++ b/comport/comport.c @@ -1315,7 +1315,12 @@ allows COM port numbers to be specified. */ x->x_status_outlet = outlet_new(&x->x_obj, &s_float); x->x_hit = 0; - x->x_deltime = 1; + /* Since 10ms is also the default poll time for most HID devices, + * and it seems that for most uses of [comport] (i.e. arduinos and + * other serial ports 115200 baud or less) that 10ms polling is + * going to give the data as fast as 1ms polling with a lot less + * CPU time wasted. */ + x->x_deltime = 10; x->x_clock = clock_new(x, (t_method)comport_tick); clock_delay(x->x_clock, x->x_deltime); |