1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-19 09:42:11 +03:00

Now flushing serial buffer before uploading code.

This commit is contained in:
David A. Mellis
2005-11-28 12:51:44 +00:00
parent 38ee1b7330
commit e8de19d110
20 changed files with 31764 additions and 31764 deletions

View File

@ -53,7 +53,7 @@ import com.ice.jni.registry.*;
*/ */
public class Base { public class Base {
static final int VERSION = 1; static final int VERSION = 1;
static final String VERSION_NAME = "0002 Alpha"; static final String VERSION_NAME = "0003 Alpha";
static public int platform; static public int platform;

View File

@ -126,13 +126,13 @@ public class Uploader implements MessageConsumer {
}*/ }*/
// Cleanup the serial buffer // Cleanup the serial buffer
/*serialPort = new Serial(); serialPort = new Serial();
byte[] readBuffer; byte[] readBuffer;
while(serialPort.available() > 0) { while(serialPort.available() > 0) {
readBuffer = serialPort.readBytes(); readBuffer = serialPort.readBytes();
Thread.sleep(100); Thread.sleep(100);
} }
serialPort.dispose(); */ serialPort.dispose();
String[] commandArray = new String[commandDownloader.size()]; String[] commandArray = new String[commandDownloader.size()];
Process process = Runtime.getRuntime().exec((String[]) commandDownloader.toArray(commandArray)); Process process = Runtime.getRuntime().exec((String[]) commandDownloader.toArray(commandArray));