1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

merging ide-1.5.x

This commit is contained in:
Federico Fissore
2013-02-13 16:25:40 +01:00
15 changed files with 51 additions and 38 deletions

View File

@ -52,9 +52,9 @@ import static processing.app.I18n._;
* files and images, etc) that comes from that.
*/
public class Base {
public static final int REVISION = 152;
public static final int REVISION = 153;
/** This might be replaced by main() if there's a lib/version.txt file. */
static String VERSION_NAME = "0152";
static String VERSION_NAME = "0153";
/** Set true if this a proper release rather than a numbered revision. */
static public boolean RELEASE = false;

View File

@ -302,6 +302,15 @@ public class Preferences {
// other things that have to be set explicitly for the defaults
setColor("run.window.bgcolor", SystemColor.control);
fixPreferences();
}
private static void fixPreferences() {
String baud = get("serial.debug_rate");
if ("14400".equals(baud) || "28800".equals(baud) || "38400".equals(baud)) {
set("serial.debug_rate", "9600");
}
}

View File

@ -159,6 +159,8 @@ public class Serial implements SerialPortEventListener {
if (portId.getName().equals(iname)) {
//System.out.println("looking for "+iname);
port = (SerialPort)portId.open("serial madness", 2000);
port.setDTR(true);
port.setRTS(true);
input = port.getInputStream();
output = port.getOutputStream();
port.setSerialPortParams(rate, databits, stopbits, parity);

View File

@ -121,8 +121,8 @@ public class SerialMonitor extends JFrame implements MessageConsumer {
lineEndings.setMaximumSize(lineEndings.getMinimumSize());
String[] serialRateStrings = {
"300","1200","2400","4800","9600","14400",
"19200","28800","38400","57600","115200"
"300","1200","2400","4800","9600",
"19200","57600","115200"
};
serialRates = new JComboBox();

View File

@ -99,7 +99,7 @@ public class PdeKeywords extends CTokenMarker {
//String htmlFilename = second.substring(tab + 1).trim();
String coloring = pieces[1].trim();
if (coloring.length() > 0) {
if (coloring.length() > 0 && Character.isDigit(coloring.charAt(coloring.length() - 1))) {
// text will be KEYWORD or LITERAL
boolean isKey = (coloring.charAt(0) == 'K');
// KEYWORD1 -> 0, KEYWORD2 -> 1, etc