Skip to content

Commit 7663d1f

Browse files
committed
fix problem with bufferUntil() not properly handling values over 127 (issue #1079)
1 parent c2cb2d3 commit 7663d1f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

java/libraries/serial/src/processing/serial/Serial.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public class Serial implements SerialPortEventListener {
6868
//boolean bufferUntil = false;
6969
int bufferSize = 1; // how big before reset or event firing
7070
boolean bufferUntil;
71-
int bufferUntilByte;
71+
byte bufferUntilByte;
7272

7373

7474
// defaults
@@ -306,7 +306,7 @@ public void buffer(int count) {
306306
*/
307307
public void bufferUntil(int what) {
308308
bufferUntil = true;
309-
bufferUntilByte = what;
309+
bufferUntilByte = (byte) what;
310310
}
311311

312312

todo.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ o instead of "show sketch folder" method, use:
1111
The com.apple.eio.FileManager now has two new desktop interaction methods, revealInFinder(File) and moveToTrash(File). You can use revealInFinder() to open a Finder window in the parent directory of of a file and select it. You can use moveToTrash() to move a file to the most appropriate Trash directory for the volume that contains that file.
1212
X added 64-bit RXTX for Mac OS X
1313
X http://blog.iharder.net/2009/08/18/rxtx-java-6-and-librxtxserial-jnilib-on-intel-mac-os-x/
14+
X bufferUntil() with values above 127 do not work properly
15+
X http://code.google.com/p/processing/issues/detail?id=1079
1416
X add warning message about using serial on OS X
15-
_ check on other serial issues, this may fix them
17+
X check on other serial issues, this may fix them
18+
X http://code.google.com/p/processing/issues/detail?id=944
19+
X http://code.google.com/p/processing/issues/detail?id=937
1620

1721
cleaning
1822
o switching into present mode in info.plist

0 commit comments

Comments
 (0)