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 == 450)
{
if (sh.X_axis_length == 15 && sh.Y_axis_length == 15)
{
if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID / 256 == 0xFC)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Start of injection (SOI)", sh.CodeBlock, newSymbols, false);
double tempRange = 0;// 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.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.Correction = 0.023437;
sh.Z_axis_descr = "Start position (degrees BTDC)";
}
}
}
//12x13 E0 DD = EGR
if (sh.Length == 312)
{
if (sh.X_axis_length == 13 && sh.Y_axis_length == 12)
{
if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID / 256 == 0xDD)
{
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 == 208)
{
if (sh.X_axis_length == 13 && sh.Y_axis_length == 8)
{
if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID / 256 == 0xC1)
{
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 == 182) // 7*13
{
if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID / 256 == 0xC1)
{
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 == 176)
{
if (sh.X_axis_length == 11 && sh.Y_axis_length == 8)
{
if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID / 256 == 0xC2)
{
int smCount = GetMapNameCountForCodeBlock("Smoke limiter", sh.CodeBlock, newSymbols, false);
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Smoke limiter [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
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.Length == 40)
{
if (sh.X_axis_length == 20 && sh.Y_axis_length == 1)
{
if (sh.X_axis_ID / 256 == 0xE0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
int lmCount = GetMapNameCountForCodeBlock("Torque limiter", sh.CodeBlock, newSymbols, false);
sh.Varname = "Torque limiter (" + lmCount.ToString() + ") [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Z_axis_descr = "Maximum IQ (mg)";
//sh.Y_axis_descr = "Atm. pressure (mbar)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.Correction = 0.01;
sh.YaxisUnits = "rpm";
}
}
}
}
}