REO progress
This commit is contained in:
parent
37bf761126
commit
4c86d84e0f
|
@ -38,8 +38,12 @@ public class IniFileModel {
|
|||
private boolean isInSettingContextHelp = false;
|
||||
private boolean isInsidePageDefinition;
|
||||
|
||||
public void readIniFile(String iniFilePath) {
|
||||
public void findAndReadIniFile(String iniFilePath) {
|
||||
String fileName = findMetaInfoFile(iniFilePath);
|
||||
readIniFile(fileName);
|
||||
}
|
||||
|
||||
public void readIniFile(String fileName) {
|
||||
File input = null;
|
||||
if (fileName != null)
|
||||
input = new File(fileName);
|
||||
|
@ -209,7 +213,7 @@ public class IniFileModel {
|
|||
public static synchronized IniFileModel getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = new IniFileModel();
|
||||
INSTANCE.readIniFile(INI_FILE_PATH);
|
||||
INSTANCE.findAndReadIniFile(INI_FILE_PATH);
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package com.rusefi.ui;
|
||||
|
||||
import com.opensr5.ini.IniFileModel;
|
||||
import com.opensr5.io.ConfigurationImageFile;
|
||||
import com.rusefi.tune.xml.Msq;
|
||||
import com.rusefi.xml.XmlUtil;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -9,9 +12,16 @@ import java.io.IOException;
|
|||
* from IDEA this unit test needs to be exectuted with "empty" working directory
|
||||
*/
|
||||
public class TuneReadWriteTest {
|
||||
private static final String PATH = "ui/src/test/resources/frankenso/";
|
||||
|
||||
@Test
|
||||
public void testReadTsTune() throws IOException {
|
||||
String binary = "ui/src/test/resources/frankenso/current_configuration.rusefi_binary";
|
||||
public void testReadTsTune() throws Exception {
|
||||
IniFileModel.getInstance().readIniFile(PATH + "mainController.ini");
|
||||
// Msq tsTune = XmlUtil.readModel(Msq.class, PATH + "CurrentTune.msq");
|
||||
// System.out.println(tsTune);
|
||||
|
||||
|
||||
String binary = PATH + "current_configuration.rusefi_binary";
|
||||
System.out.println("Reading " + binary);
|
||||
ConfigurationImageFile.readFromFile(binary);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue