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:
@ -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;
|
||||||
|
|
||||||
|
@ -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));
|
||||||
|
Reference in New Issue
Block a user