public override void NameKnownMaps(byte[] allBytes, SymbolCollection newSymbols, List<CodeBlock> newCodeBlocks)
{
SymbolAxesTranslator st = new SymbolAxesTranslator();
foreach (SymbolHelper sh in newSymbols)
{
//sh.X_axis_descr = st.TranslateAxisID(sh.X_axis_ID);
//sh.Y_axis_descr = st.TranslateAxisID(sh.Y_axis_ID);
if (sh.Length == 700) // 25*14
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
sh.Varname = "Launch control map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.156250;
//sh.Y_axis_correction = 0.000039;
sh.Correction = 0.01;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Ratio vehicle/engine speed";
sh.Y_axis_descr = "Approx. vehicle speed (km/h)";
//sh.Z_axis_descr = "Output percentage";
sh.Z_axis_descr = "IQ limit";
sh.YaxisUnits = "km/h";
sh.XaxisUnits = "rpm";
}
if (sh.Length == 570)
{
if (sh.X_axis_ID / 256 == 0xC5 && sh.Y_axis_ID / 256 == 0xEC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
else if (sh.X_axis_ID / 256 == 0xC4 && sh.Y_axis_ID / 256 == 0xEA)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
else if (sh.X_axis_ID / 256 == 0xC4 && sh.Y_axis_ID / 256 == 0xEC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
}
else if (sh.Length == 480)
{
if (sh.X_axis_ID / 256 == 0xC5 && sh.Y_axis_ID / 256 == 0xEC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
//IAT, ECT or Fuel temp?
double tempRange = GetTemperatureDurRange(injDurCount - 1);
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
else if (sh.X_axis_ID / 256 == 0xC4 && sh.Y_axis_ID / 256 == 0xEA)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
//IAT, ECT or Fuel temp?
double tempRange = GetTemperatureDurRange(injDurCount - 1);
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
}
else if (sh.Length == 448)
{
if (sh.MapSelector.NumRepeats == 10)
{
// SOI maps detected
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Start of injection (SOI)", sh.CodeBlock, newSymbols, false);
//based on coolant temperature
double tempRange = GetTemperatureSOIRange(sh.MapSelector, injDurCount - 1);
sh.Varname = "Start of injection (SOI) " + tempRange.ToString() + " °C [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.Correction = -0.023437;
sh.Offset = 78;
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.X_axis_correction = 0.01; // TODODONE : Check for x or y
sh.XaxisUnits = "mg/st";
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Z_axis_descr = "Start position (degrees BTDC)";
}
else if (sh.X_axis_ID / 256 == 0xC5 && sh.Y_axis_ID / 256 == 0xEC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
}
else if (sh.Length == 416)
{
string strAddrTest = sh.Flash_start_address.ToString("X8");
if (sh.X_axis_ID / 256 == 0xF9 && sh.Y_axis_ID / 256 == 0xDA)
{
// this is IQ by MAF limiter!
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
int smokeCount = GetMapNameCountForCodeBlock("Smoke limiter", sh.CodeBlock, newSymbols, false);
//sh.Varname = "Smoke limiter " + smokeCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Varname = "Smoke limiter [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
if (sh.MapSelector != null)
{
if (sh.MapSelector.MapIndexes != null)
{
if (sh.MapSelector.MapIndexes.Length > 1)
{
if (!MapSelectorIndexEmpty(sh))
{
double tempRange = GetTemperatureSOIRange(sh.MapSelector, smokeCount - 1);
sh.Varname = "Smoke limiter " + tempRange.ToString() + " °C [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
}
}
}
}
sh.Z_axis_descr = "Maximum IQ (mg)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.X_axis_descr = "Airflow mg/stroke";
sh.Correction = 0.01;
sh.X_axis_correction = 0.1;
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
else if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xDA)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
// if x axis = upto 3000 -> MAP limit, not MAF limit
if (GetMaxAxisValue(allBytes, sh, MapViewerEx.AxisIdent.Y_Axis) < 4000)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "IQ by MAP limiter [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") +" " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.Correction = 0.01;
sh.X_axis_descr = "Boost pressure";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.Z_axis_descr = "Maximum IQ (mg)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mbar";
}
else
{
int iqMAFLimCount = GetMapNameCountForCodeBlock("IQ by MAF limiter", sh.CodeBlock, newSymbols, false);
sh.Varname = "IQ by MAF limiter " + iqMAFLimCount.ToString() + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
//sh.Varname = "IQ by MAF limiter [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Maximum IQ (mg)";
sh.Correction = 0.01;
sh.X_axis_correction = 0.1;
sh.XaxisUnits = "mg/st";
sh.X_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
}
}
else if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xEA)
{
sh.Category = "Detected maps";
sh.Subcategory = "Turbo";
sh.Varname = "N75 duty cycle [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Duty cycle %";
sh.Correction = -0.01;
sh.Offset = 100;
//sh.Correction = 0.01;
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
/*else if (strAddrTest.EndsWith("116"))
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
int egrCount = GetMapNameCountForCodeBlock("EGR", sh.CodeBlock, newSymbols, false);
sh.Varname = "EGR " + egrCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.1;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Mass Air Flow (mg/stroke)";
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}*/
else if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID == 0xE9D4)
{
// x axis should start with 0!
sh.Category = "Detected maps";
sh.Subcategory = "Turbo";
sh.Varname = "N75 duty cycle [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Duty cycle %";
sh.Correction = -0.01;
sh.Offset = 100;
//sh.Correction = 0.01;
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
else if ((sh.X_axis_ID / 256 == 0xEC) && (sh.Y_axis_ID / 256 == 0xC0 || sh.Y_axis_ID / 256 == 0xE9))
{
// x axis should start with 0!
if (allBytes[sh.Y_axis_address] == 0 && allBytes[sh.Y_axis_address + 1] == 0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
int egrCount = GetMapNameCountForCodeBlock("EGR", sh.CodeBlock, newSymbols, false);
sh.Varname = "EGR " + egrCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.1;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Mass Air Flow (mg/stroke)";
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
}
else if (sh.X_axis_ID / 256 == 0xEA && sh.Y_axis_ID / 256 == 0xE9)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Start of injection (SOI)", sh.CodeBlock, newSymbols, false);
//IAT, ECT or Fuel temp?
double tempRange = GetTemperatureSOIRange(sh.MapSelector, injDurCount - 1);
sh.Varname = "Start of injection (SOI) " + tempRange.ToString() + " °C [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.Correction = -0.023437;
sh.Offset = 78;
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.X_axis_correction = 0.01; // TODODONE : Check for x or y
sh.XaxisUnits = "mg/st";
sh.Z_axis_descr = "Start position (degrees BTDC)";
}
else if (sh.X_axis_ID / 256 == 0xEA && sh.Y_axis_ID / 256 == 0xE8)
{
// EGR or N75
if (allBytes[sh.X_axis_address] == 0 && allBytes[sh.X_axis_address + 1] == 0)
{
// EGR
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
int egrCount = GetMapNameCountForCodeBlock("EGR", sh.CodeBlock, newSymbols, false);
sh.Varname = "EGR " + egrCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.1;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Mass Air Flow (mg/stroke)";
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
else
{
//N75
sh.Category = "Detected maps";
sh.Subcategory = "Turbo";
sh.Varname = "N75 duty cycle [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Duty cycle %";
sh.Correction = -0.01;
sh.Offset = 100;
//sh.Correction = 0.01;
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
}
/* else if ((sh.X_axis_ID / 256 == 0xEA) && (sh.Y_axis_ID / 256 == 0xE8))
{
// x axis should start with 0!
if (allBytes[sh.Y_axis_address] == 0 && allBytes[sh.Y_axis_address + 1] == 0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
int egrCount = GetMapNameCountForCodeBlock("EGR", sh.CodeBlock, newSymbols, false);
sh.Varname = "EGR " + egrCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.1;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Mass Air Flow (mg/stroke)";
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
}*/
}
else if (sh.Length == 390)
{
// 15x12 = inj dur limiter on R3 files
if (sh.X_axis_length == 13 && sh.Y_axis_length == 15)
{
/* sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Injection duration limiter B [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.Correction = 0.023438;
sh.Y_axis_correction = 0.01;
sh.Y_axis_descr = "IQ (mg/stroke)";
sh.Z_axis_descr = "Max. degrees";
sh.X_axis_descr = "Engine speed (rpm)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";*/
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
else if ((sh.X_axis_ID / 256 == 0xEC) && (sh.Y_axis_ID / 256 == 0xC0))
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
int egrCount = GetMapNameCountForCodeBlock("EGR", sh.CodeBlock, newSymbols, false);
sh.Varname = "EGR " + egrCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.1;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Mass Air Flow (mg/stroke)";
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
}
else if (sh.Length == 384)
{
if (sh.X_axis_length == 12 && sh.Y_axis_length == 16)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
sh.Varname = "Inverse driver wish [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.01;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Throttle position";
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
//sh.Z_axis_descr = "Requested IQ (mg)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
else if (sh.X_axis_length == 16 && sh.Y_axis_length == 12)
{
if ((sh.X_axis_ID / 256 == 0xEA) && (sh.Y_axis_ID / 256 == 0xDA))
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
int smokeCount = GetMapNameCountForCodeBlock("Smoke limiter", sh.CodeBlock, newSymbols, false);
//sh.Varname = "Smoke limiter " + smokeCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Varname = "Smoke limiter [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
if (sh.MapSelector != null)
{
if (sh.MapSelector.MapIndexes != null)
{
if (sh.MapSelector.MapIndexes.Length > 1)
{
if (!MapSelectorIndexEmpty(sh))
{
double tempRange = GetTemperatureSOIRange(sh.MapSelector, smokeCount - 1);
sh.Varname = "Smoke limiter " + tempRange.ToString() + " °C [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
}
}
}
}
sh.Z_axis_descr = "Maximum IQ (mg)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.X_axis_descr = "Airflow mg/stroke";
sh.Correction = 0.01;
sh.X_axis_correction = 0.1;
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
else if ((sh.X_axis_ID / 256 == 0xEC) && (sh.Y_axis_ID / 256 == 0xC0))
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
int egrCount = GetMapNameCountForCodeBlock("EGR", sh.CodeBlock, newSymbols, false);
sh.Varname = "EGR " + egrCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.1;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Mass Air Flow (mg/stroke)";
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
}
}
else if (sh.Length == 360)
{
// 15x12 = inj dur limiter on R3 files
if (sh.X_axis_length == 12 && sh.Y_axis_length == 15)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
}
else if (sh.Length == 352)
{
if (sh.X_axis_length == 16 && sh.Y_axis_length == 11)
{
if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xC0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
int egrCount = GetMapNameCountForCodeBlock("EGR", sh.CodeBlock, newSymbols, false);
sh.Varname = "EGR " + egrCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.1;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Mass Air Flow (mg/stroke)";
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
else if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xEA)
{
sh.Category = "Detected maps";
sh.Subcategory = "Turbo";
sh.Varname = "N75 duty cycle [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Duty cycle %";
sh.Correction = -0.01;
sh.Offset = 100;
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
}
}
else if (sh.Length == 320)
{
sh.Category = "Probable maps";
sh.Subcategory = "Turbo";
sh.Varname = "Boost map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "] " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xC0)
{
sh.Category = "Detected maps";
sh.Varname = "Boost target map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.Z_axis_descr = "Boost target (mbar)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
else if (sh.X_axis_ID / 256 == 0xEA && sh.Y_axis_ID / 256 == 0xC0)
{
sh.Category = "Detected maps";
sh.Varname = "Boost target map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.Z_axis_descr = "Boost target (mbar)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xDA)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "IQ by MAP limiter [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") +" " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.Correction = 0.01;
sh.X_axis_descr = "Boost pressure";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.Z_axis_descr = "Maximum IQ (mg)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mbar";
}
}
else if (sh.Length == 308)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
//sh.Varname = "Boost limiter (temperature) [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Varname = "SOI limiter (temperature) [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = -0.023437;
sh.Offset = 78;
sh.Y_axis_descr = "Engine speed (rpm)";
sh.X_axis_descr = "Temperature"; //IAT, ECT or Fuel temp?
sh.X_axis_correction = 0.1;
sh.X_axis_offset = -273.1;
sh.Z_axis_descr = "SOI limit (degrees)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "°C";
}
else if (sh.Length == 286)
{
if (sh.X_axis_length == 0x0d && sh.Y_axis_length == 0x0b)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
sh.Varname = "Driver wish [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.01;
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "Throttle position";
sh.Z_axis_descr = "Requested IQ (mg)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "TPS %";
}
}
else if (sh.Length == 280) // boost target can be 10x14 as well in Seat maps
{
if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xC0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Turbo";
sh.Varname = "Boost target map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "] " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.Z_axis_descr = "Boost target (mbar)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
}
else if (sh.Length == 260) // EXPERIMENTAL
{
if (sh.X_axis_ID / 256 == 0xC5 && sh.Y_axis_ID / 256 == 0xEC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
}
else if (sh.Length == 256)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
sh.Varname = "Driver wish [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.01;
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "Throttle position";
sh.Z_axis_descr = "Requested IQ (mg)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "TPS %";
}
else if (sh.Length == 240)
{
if (sh.X_axis_length == 12 && sh.Y_axis_length == 10)
{
if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xC0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
sh.Varname = "Driver wish [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.01;
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "Throttle position";
sh.Z_axis_descr = "Requested IQ (mg)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "TPS %";
}
}
}
else if (sh.Length == 220) // EXPERIMENTAL
{
if (sh.X_axis_ID / 256 == 0xC5 && sh.Y_axis_ID / 256 == 0xEC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
}
else if (sh.Length == 216)
{
if (sh.X_axis_length == 12 && sh.Y_axis_length == 9)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
sh.Varname = "Driver wish [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.01;
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "Throttle position";
sh.Z_axis_descr = "Requested IQ (mg)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "TPS %";
}
}
else if (sh.Length == 200)
{
if (sh.X_axis_ID / 256 == 0xC0 && sh.Y_axis_ID / 256 == 0xEC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Boost limit map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
// sh.Correction = 0.01;
//sh.X_axis_correction = 0.01;
sh.Y_axis_descr = "Atmospheric pressure (mbar)";
sh.Z_axis_descr = "Maximum boost pressure (mbar)";
sh.X_axis_descr = "Engine speed (rpm)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mbar";
}
else if (sh.X_axis_ID / 256 == 0xC0 && sh.Y_axis_ID / 256 == 0xEA)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Boost limit map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
// sh.Correction = 0.01;
//sh.X_axis_correction = 0.01;
sh.Y_axis_descr = "Atmospheric pressure (mbar)";
sh.Z_axis_descr = "Maximum boost pressure (mbar)";
sh.X_axis_descr = "Engine speed (rpm)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mbar";
}
else if (sh.X_axis_ID / 256 == 0xC5 && sh.Y_axis_ID / 256 == 0xEC)
{
//if (!MapContainsNegativeValues(allBytes, sh))
if (GetMaxAxisValue(allBytes, sh, MapViewerEx.AxisIdent.X_Axis) > 3500) // was 5000
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel"; // was Limiters
// was limiter
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.Correction = 0.023438;
sh.Y_axis_correction = 0.01;
sh.Y_axis_descr = "IQ (mg/stroke)";
//sh.Z_axis_descr = "Max. degrees";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.X_axis_descr = "Engine speed (rpm)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
else
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
}
else if (sh.X_axis_ID / 256 == 0xC4 && sh.Y_axis_ID / 256 == 0xEA)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
else if (sh.X_axis_ID / 256 == 0xC4 && sh.Y_axis_ID / 256 == 0xEC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
}
else if (sh.Length == 198) // EXPERIMENTAL
{
if (sh.X_axis_ID / 256 == 0xC5 && sh.Y_axis_ID / 256 == 0xEC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
}
else if (sh.Length == 192)
{
if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xC0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
sh.Varname = "Driver wish [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.01;
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "Throttle position";
sh.Z_axis_descr = "Requested IQ (mg)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "TPS %";
}
}
else if (sh.Length == 180)
{
if (sh.X_axis_length == 9 && sh.Y_axis_length == 10)
{
if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xC1)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int sIQCount = GetMapNameCountForCodeBlock("Start IQ ", sh.CodeBlock, newSymbols, false);
sh.Varname = "Start IQ (" + sIQCount.ToString() + ") [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.01;
sh.X_axis_descr = "CT (celcius)";
sh.X_axis_correction = 0.1;
sh.X_axis_offset = -273.1;
sh.Z_axis_descr = "Requested IQ (mg)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "degC";
}
else if (sh.X_axis_ID / 256 == 0xC0 && sh.Y_axis_ID / 256 == 0xEC)
{
// atm boost limit R3 file versions
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Boost limit map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
// sh.Correction = 0.01;
//sh.X_axis_correction = 0.01;
sh.Y_axis_descr = "Atmospheric pressure (mbar)";
sh.Z_axis_descr = "Maximum boost pressure (mbar)";
sh.X_axis_descr = "Engine speed (rpm)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mbar";
}
else if (sh.X_axis_ID / 256 == 0xC5 && sh.Y_axis_ID / 256 == 0xEC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
else if (sh.X_axis_ID / 256 == 0xC4 && sh.Y_axis_ID / 256 == 0xEA)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
}
else if (sh.X_axis_length == 10 && sh.Y_axis_length == 9)
{
if (sh.X_axis_ID / 256 == 0xC5 && sh.Y_axis_ID / 256 == 0xEC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
//if (injDurCount < 1) injDurCount = 1;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
}
}
else if (sh.Length == 162)
{
if (sh.X_axis_length == 9 && sh.Y_axis_length == 9)
{
if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xC1)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int sIQCount = GetMapNameCountForCodeBlock("Start IQ ", sh.CodeBlock, newSymbols, false);
sh.Varname = "Start IQ (" + sIQCount.ToString() + ") [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 0.01;
sh.X_axis_descr = "CT (celcius)";
sh.X_axis_correction = 0.1;
sh.X_axis_offset = -273.1;
sh.Z_axis_descr = "Requested IQ (mg)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "degC";
}
}
}
else if (sh.Length == 160)
{
if (sh.X_axis_length == 8 && sh.Y_axis_length == 10)
{
if (sh.X_axis_ID / 256 == 0xC5 && sh.Y_axis_ID / 256 == 0xEC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Injector duration", sh.CodeBlock, newSymbols, false);
injDurCount--;
sh.Varname = "Injector duration " + injDurCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_correction = 0.01;
sh.Correction = 0.023437;
sh.X_axis_descr = "Engine speed (rpm)";
//sh.Y_axis_descr = "Airflow mg/stroke";
sh.Y_axis_descr = "Requested Quantity mg/stroke";
sh.Z_axis_descr = "Duration (crankshaft degrees)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mg/st";
}
}
}
else if (sh.Length == 144)
{
if (sh.X_axis_length == 9 && sh.Y_axis_length == 8)
{
if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xC0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
sh.Varname = "Fuel volume correction map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Userdescription = "zmwMKOR_KF";
sh.Z_axis_descr = "IQ correction per 100K";
sh.Correction = 0.002441;
sh.Y_axis_descr = "Engine speed (rpm)";
sh.X_axis_correction = 0.01;
sh.X_axis_descr = "IQ (mg/stroke)";
}
}
if (sh.X_axis_length == 8 && sh.Y_axis_length == 9)
{
if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xC1)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int sIQCount = GetMapNameCountForCodeBlock("Start IQ ", sh.CodeBlock, newSymbols, false);
sh.Varname = "Start IQ (" + sIQCount.ToString() + ") [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.X_axis_descr = "CT (celcius)";
sh.X_axis_correction = 0.1;
sh.X_axis_offset = -273.1;
sh.Z_axis_descr = "Requested IQ (mg)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.Correction = 0.01;
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "degC";
}
}
if (sh.X_axis_length == 3 && sh.Y_axis_length == 24)
{
// Tq Lim
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Torque limiter [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Maximum IQ (mg)";
sh.Y_axis_descr = "Atm. pressure (mbar)";
sh.X_axis_descr = "Engine speed (rpm)";
sh.Correction = 0.01;
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mbar";
}
}
else if (sh.Length == 128)
{
if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xC1)
{
// check for valid axis data on temp data
if (IsValidTemperatureAxis(allBytes, sh, MapViewerEx.AxisIdent.Y_Axis))
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
int maflimTempCount = GetMapNameCountForCodeBlock("MAF correction by temperature", sh.CodeBlock, newSymbols, false);
maflimTempCount--;
sh.Varname = "MAF correction by temperature " + maflimTempCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Limit";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.X_axis_descr = "Intake air temperature"; //IAT, ECT or Fuel temp?
sh.X_axis_correction = 0.1;
sh.X_axis_offset = -273.1;
sh.Correction = 0.01;
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "°C";
}
}
else if (sh.X_axis_ID / 256 == 0xEA && sh.Y_axis_ID / 256 == 0xC1)
{
// check for valid axis data on temp data
if (IsValidTemperatureAxis(allBytes, sh, MapViewerEx.AxisIdent.Y_Axis))
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
int maflimTempCount = GetMapNameCountForCodeBlock("MAF correction by temperature", sh.CodeBlock, newSymbols, false);
maflimTempCount--;
sh.Varname = "MAF correction by temperature " + maflimTempCount.ToString("D2") + " [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Limit";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.X_axis_descr = "Intake air temperature"; //IAT, ECT or Fuel temp?
sh.X_axis_correction = 0.1;
sh.X_axis_offset = -273.1;
sh.Correction = 0.01;
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "°C";
}
}
else if (sh.X_axis_ID / 256 == 0xEC && sh.Y_axis_ID / 256 == 0xC0) // EXPERIMENTAL
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Expected fuel temperature [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Userdescription = "zmwMKBT_KF";
sh.Correction = 0.1;
sh.Offset = -273.1;
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.X_axis_correction = 0.01;
sh.XaxisUnits = "mg/st";
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Z_axis_descr = "Fuel temperature °C";
}
}
else if (sh.Length == 150) // 3L (1.2 TDi, three cylinder VW Lupo) has this
{
if (sh.X_axis_length == 3 && sh.Y_axis_length == 25)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Torque limiter [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Maximum IQ (mg)";
sh.Y_axis_descr = "Atm. pressure (mbar)";
sh.X_axis_descr = "Engine speed (rpm)";
sh.Correction = 0.01;
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mbar";
}
}
else if (sh.Length == 138) // R3 (1.4 TDi, three cylinder) has this
{
if (sh.X_axis_length == 3 && sh.Y_axis_length == 23)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Torque limiter [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Maximum IQ (mg)";
sh.Y_axis_descr = "Atm. pressure (mbar)";
sh.X_axis_descr = "Engine speed (rpm)";
sh.Correction = 0.01;
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mbar";
}
}
else if (sh.Length == 132) // R3 (1.4 TDi, three cylinder) has this
{
if (sh.X_axis_length == 3 && sh.Y_axis_length == 22)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Torque limiter [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Maximum IQ (mg)";
sh.Y_axis_descr = "Atm. pressure (mbar)";
sh.X_axis_descr = "Engine speed (rpm)";
sh.Correction = 0.01;
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mbar";
}
}
else if (sh.Length == 126)
{
if (sh.X_axis_length == 3 && sh.Y_axis_length == 21)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Torque limiter [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Maximum IQ (mg)";
sh.Y_axis_descr = "Atm. pressure (mbar)";
sh.X_axis_descr = "Engine speed (rpm)";
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mbar";
sh.Correction = 0.01;
}
}
else if (sh.Length == 120)
{
if (sh.X_axis_length == 3 && sh.Y_axis_length == 20)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Torque limiter [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Maximum IQ (mg)";
sh.Y_axis_descr = "Atm. pressure (mbar)";
sh.X_axis_descr = "Engine speed (rpm)";
sh.Correction = 0.01;
sh.XaxisUnits = "rpm";
sh.YaxisUnits = "mbar";
}
}
else if (sh.Length == 64)
{
if (sh.X_axis_length == 32 && sh.Y_axis_length == 1)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
sh.Varname = "MAF linearization [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
}
}
else if (sh.Length == 60)
{
if (sh.Y_axis_length == 6 && sh.X_axis_length == 5)
{
if (sh.Y_axis_ID == 0xC1A2)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
sh.Varname = "EGR temperature map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.X_axis_descr = "Temperature"; //IAT, ECT or Fuel temp?
sh.X_axis_correction = 0.1;
sh.X_axis_offset = -273.1;
sh.Z_axis_descr = "Mass airflow correction";
}
}
}
else if (sh.Length >= 18 && sh.Length <= 70)
{
if (sh.X_axis_ID / 16 == 0xC1A && sh.Y_axis_ID / 16 == 0xEC3)
{
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
//Temp after intercooler
sh.Y_axis_descr = "Temperature";
sh.X_axis_descr = "Engine speed (rpm)"; //IAT, ECT or Fuel temp?
sh.Y_axis_correction = 0.1;
sh.Y_axis_offset = -273.1;
sh.Z_axis_descr = "%";
sh.Correction = 0.01;
sh.Varname = "IQ by air intake temp[" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
}
}
}
else if (sh.Length == 20)
{
if (sh.Y_axis_length == 5 && sh.X_axis_length == 2)
{
//if (sh.Y_axis_ID == 0xC1A2)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
//sh.Y_axis_descr = "Engine speed (rpm)";
sh.Y_axis_descr = "Air pressure";
sh.X_axis_descr = "Temperature"; //IAT, ECT or Fuel temp?
sh.X_axis_correction = 0.1;
sh.X_axis_offset = -273.1;
sh.Z_axis_descr = "Time (sec)";
sh.Correction = 0.01;
sh.Varname = "Pre-glow map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
}
}
}
else if (sh.Length == 12)
{
if (sh.X_axis_length == 6 && sh.Y_axis_length == 1)
{
if ((sh.X_axis_ID & 0xFFF0) == 0xECB0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
sh.Varname = "Selector for injector duration [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
// soi values as axis!!
sh.Y_axis_correction = -0.023437;
sh.Y_axis_offset = 78;
sh.Correction = 0.00390625;
sh.Z_axis_descr = "Map index";
sh.YaxisUnits = "SOI";
}
}
}
else if (sh.Length == 8)
{
/*if (sh.X_axis_ID / 256 == 0xC1) // idle RPM
{
if (IsValidTemperatureAxis(allBytes, sh, MapViewerEx.AxisIdent.X_Axis))
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
int lmCount = GetMapNameCountForCodeBlock("Idle RPM", sh.CodeBlock, newSymbols, false);
sh.Varname = "Idle RPM (" + lmCount.ToString() + ") [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_descr = "Coolant temperature";
sh.Y_axis_correction = 0.1;
sh.Y_axis_offset = -273.1;
sh.Z_axis_descr = "Target engine speed";
sh.YaxisUnits = "°C";
}
}*/
}
else if (sh.Length == 4)
{
if (sh.X_axis_length == 2 && sh.Y_axis_length == 1)
{
if (sh.X_axis_ID == 0xEBA2 || sh.X_axis_ID == 0xEBA4 || sh.X_axis_ID == 0xE9BC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
sh.Varname = "MAP linearization [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
}
else if (sh.X_axis_ID / 256 == 0xC1) // idle RPM
{
if (IsValidTemperatureAxis(allBytes, sh, MapViewerEx.AxisIdent.X_Axis))
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
int lmCount = GetMapNameCountForCodeBlock("Idle RPM", sh.CodeBlock, newSymbols, false);
sh.Varname = "Idle RPM (" + lmCount.ToString() + ") [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Y_axis_descr = "Coolant temperature";
sh.Y_axis_correction = 0.1;
sh.Y_axis_offset = -273.1;
sh.Z_axis_descr = "Target engine speed";
sh.YaxisUnits = "°C";
}
}
}
}
if (sh.X_axis_ID == 0xDA6C && sh.Y_axis_ID == 0xDA6A)
{
sh.Category = "Detected maps";
sh.X_axis_correction = 0.1;
sh.X_axis_offset = -273.1;
sh.XaxisUnits = "°C";
sh.Subcategory = "Limiters";
sh.Varname = "Boost correction by temperature [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
sh.X_axis_descr = "IAT (celcius)";
sh.Y_axis_descr = "Requested boost";
sh.Z_axis_descr = "Boost limit (mbar)";
sh.YaxisUnits = "mbar";
}
}
}