auto-sync
This commit is contained in:
parent
9a631ea546
commit
f77030123c
|
@ -27,8 +27,8 @@ public class SerialPortReader implements SerialPortEventListener {
|
||||||
} catch (SerialPortException e) {
|
} catch (SerialPortException e) {
|
||||||
e.printStackTrace(System.err);
|
e.printStackTrace(System.err);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (spe.getEventType() != SerialPortEvent.TXEMPTY) {
|
||||||
FileLog.MAIN.logLine("less expected SerialPortReader serialEvent " + spe);
|
FileLog.MAIN.logLine("less expected SerialPortReader serialEvent " + spe.getEventType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
||||||
* @see com.rusefi.StartupFrame
|
* @see com.rusefi.StartupFrame
|
||||||
*/
|
*/
|
||||||
public class Launcher {
|
public class Launcher {
|
||||||
public static final int CONSOLE_VERSION = 20150711;
|
public static final int CONSOLE_VERSION = 20150713;
|
||||||
public static final boolean SHOW_STIMULATOR = false;
|
public static final boolean SHOW_STIMULATOR = false;
|
||||||
private static final String TAB_INDEX = "main_tab";
|
private static final String TAB_INDEX = "main_tab";
|
||||||
protected static final String PORT_KEY = "port";
|
protected static final String PORT_KEY = "port";
|
||||||
|
|
|
@ -24,6 +24,7 @@ public class SettingsTab {
|
||||||
|
|
||||||
public void showContent() {
|
public void showContent() {
|
||||||
content.removeAll();
|
content.removeAll();
|
||||||
|
panel.removeAll();
|
||||||
|
|
||||||
panel.add(UiUtils.wrap(new EnumConfigField(Fields.ALGORITHM, "algorithm").getContent()));
|
panel.add(UiUtils.wrap(new EnumConfigField(Fields.ALGORITHM, "algorithm").getContent()));
|
||||||
panel.add(UiUtils.wrap(new EnumConfigField(Fields.TRIGGER_TYPE, "trigger type").getContent()));
|
panel.add(UiUtils.wrap(new EnumConfigField(Fields.TRIGGER_TYPE, "trigger type").getContent()));
|
||||||
|
@ -64,5 +65,6 @@ public class SettingsTab {
|
||||||
panel.add(UiUtils.wrap(RecentCommands.createButton(new AtomicBoolean(), "writeconfig")));
|
panel.add(UiUtils.wrap(RecentCommands.createButton(new AtomicBoolean(), "writeconfig")));
|
||||||
|
|
||||||
content.add(panel);
|
content.add(panel);
|
||||||
|
UiUtils.trueLayout(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -38,11 +38,17 @@ public class EnumConfigField extends BaseConfigField {
|
||||||
Pair<Integer, ?> p = Field.parseResponse(message);
|
Pair<Integer, ?> p = Field.parseResponse(message);
|
||||||
if (p != null && p.first == field.getOffset()) {
|
if (p != null && p.first == field.getOffset()) {
|
||||||
int ordinal = (Integer) p.second;
|
int ordinal = (Integer) p.second;
|
||||||
if (ordinal >= options.length)
|
String item;
|
||||||
throw new IllegalStateException("Unexpected ordinal " + ordinal + " for " + field);
|
if (ordinal >= options.length) {
|
||||||
|
item = "unexpected_" + ordinal;
|
||||||
|
view.addItem(item);
|
||||||
|
} else {
|
||||||
|
item = options[ordinal];
|
||||||
|
}
|
||||||
|
|
||||||
ec = true;
|
ec = true;
|
||||||
view.setEnabled(true);
|
view.setEnabled(true);
|
||||||
view.setSelectedItem(options[ordinal]);
|
view.setSelectedItem(item);
|
||||||
onValueArrived();
|
onValueArrived();
|
||||||
ec = false;
|
ec = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue