REO progress

This commit is contained in:
rusefi 2020-06-13 21:17:38 -04:00
parent ea8b5df4cd
commit 611a9e5ce3
2 changed files with 9 additions and 1 deletions

View File

@ -29,6 +29,6 @@ public class IniField {
}
public void setValue(ConfigurationImage image, Constant constant) {
// throw new UnsupportedOperationException("On " + getClass());
throw new UnsupportedOperationException("On " + getClass());
}
}

View File

@ -1,6 +1,7 @@
package com.opensr5.ini.field;
import com.opensr5.ConfigurationImage;
import com.rusefi.tune.xml.Constant;
import java.util.LinkedList;
@ -19,6 +20,13 @@ public class StringIniField extends IniField {
return value;
}
@Override
public void setValue(ConfigurationImage image, Constant constant) {
String value = constant.getValue();
for (int i = 0; i < value.length(); i++)
image.getContent()[getOffset() + i] = (byte) value.charAt(i);
}
public static IniField parse(LinkedList<String> list) {
String name = list.get(0);
int offset = Integer.parseInt(list.get(3));