parent
3be0b3326c
commit
1554509dda
|
@ -31,11 +31,17 @@ public class Msq {
|
||||||
@NotNull
|
@NotNull
|
||||||
public static Msq valueOf(ConfigurationImage image) {
|
public static Msq valueOf(ConfigurationImage image) {
|
||||||
IniFileModel ini = IniFileModel.getInstance();
|
IniFileModel ini = IniFileModel.getInstance();
|
||||||
|
Msq tune = create();
|
||||||
|
for (String key : ini.allIniFields.keySet())
|
||||||
|
tune.loadConstant(ini, key, image);
|
||||||
|
return tune;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public static Msq create() {
|
||||||
Msq tune = new Msq();
|
Msq tune = new Msq();
|
||||||
tune.page.add(new Page(null, null));
|
tune.page.add(new Page(null, null));
|
||||||
tune.page.add(new Page(0, Fields.TOTAL_CONFIG_SIZE));
|
tune.page.add(new Page(0, Fields.TOTAL_CONFIG_SIZE));
|
||||||
for (String key : ini.allIniFields.keySet())
|
|
||||||
tune.loadConstant(ini, key, image);
|
|
||||||
return tune;
|
return tune;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.efiAnalytics.plugin.ecu.servers.ControllerParameterServer;
|
||||||
import com.rusefi.TsTuneReader;
|
import com.rusefi.TsTuneReader;
|
||||||
import com.rusefi.tune.xml.Constant;
|
import com.rusefi.tune.xml.Constant;
|
||||||
import com.rusefi.tune.xml.Msq;
|
import com.rusefi.tune.xml.Msq;
|
||||||
|
import com.rusefi.tune.xml.Page;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import javax.xml.bind.JAXBException;
|
import javax.xml.bind.JAXBException;
|
||||||
|
@ -17,7 +18,7 @@ import java.util.TreeMap;
|
||||||
|
|
||||||
public class TuneUploder {
|
public class TuneUploder {
|
||||||
static Msq writeCurrentTune(ControllerAccess controllerAccess, String configurationName) {
|
static Msq writeCurrentTune(ControllerAccess controllerAccess, String configurationName) {
|
||||||
Msq msq = new Msq();
|
Msq msq = Msq.create();
|
||||||
ControllerParameterServer controllerParameterServer = controllerAccess.getControllerParameterServer();
|
ControllerParameterServer controllerParameterServer = controllerAccess.getControllerParameterServer();
|
||||||
|
|
||||||
Map<String, Constant> fileSystemValues = getFileSystemValues(configurationName);
|
Map<String, Constant> fileSystemValues = getFileSystemValues(configurationName);
|
||||||
|
@ -79,7 +80,8 @@ public class TuneUploder {
|
||||||
value = cp.getStringValue();
|
value = cp.getStringValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
msq.findPage().constant.add(new Constant(parameterName, cp.getUnits(), value));
|
Page page = msq.findPage();
|
||||||
|
page.constant.add(new Constant(parameterName, cp.getUnits(), value));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getArrayValue(double[][] arrayValues) {
|
private static String getArrayValue(double[][] arrayValues) {
|
||||||
|
|
Loading…
Reference in New Issue