mirror of https://github.com/rusefi/RomRaider.git
bug fixes
git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@277 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
parent
67d6fb1b55
commit
3a0bfa320b
|
@ -239,6 +239,11 @@ public final class EcuLogger extends JFrame implements WindowListener, PropertyC
|
|||
public void windowClosing(WindowEvent windowEvent) {
|
||||
try {
|
||||
controller.stop();
|
||||
try {
|
||||
Thread.sleep(250);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} finally {
|
||||
cleanUpUpdateHandlers();
|
||||
}
|
||||
|
|
|
@ -6,12 +6,13 @@ import enginuity.logger.definition.EcuDataConvertor;
|
|||
import javax.swing.*;
|
||||
import javax.swing.border.BevelBorder;
|
||||
import java.awt.*;
|
||||
import static java.util.Collections.synchronizedMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public final class DashboardUpdateHandler implements DataUpdateHandler {
|
||||
private final JPanel dashboardPanel;
|
||||
private final Map<EcuData, JLabel> gauges = new HashMap<EcuData, JLabel>();
|
||||
private final Map<EcuData, JLabel> gauges = synchronizedMap(new HashMap<EcuData, JLabel>());
|
||||
|
||||
public DashboardUpdateHandler(JPanel dashboardPanel) {
|
||||
this.dashboardPanel = dashboardPanel;
|
||||
|
|
|
@ -8,6 +8,7 @@ import enginuity.logger.io.file.FileLogger;
|
|||
import enginuity.logger.io.file.FileLoggerImpl;
|
||||
import static enginuity.util.ParamChecker.checkNotNull;
|
||||
|
||||
import static java.util.Collections.synchronizedList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
@ -15,7 +16,7 @@ import java.util.Map;
|
|||
|
||||
public final class FileUpdateHandler implements DataUpdateHandler {
|
||||
private final FileLogger fileLogger;
|
||||
private final List<EcuData> ecuDatas = new LinkedList<EcuData>();
|
||||
private final List<EcuData> ecuDatas = synchronizedList(new LinkedList<EcuData>());
|
||||
private Line currentLine = new Line(ecuDatas);
|
||||
|
||||
public FileUpdateHandler(Settings settings) {
|
||||
|
@ -102,7 +103,7 @@ public final class FileUpdateHandler implements DataUpdateHandler {
|
|||
|
||||
public String values() {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append(lastTimestamp);
|
||||
buffer.append(lastTimestamp / 1000.0);
|
||||
for (EcuData ecuData : ecuDataValues.keySet()) {
|
||||
String value = ecuDataValues.get(ecuData);
|
||||
buffer.append(DELIMITER).append(value);
|
||||
|
|
Loading…
Reference in New Issue