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