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 == 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 = 1.221001;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Pump voltage (mV)";
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 == 0xDD && sh.Y_axis_ID / 256 == 0xC0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
sh.Varname = "N146 Pump voltage map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 1.221001;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Pump voltage (mV)";
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
}
}
if (sh.Length == 512)
{
if (sh.X_axis_length == 16 && sh.Y_axis_length == 16)
{
if (sh.X_axis_ID / 256 == 0xDD && sh.Y_axis_ID / 256 == 0xC0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
sh.Varname = "N146 Pump voltage map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 1.221001;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Pump voltage (mV)";
sh.X_axis_descr = "IQ (mg/stroke)";
sh.Y_axis_descr = "Engine speed (rpm)";
sh.YaxisUnits = "rpm";
sh.XaxisUnits = "mg/st";
}
}
}
if (sh.Length == 480)
{
if (sh.X_axis_length == 16 && sh.Y_axis_length == 15)
{
if (sh.X_axis_ID == 0xDD7C && sh.Y_axis_ID == 0xC064)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
sh.Varname = "N146 Pump voltage map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 1.221001;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Pump voltage (mV)";
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 == 0xDDDC && sh.Y_axis_ID == 0xC07C)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
sh.Varname = "N146 Pump voltage map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 1.221001;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Pump voltage (mV)";
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 == 0xDD52 && sh.Y_axis_ID == 0xC080)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
sh.Varname = "N146 Pump voltage map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 1.221001;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Pump voltage (mV)";
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 == 0xC2)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
sh.Varname = "N146 Pump voltage map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 1.221001;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Pump voltage (mV)";
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 == 0xEB && sh.Y_axis_ID / 256 == 0xC0) //<GS-20120913>
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
sh.Varname = "N146 Pump voltage map [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 1.221001;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Pump voltage (mV)";
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 == 0xDD && sh.Y_axis_ID == 0xC044) // <GS-20120913>
{
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 == 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 == 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);
//IAT, ECT or Fuel temp?
double tempRange = GetTemperatureSOIRange(sh.MapSelector, injDurCount - 1);
//Console.WriteLine("Temperature switch for SOI " + injDurCount.ToString() + " " + tempRange.ToString());
//sh.Varname = "Start of injection (SOI) " + 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.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 == 0xDD && sh.Y_axis_ID / 256 == 0xC0)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int pumpVCount = GetMapNameCountForCodeBlock("N146 Pump voltage map", sh.CodeBlock, newSymbols, false);
sh.Varname = "N146 Pump voltage map (" +pumpVCount.ToString() + ") [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 1.221001;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Pump voltage (mV)";
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 == 0xC2)
{
sh.Category = "Detected maps";
sh.Subcategory = "Fuel";
int pumpVCount = GetMapNameCountForCodeBlock("N146 Pump voltage map", sh.CodeBlock, newSymbols, false);
sh.Varname = "N146 Pump voltage map (" + pumpVCount.ToString() + ") [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
sh.Correction = 1.221001;
sh.X_axis_correction = 0.01;
sh.Z_axis_descr = "Pump voltage (mV)";
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 == 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";
int smokeCount = GetMapNameCountForCodeBlock("Smoke limiter", sh.CodeBlock, newSymbols, false);
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 == 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 [" + 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 == 0xDC64 && sh.Y_axis_ID == 0xDA2A)
{
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 == 0xDA)
{
// this is IQ by MAF limiter!
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
int smokeCount = GetMapNameCountForCodeBlock("Smoke limiter II", sh.CodeBlock, newSymbols, false);
sh.Varname = "Smoke limiter II [" + 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 == 0xDDDC && sh.Y_axis_ID == 0xDA52)
{
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 == 0xDD50 && sh.Y_axis_ID == 0xEA44) //<GS-20120913>
{
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 == 0xEBDA && sh.Y_axis_ID == 0xEA5A) //<GS-20120913>
{
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 == 0xDD7A && sh.Y_axis_ID == 0xD9B6)
{
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 == 0xDD7C && sh.Y_axis_ID == 0xD9B6)
{
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 & 0xFFF0) == 0xDD50 && sh.Y_axis_ID == 0xC01E) //<GS-20120913>
{
//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 if (sh.X_axis_ID == 0xDD50 && sh.Y_axis_ID == 0xC024) //<GS-20120913>
{
//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 if (sh.X_axis_ID == 0xEBDA && sh.Y_axis_ID == 0xC048) //<GS-20120913>
{
//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 if (sh.X_axis_ID == 0xDD7C && sh.Y_axis_ID == 0xD904)
{
//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 if (sh.X_axis_ID == 0xDC64 && sh.Y_axis_ID == 0xD908)
{
//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 if (sh.X_axis_ID == 0xDD7A && sh.Y_axis_ID == 0xD904)
{
//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 if (sh.X_axis_ID == 0xDDDC && sh.Y_axis_ID == 0xD908)
{
//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 if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID == 0xDE00)
{
// 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 if (sh.X_axis_ID == 0xE08A && sh.Y_axis_ID == 0xDD30)
{
// 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 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)";
}
else if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID / 256 == 0xDD)
{
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)";
}
else if (sh.X_axis_ID / 256 == 0xDD && sh.Y_axis_ID / 256 == 0xDC)
{
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 == 392)
{
if (sh.X_axis_length == 14 && sh.Y_axis_length == 14)
{
if (sh.X_axis_ID / 256 == 0xDC && sh.Y_axis_ID / 256 == 0xC0)
{
//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";
}
}
}
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";
}
}
else 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";
}
}
else if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID / 256 == 0xC2)
{
// 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";
}
}
else if (sh.X_axis_ID == 0xEBDA && sh.Y_axis_ID == 0xC04A) //<GS-20120913>
{
// 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";
}
}
else 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 smokeCount = GetMapNameCountForCodeBlock("Smoke limiter", sh.CodeBlock, newSymbols, false);
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
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 == 0xDD && sh.Y_axis_ID / 256 == 0xDA)
{
// smoke limiter
if (sh.X_axis_length == 16 && sh.Y_axis_length == 12)
{
int smokeCount = GetMapNameCountForCodeBlock("Smoke limiter", sh.CodeBlock, newSymbols, false);
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
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 == 0xDC && sh.Y_axis_ID / 256 == 0xD9)
{
//EGR
if (sh.X_axis_length == 16 && sh.Y_axis_length == 12)
{
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 == 0xDD && sh.Y_axis_ID / 256 == 0xD9)
{
//EGR
if (sh.X_axis_length == 16 && sh.Y_axis_length == 12)
{
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";
}
}
}
if (sh.Length == 364)
{
if (sh.X_axis_length == 14 && sh.Y_axis_length == 13)
{
if (sh.X_axis_ID / 256 == 0xDC && sh.Y_axis_ID / 256 == 0xC0)
{
//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";
}
if (sh.X_axis_ID / 256 == 0xDC && sh.Y_axis_ID / 256 == 0xD9)
{
//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";
}
}
}
if (sh.Length == 338)
{
if (sh.X_axis_length == 13 && sh.Y_axis_length == 13)
{
if (sh.X_axis_ID / 256 == 0xDC && sh.Y_axis_ID / 256 == 0xD9)
{
//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";
}
}
}
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 & 0xFFF0) == 0xC030)
{
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";
}
else if (sh.X_axis_ID == 0xEBDA && sh.Y_axis_ID == 0xC03A) //<GS-20120913>
{
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 == 0xDD && sh.Y_axis_ID / 256 == 0xDA)
{
// SMOKE
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
int smokeCount = GetMapNameCountForCodeBlock("Smoke limiter", sh.CodeBlock, newSymbols, false);
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 == 0xE0 && sh.Y_axis_ID / 256 == 0xDC) //<GS-20120913>
{
// SMOKE
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
int smokeCount = GetMapNameCountForCodeBlock("Smoke limiter", sh.CodeBlock, newSymbols, false);
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 == 0xEBDA && sh.Y_axis_ID == 0xDA70) //<GS-20120913>
{
// SMOKE
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
int smokeCount = GetMapNameCountForCodeBlock("Smoke limiter", sh.CodeBlock, newSymbols, false);
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 == 0xDA && sh.Y_axis_ID / 256 == 0xDA)
{
sh.Category = "Detected maps";
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.X_axis_correction = 0.1;
sh.X_axis_offset = -273.1;
sh.Y_axis_descr = "Requested boost";
sh.Z_axis_descr = "Boost limit (mbar)";
sh.YaxisUnits = "mbar";
sh.XaxisUnits = "degC";
}
}
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 %";
}
if (sh.X_axis_ID / 256 == 0xEB && 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 == 288)
{
if (sh.X_axis_length == 16 && 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 == 208)
{
if (sh.X_axis_length == 13 && sh.Y_axis_length == 8)
{
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 == 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 & 0xFFF0) == 0xC2B0 && sh.Y_axis_ID == 0xE08A) //<GS-20120913>
{
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 == 0xC034 && sh.Y_axis_ID == 0xEBDA) //<GS-20120913>
{
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 %";
}
if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID / 256 == 0xC2) //<GS-20120913>
{
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 %";
}
if (sh.X_axis_ID == 0xEBDA && sh.Y_axis_ID / 256 == 0xC0) //<GS-20120913>
{
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.X_axis_ID / 256 == 0xDD && sh.Y_axis_ID / 256 == 0xC3)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "SOI limiter (temperature) [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
//sh.Correction = -0.023437;
//sh.Offset = 78;
sh.Correction = 0.023437;
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.X_axis_ID / 256 == 0xDC && sh.Y_axis_ID / 256 == 0xC5)
{
sh.Category = "Detected maps";
sh.Subcategory = "Limiters";
sh.Varname = "SOI limiter (temperature) [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
//sh.Correction = -0.023437;
//sh.Offset = 78;
sh.Correction = 0.023437;
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 == 162)
{
if (sh.X_axis_length == 9 && sh.Y_axis_length == 9)
{
if (sh.X_axis_ID / 256 == 0xDD && sh.Y_axis_ID / 256 == 0xC1)
{
// Start IQ
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";
}
if (sh.X_axis_ID == 0xEBDA && sh.Y_axis_ID / 256 == 0xC1) //<GS-20120913>
{
// Start IQ
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 == 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 == 144)
{
if (sh.X_axis_ID / 256 == 0xDC && sh.Y_axis_ID / 256 == 0xC1)
{
// Start IQ
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 == 138)
{
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 == 128)
{
if (sh.X_axis_ID / 256 == 0xDD && sh.Y_axis_ID == 0xC1A0)
{
// 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";
}
}
if (sh.X_axis_ID / 256 == 0xDC && 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";
}
}
if (sh.X_axis_ID / 256 == 0xE0 && sh.Y_axis_ID == 0xC002)
{
// 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";
}
}
if ((sh.X_axis_ID & 0xFFF0) == 0xDD70 && sh.Y_axis_ID == 0xC134)
{
// 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";
}
}
if (sh.X_axis_ID == 0xEBDA && sh.Y_axis_ID == 0xC1AA)
{
// 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";
}
}
if (sh.X_axis_ID / 256 == 0xDD && sh.Y_axis_ID == 0xC1A4)
{
// check for valid axis data on temp data
if (IsValidTemperatureAxis(allBytes, sh, MapViewerEx.AxisIdent.Y_Axis))
{
// Start IQ
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 == 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 == 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";
}
}
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 == 38)
{
if (sh.X_axis_length == 19 && sh.Y_axis_length == 1)
{
if (sh.X_axis_ID == 0xe08a)
{
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 == 26)
{
if (sh.X_axis_ID == 0xD904)
{
if (sh.X_axis_length == 13 && 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 == 4)
{
if (sh.X_axis_length == 2 && sh.Y_axis_length == 1)
{
//if (sh.X_axis_ID >= 0xEBA0 && sh.X_axis_ID <= 0xEBAF)
if (sh.X_axis_ID == 0xDCD4)
{
sh.Category = "Detected maps";
sh.Subcategory = "Misc";
sh.Varname = "MAP linearization [" + DetermineNumberByFlashBank(sh.Flash_start_address, newCodeBlocks) + "]";
}
if (sh.X_axis_ID == 0xDD28)
{
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";
}
}
}
}
}
}