| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -461,7 +461,10 @@ public void serialEvent(SerialPortEvent event) { | |||
| 461 | 461 | long start = System.nanoTime(); | |
| 462 | 462 | // this method can be called from the context of another thread | |
| 463 | 463 | synchronized (buffer) { | |
| 464 | - toRead = 1; | ||
| 464 | + // read one byte at a time if the sketch is using serialEvent | ||
| 465 | + if (serialEventMethod != null) { | ||
| 466 | + toRead = 1; | ||
| 467 | + } | ||
| 465 | 468 | long len = System.nanoTime()-start; | |
| 466 | 469 | if (maxReadSyncTime < len) { | |
| 467 | 470 | maxReadSyncTime = len; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments