NA6 progress
This commit is contained in:
parent
14eae026e9
commit
44daac5baf
|
@ -19,6 +19,27 @@
|
||||||
|
|
||||||
EXTERN_CONFIG;
|
EXTERN_CONFIG;
|
||||||
|
|
||||||
|
// todo: use these defaults wider? make them global defaults maybe?
|
||||||
|
static const float hardCodedcrankingCycleBins[8] = {1.0, 16.0, 35.0, 54.0, 76.0, 102.0, 132.0, 169.0};
|
||||||
|
static const float hardCodedcrankingCycleCoef[8] = {1.9800034, 1.800003, 1.5999985, 1.4000015, 1.2300034, 1.1200027, 1.050003, 1.0199966};
|
||||||
|
|
||||||
|
/* Generated by TS2C on Thu Jul 30 00:03:20 EDT 2020*/
|
||||||
|
static void setCrankingCycleBins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
|
MEMCPY(config->crankingCycleBins, hardCodedcrankingCycleBins);
|
||||||
|
MEMCPY(config->crankingCycleCoef, hardCodedcrankingCycleCoef);
|
||||||
|
}
|
||||||
|
|
||||||
|
// todo: use these defaults wider? make them global defaults maybe?
|
||||||
|
static const float hardCodedcrankingFuelBins[8] = {-20.0, -10.0, 3.6799927, 22.77002, 34.049805, 49.95996, 65.0, 90.0};
|
||||||
|
static const float hardCodedcrankingFuelCoef[8] = {2.7999878, 2.2000122, 1.6900024, 1.2900009, 1.199997, 1.050003, 1.0, 1.0};
|
||||||
|
|
||||||
|
/* Generated by TS2C on Thu Jul 30 00:03:20 EDT 2020*/
|
||||||
|
static void setCrankingFuelBins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
|
MEMCPY(config->crankingFuelBins, hardCodedcrankingFuelBins);
|
||||||
|
MEMCPY(config->crankingFuelCoef, hardCodedcrankingFuelCoef);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static const float ve16RpmBins[FUEL_RPM_COUNT] = {
|
static const float ve16RpmBins[FUEL_RPM_COUNT] = {
|
||||||
650.0,1100.0,1550.0,2000.0,
|
650.0,1100.0,1550.0,2000.0,
|
||||||
2450.0,2900.0,3350.0,3800.0,
|
2450.0,2900.0,3350.0,3800.0,
|
||||||
|
@ -111,6 +132,9 @@ static void miataNAcommonEngineSettings(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
MEMCPY(config->ignitionTable, mapBased16IgnitionTable);
|
MEMCPY(config->ignitionTable, mapBased16IgnitionTable);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
setCrankingCycleBins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
setCrankingFuelBins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
engineConfiguration->idle.solenoidFrequency = 160;
|
engineConfiguration->idle.solenoidFrequency = 160;
|
||||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ import java.util.Date;
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("StringConcatenationInsideStringBufferAppend")
|
@SuppressWarnings("StringConcatenationInsideStringBufferAppend")
|
||||||
public class TS2C {
|
public class TS2C {
|
||||||
|
static final String FINGER_PRINT = "/* Generated by " + TS2C.class.getSimpleName() + " on " + new Date() + "*/\r\n";
|
||||||
// todo: replace with loadCount & rpmCount
|
// todo: replace with loadCount & rpmCount
|
||||||
private int size;
|
private int size;
|
||||||
|
|
||||||
|
@ -74,11 +75,12 @@ public class TS2C {
|
||||||
BufferedReader r = readAndScroll(msqFileName, tableName);
|
BufferedReader r = readAndScroll(msqFileName, tableName);
|
||||||
readTable(table, r);
|
readTable(table, r);
|
||||||
|
|
||||||
writeTable(w, (loadIndex, rpmIndex) -> table[loadIndex][rpmIndex], "TS2C");
|
writeTable(w, (loadIndex, rpmIndex) -> table[loadIndex][rpmIndex]);
|
||||||
w.write("\r\n\r\n");
|
w.write("\r\n\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
w.write("static void set" + methodName + "() {\n");
|
w.write(FINGER_PRINT);
|
||||||
|
w.write("static void set" + methodName + "(DECLARE_CONFIG_PARAMETER_SIGNATURE) {\n");
|
||||||
w.write("\tMEMCPY(config->" + loadSectionName + ", hardCoded" + loadSectionName + ");\n");
|
w.write("\tMEMCPY(config->" + loadSectionName + ", hardCoded" + loadSectionName + ");\n");
|
||||||
w.write("\tMEMCPY(config->" + rpmSectionName + ", hardCoded" + rpmSectionName + ");\n");
|
w.write("\tMEMCPY(config->" + rpmSectionName + ", hardCoded" + rpmSectionName + ");\n");
|
||||||
|
|
||||||
|
@ -92,8 +94,8 @@ public class TS2C {
|
||||||
w.close();
|
w.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeTable(BufferedWriter w, ValueSource valueSource, String toolName) throws IOException {
|
private void writeTable(BufferedWriter w, ValueSource valueSource) throws IOException {
|
||||||
w.write("/* Generated by " + toolName + " on " + new Date() + "*/\r\n");
|
w.write(FINGER_PRINT);
|
||||||
for (int loadIndex = 0; loadIndex < loadBins.getRawData().length; loadIndex++)
|
for (int loadIndex = 0; loadIndex < loadBins.getRawData().length; loadIndex++)
|
||||||
writeTableLine(valueSource, w, loadIndex);
|
writeTableLine(valueSource, w, loadIndex);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue