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 == 544)
{
if (sh.X_axis_length == 16 && sh.Y_axis_length == 17)
{
if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID / 256 == 0xC2)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
sh.Varname = "N146 Pump voltage map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
//sh.Correction = 0.001221001; // ?1.221001
//Todo: N146 correction factor EDC15C
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Pump voltage (V)";
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 == 468)
{
if (sh.X_axis_length == 13 && sh.Y_axis_length == 18)
{
if (sh.X_axis_ID / 256 == 0xDC && sh.Y_axis_ID / 256 == 0xC0)
{
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.Length == 416)
{
if (sh.X_axis_length == 0x10 && sh.Y_axis_length == 0x0d)
{
if (sh.X_axis_ID / 256 == 0xF9 && sh.Y_axis_ID / 256 == 0xDB)
{
// this is IQ by MAF limiter!
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.X_axis_ID / 256 == 0xF9 && sh.Y_axis_ID / 256 == 0xDA)
{
// this is IQ by MAF limiter!
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.X_axis_ID / 256 == 0xDC && sh.Y_axis_ID / 256 == 0xDA)
{
// this is IQ by MAF limiter!
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "Smoke limiter II [" + 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.X_axis_ID / 256 == 0xDD && sh.Y_axis_ID / 256 == 0xDA)
{
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 == 0xE08A && sh.Y_axis_ID == 0xDDD8)
{
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 == 0xDC && 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 (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID / 256 == 0xDE)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Start of injection (N108 SOI)", sh.CodeBlock, newSymbols, false);
sh.Varname = "Start of injection (N108 SOI) " + injDurCount.ToString() + " [" + 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.Offset = 78;
sh.Z_axis_descr = "Start position (degrees BTDC)";
}
}
}
if (sh.Length == 384)
{
if (sh.X_axis_ID / 256 == 0xDD && sh.Y_axis_ID / 256 == 0xC0)
{
// inv driver wish
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";
}
}
if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID / 256 == 0xC1)
{
// inv driver wish
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";
}
}
if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID / 256 == 0xDC)
{
// smoke limiter
if (sh.X_axis_length == 16 && sh.Y_axis_length == 12)
{
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";
}
}
}
if (sh.Length == 320) // 16*10
{
if (sh.X_axis_ID / 256 == 0xDD && sh.Y_axis_ID / 256 == 0xC0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Turbo";
int tbCount = GetMapNameCountForCodeBlock("Boost target map", sh.CodeBlock, newSymbols, false);
sh.Varname = "Boost target map (" + tbCount.ToString() + ") [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";// " + sh.Flash_start_address.ToString("X8") + " " + sh.X_axis_ID.ToString("X4") + " " + sh.Y_axis_ID.ToString("X4");
//Console.WriteLine("***** " + sh.Varname + " " + sh.Flash_start_address.ToString("X8"));
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 == 0xDC && sh.Y_axis_ID == 0xC0BA)
{
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.X_axis_ID / 256 == 0xDC && sh.Y_axis_ID == 0xC036)
{
sh.Category = "Detected maps";
sh.Subcategory = "Turbo";
int tbCount = GetMapNameCountForCodeBlock("Boost target map", sh.CodeBlock, newSymbols, false);
sh.Varname = "Boost target map (" + tbCount.ToString() + ") [" + 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 == 0xE0 && sh.Y_axis_ID / 256 == 0xC3)
{
sh.Category = "Detected maps";
sh.Subcategory = "Turbo";
int tbCount = GetMapNameCountForCodeBlock("Boost target map", sh.CodeBlock, newSymbols, false);
sh.Varname = "Boost target map (" + tbCount.ToString() + ") [" + 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.Length == 312)
{
if (sh.X_axis_length == 13 && sh.Y_axis_length == 12)
{
if (sh.X_axis_ID / 256 == 0xDC && sh.Y_axis_ID / 256 == 0xD7)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int injDurCount = GetMapNameCountForCodeBlock("Start of injection (N108 SOI)", sh.CodeBlock, newSymbols, false);
sh.Varname = "Start of injection (N108 SOI) " + injDurCount.ToString() + " [" + 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.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.Length == 256) // 8*16
{
/*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 %";
}*/
if (sh.X_axis_ID / 256 == 0xDD && 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 == 200)
{
if (sh.X_axis_ID / 256 == 0xC0 && sh.Y_axis_ID / 256 == 0xDD)
{
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 == 0xDC)
{
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 == 0xC2BE && sh.Y_axis_ID == 0xE08A)
{
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.Length == 192) // 8*12
{
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 == 0xDC && 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 == 150)
{
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 == 114)
{
if (sh.X_axis_length == 3 && sh.Y_axis_length == 19)
{
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";
}
}
}
}