cleared dtcs from eeprom and dtc commands, and also fixed 004002 map.

This commit is contained in:
2026-04-20 16:21:49 +02:00
parent a4e19f02a4
commit 40bda00efa
4 changed files with 20 additions and 11 deletions

View File

@@ -17,8 +17,8 @@
//#define T06211
//#define _004006
//#define _004004
#define _004002
#define _004004
//#define _004002
//#define _504003
//#define _504009
//#define _504010

View File

@@ -48,13 +48,18 @@ static KL_FaultCode s_dtc_list[KL_DTC_TOTAL_RECORDS];
static size_t s_dtc_count = 0;
/* Default test DTCs */
static const KL_FaultCode s_default_dtcs[] = {
/*static const KL_FaultCode s_default_dtcs[] = {
{ 0x5B, 0x20, 0x55 },
{ 0x50, 0x20, 0x03 },
{ 0x56, 0x20, 0x56 },
{ 0x5E, 0x30, 0x60 },
};*/
static const KL_FaultCode s_default_dtcs[] = {
{ 0x00, 0xFF, 0xFF },
{ 0x00, 0xFF, 0xFF },
{ 0x00, 0xFF, 0xFF },
{ 0x00, 0xFF, 0xFF },
};
/* ================================================================
* Password / login bodies (from old kline.c)
* ================================================================ */

View File

@@ -77,19 +77,25 @@ static const RomStrEntry_t s_rom_str_table[] = {
* Stored as a flat array so any-length chunk reads reconstruct correctly.
* Byte values derived from protocol capture.
*/
/*static const uint8_t s_dtc_eeprom_block[64] = {
0x50, 0x20, 0xAB, 0x0A, 0x0E, 0x09, 0x01, 0xED, 0x5A, 0x20, 0xDF, 0x2D, 0x05,
0x00, 0x02, 0x33, 0x5B, 0x20, 0xDF, 0x2D, 0x05, 0x00, 0x03, 0x34, 0x52, 0x20,
0xDF, 0x2D, 0x00, 0x00, 0x04, 0x30, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
}*/
static const uint8_t s_dtc_eeprom_block[64] = {
/* 0x0000-0x000C (13 bytes, DTC MSG 1) */
0x50, 0x20, 0xAB, 0x0A, 0x0E, 0x09, 0x01, 0xED, 0x5A, 0x20, 0xDF, 0x2D, 0x05,
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
/* 0x000D-0x0019 (13 bytes, DTC MSG 2) */
0x00, 0x02, 0x33, 0x5B, 0x20, 0xDF, 0x2D, 0x05, 0x00, 0x03, 0x34, 0x52, 0x20,
0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF,
/* 0x001A-0x0026 (13 bytes, DTC MSG 3) */
0xDF, 0x2D, 0x00, 0x00, 0x04, 0x30, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
/* 0x0027-0x0033 (13 bytes, DTC MSG 4) */
0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF,
/* 0x0034-0x003F (12 bytes, DTC MSG 5) */
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};
/*
* DeltaPhi calibration array (0x009A-0x00BD, 36 bytes = 18 x int16 LE).
* 0x8000 entries are "not calibrated" placeholders.

View File

@@ -534,8 +534,6 @@ struct fuelMapIndexes fuelMapI = { //probar este mapa
#elif defined(_004002)
struct AlphaStruct fuelmap_m12 = { //probar este mapa
{
{ 5.367, 7.371, 7.453, 7.465, 7.512, 8.414, 10.570, 11.320, 11.625, 11.930, 13.383, 14.543}, //RPM = 99
{ 5.133, 7.242, 7.746, 7.898, 8.344, 9.059, 11.191, 11.836, 12.234, 12.621, 13.852, 14.414}, //RPM = 199
{ 5.332, 7.313, 7.395, 7.406, 7.465, 8.379, 10.535, 11.309, 11.602, 11.883, 13.336, 14.496}, //RPM = 99
{ 5.098, 7.219, 7.395, 7.559, 7.992, 9.023, 11.168, 11.754, 11.953, 12.164, 13.395, 14.379}, //RPM = 199
{ 4.125, 6.340, 6.656, 7.008, 7.992, 9.059, 10.898, 11.426, 11.930, 12.434, 13.957, 15.188}, //RPM = 425
@@ -620,7 +618,7 @@ struct AlphaStruct fuelmap_80 = { //probar este mapa
};
struct fuelMapIndexes fuelMapI = { //probar este mapa
{ 100, 200, 425, 500, 950, 1000, 1400, 1500, 2000, 2200}, //N_RPM = 17
{ 100, 200, 425, 500, 900, 1000, 1400, 1500, 2000, 2200}, //N_RPM = 17
{ 0.375, 0.500, 1.625, 2.500, 5.000, 10.000, 30.000, 35.000, 40.000, 45.000, 60.000, 72.000},
{ -15.5, -5.5 ,6.3, 27.5, 47.8, 75}
};