mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
cf6927cb9f
commit
ff79cdda55
|
@ -0,0 +1,30 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="BinaryProtocolCmd" type="Application" factoryName="Application" nameIsGenerated="true">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="com.rusefi.binaryprotocol.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<option name="MAIN_CLASS_NAME" value="com.rusefi.binaryprotocol.BinaryProtocolCmd" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="COM9" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="ui" />
|
||||
<envs />
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="" />
|
||||
<option name="TRANSPORT" value="0" />
|
||||
<option name="LOCAL" value="true" />
|
||||
</RunnerSettings>
|
||||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Debug" />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -29,7 +29,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see com.rusefi.StartupFrame
|
||||
*/
|
||||
public class Launcher extends FrameHelper {
|
||||
public static final int CONSOLE_VERSION = 20150302;
|
||||
public static final int CONSOLE_VERSION = 20150307;
|
||||
public static final boolean SHOW_STIMULATOR = true;
|
||||
public static final String TAB_INDEX = "main_tab";
|
||||
private final String port;
|
||||
|
|
|
@ -45,43 +45,7 @@ public class UploadChanges {
|
|||
}
|
||||
|
||||
private static void showUi(String port) throws SerialPortException, IOException, InterruptedException {
|
||||
final StatusWindow wnd = new StatusWindow();
|
||||
wnd.showFrame("rusEfi bin upload");
|
||||
|
||||
final Logger logger = new Logger() {
|
||||
@Override
|
||||
public void trace(final String msg) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println(msg);
|
||||
wnd.appendMsg(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(final String msg) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println(msg);
|
||||
wnd.appendMsg(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(final String msg) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println(msg);
|
||||
wnd.appendMsg(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
final Logger logger = createUiLogger();
|
||||
|
||||
SerialPort serialPort;
|
||||
|
||||
|
@ -119,6 +83,46 @@ public class UploadChanges {
|
|||
|
||||
}
|
||||
|
||||
private static Logger createUiLogger() {
|
||||
final StatusWindow wnd = new StatusWindow();
|
||||
wnd.showFrame("rusEfi bin upload");
|
||||
|
||||
return new Logger() {
|
||||
@Override
|
||||
public void trace(final String msg) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println(msg);
|
||||
wnd.appendMsg(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(final String msg) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println(msg);
|
||||
wnd.appendMsg(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(final String msg) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println(msg);
|
||||
wnd.appendMsg(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static void patch(ConfigurationImage ci1, ConfigurationImage ci2, BinaryProtocol bp, Logger logger) throws InterruptedException, EOFException, SerialPortException {
|
||||
int offset = 0;
|
||||
while (offset < ci1.getSize()) {
|
||||
|
|
|
@ -64,14 +64,18 @@ public class RecentCommands {
|
|||
}
|
||||
|
||||
public void add(String command) {
|
||||
entries.put(new Entry(command), null);
|
||||
synchronized (entries) {
|
||||
entries.put(new Entry(command), null);
|
||||
}
|
||||
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
content.removeAll();
|
||||
for (Entry entry : entries.keySet()) {
|
||||
content.add(createButton(entry));
|
||||
synchronized (entries) {
|
||||
for (Entry entry : entries.keySet()) {
|
||||
content.add(createButton(entry));
|
||||
}
|
||||
}
|
||||
UiUtils.trueRepaint(content.getParent());
|
||||
UiUtils.trueLayout(content.getParent());
|
||||
|
|
Loading…
Reference in New Issue