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