diff --git a/firmware/config/engines/hyundai.cpp b/firmware/config/engines/hyundai.cpp index eb4f1a0728..3701fc0345 100644 --- a/firmware/config/engines/hyundai.cpp +++ b/firmware/config/engines/hyundai.cpp @@ -29,6 +29,15 @@ void setHyundaiPb() { engineConfiguration->trigger.type = trigger_type_e::TT_TOOTHED_WHEEL_60_2; engineConfiguration->globalTriggerAngleOffset = 90; + engineConfiguration->etbIdleThrottleRange = 6.0; + + engineConfiguration->totalGearsCount = 5; + engineConfiguration->gearRatio[0] = 12; + engineConfiguration->gearRatio[1] = 6; + engineConfiguration->gearRatio[2] = 4.4; + engineConfiguration->gearRatio[3] = 2.4; + engineConfiguration->gearRatio[4] = 1; + // ETB buzzing is annoying :( engineConfiguration->disableEtbWhenEngineStopped = true; @@ -48,7 +57,7 @@ void setHyundaiPb() { engineConfiguration->map.sensor.highValue = 101.3; engineConfiguration->mapHighValueVoltage = 4; - engineConfiguration->mc33_hpfp_i_peak = 8; + engineConfiguration->mc33_hpfp_i_peak = 10; engineConfiguration->mc33_hpfp_i_hold = 4; engineConfiguration->vvtMode[0] = VVT_SECOND_HALF; diff --git a/java_tools/configuration_definition_base/src/main/java/com/rusefi/ConfigField.java b/java_tools/configuration_definition_base/src/main/java/com/rusefi/ConfigField.java index 1869dfe89d..2a94c44b91 100644 --- a/java_tools/configuration_definition_base/src/main/java/com/rusefi/ConfigField.java +++ b/java_tools/configuration_definition_base/src/main/java/com/rusefi/ConfigField.java @@ -150,6 +150,14 @@ public interface ConfigField { } }; + default String getOriginalArrayName() { + if (isFromIterate()) { + return getIterateOriginalName() + "[" + (getIterateIndex() - 1) + "]"; + } else { + return getName(); + } + } + ConfigStructure getStructureType(); boolean isArray(); diff --git a/java_tools/configuration_definition_base/src/main/java/com/rusefi/output/SdCardFieldsContent.java b/java_tools/configuration_definition_base/src/main/java/com/rusefi/output/SdCardFieldsContent.java index 682785352d..312b5b9894 100644 --- a/java_tools/configuration_definition_base/src/main/java/com/rusefi/output/SdCardFieldsContent.java +++ b/java_tools/configuration_definition_base/src/main/java/com/rusefi/output/SdCardFieldsContent.java @@ -32,12 +32,8 @@ public class SdCardFieldsContent { if (configField.isBit()) return ""; - if (configField.isFromIterate()) { - String name = configField.getIterateOriginalName() + "[" + (configField.getIterateIndex() - 1) + "]"; - return getLine(configField, prefix, prefix + name); - } else { - return getLine(configField, prefix, prefix + configField.getName()); - } + String name = configField.getOriginalArrayName(); + return getLine(configField, prefix, prefix + name); } private String getLine(ConfigField configField, String prefix, String name) { diff --git a/java_tools/tune-tools/src/main/java/com/rusefi/tools/tune/TuneCanTool.java b/java_tools/tune-tools/src/main/java/com/rusefi/tools/tune/TuneCanTool.java index 2dee57dc3b..929327aa74 100644 --- a/java_tools/tune-tools/src/main/java/com/rusefi/tools/tune/TuneCanTool.java +++ b/java_tools/tune-tools/src/main/java/com/rusefi/tools/tune/TuneCanTool.java @@ -43,6 +43,7 @@ public class TuneCanTool { RootHolder.ROOT = "../firmware/"; + handle("PB", 1502); handle("Mitsubicha", 1258); handle("Scion-1NZ-FE", 1448); handle("4g93", 1425); @@ -132,6 +133,7 @@ public class TuneCanTool { System.out.println("Not found " + name); continue; } + String cName = cf.getOriginalArrayName(); if (cf.getType().equals("boolean")) { sb.append(TuneTools.getAssignmentCode(defaultValue, customValue.getName(), unquote(customValue.getValue()))); @@ -168,11 +170,13 @@ public class TuneCanTool { continue; } - boolean isInteger = !customValue.getValue().contains("."); + double doubleValue = Double.valueOf(customValue.getValue()); + int intValue = (int) doubleValue; + boolean isInteger = intValue == doubleValue; if (isInteger) { - sb.append(TuneTools.getAssignmentCode(defaultValue, customValue.getName(), customValue.getValue())); + sb.append(TuneTools.getAssignmentCode(defaultValue, cName, Integer.toString(intValue))); } else { - sb.append(TuneTools.getAssignmentCode(defaultValue, customValue.getName(), niceToString(Double.valueOf(customValue.getValue())))); + sb.append(TuneTools.getAssignmentCode(defaultValue, cName, niceToString(doubleValue))); } } }