parent
fd1b33450a
commit
01a6815757
|
@ -31,11 +31,17 @@ public class Msq {
|
|||
@NotNull
|
||||
public static Msq valueOf(ConfigurationImage image) {
|
||||
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();
|
||||
tune.page.add(new Page(null, null));
|
||||
tune.page.add(new Page(0, Fields.TOTAL_CONFIG_SIZE));
|
||||
for (String key : ini.allIniFields.keySet())
|
||||
tune.loadConstant(ini, key, image);
|
||||
return tune;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import com.efiAnalytics.plugin.ecu.servers.ControllerParameterServer;
|
|||
import com.rusefi.TsTuneReader;
|
||||
import com.rusefi.tune.xml.Constant;
|
||||
import com.rusefi.tune.xml.Msq;
|
||||
import com.rusefi.tune.xml.Page;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
@ -17,7 +18,7 @@ import java.util.TreeMap;
|
|||
|
||||
public class TuneUploder {
|
||||
static Msq writeCurrentTune(ControllerAccess controllerAccess, String configurationName) {
|
||||
Msq msq = new Msq();
|
||||
Msq msq = Msq.create();
|
||||
ControllerParameterServer controllerParameterServer = controllerAccess.getControllerParameterServer();
|
||||
|
||||
Map<String, Constant> fileSystemValues = getFileSystemValues(configurationName);
|
||||
|
@ -79,7 +80,8 @@ public class TuneUploder {
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue