mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Now flushing serial buffer before uploading code.
This commit is contained in:
@ -53,7 +53,7 @@ import com.ice.jni.registry.*;
|
||||
*/
|
||||
public class Base {
|
||||
static final int VERSION = 1;
|
||||
static final String VERSION_NAME = "0002 Alpha";
|
||||
static final String VERSION_NAME = "0003 Alpha";
|
||||
|
||||
static public int platform;
|
||||
|
||||
|
@ -126,13 +126,13 @@ public class Uploader implements MessageConsumer {
|
||||
}*/
|
||||
|
||||
// Cleanup the serial buffer
|
||||
/*serialPort = new Serial();
|
||||
serialPort = new Serial();
|
||||
byte[] readBuffer;
|
||||
while(serialPort.available() > 0) {
|
||||
readBuffer = serialPort.readBytes();
|
||||
Thread.sleep(100);
|
||||
}
|
||||
serialPort.dispose(); */
|
||||
serialPort.dispose();
|
||||
|
||||
String[] commandArray = new String[commandDownloader.size()];
|
||||
Process process = Runtime.getRuntime().exec((String[]) commandDownloader.toArray(commandArray));
|
||||
|
Reference in New Issue
Block a user