2021-09-17 20:37:57 -07:00
|
|
|
/*
|
|
|
|
* @file mercedes.cpp
|
|
|
|
*
|
|
|
|
* @date: Sep 17, 2021
|
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2021
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "pch.h"
|
2021-09-18 18:27:17 -07:00
|
|
|
#include "custom_engine.h"
|
2021-12-30 14:41:45 -08:00
|
|
|
#if HW_HELLEN
|
2021-12-30 16:14:32 -08:00
|
|
|
#include "hellen_meta.h"
|
2021-12-30 14:41:45 -08:00
|
|
|
#endif // HW_HELLEN
|
2021-09-18 18:27:17 -07:00
|
|
|
|
2021-11-16 01:15:29 -08:00
|
|
|
static void common() {
|
2022-01-14 20:10:48 -08:00
|
|
|
|
2021-09-18 18:27:17 -07:00
|
|
|
}
|
|
|
|
|
2021-11-16 01:15:29 -08:00
|
|
|
void setHellenMercedes128_4_cyl() {
|
|
|
|
common();
|
2021-12-30 14:41:45 -08:00
|
|
|
#if HW_HELLEN
|
2021-12-30 14:15:31 -08:00
|
|
|
engineConfiguration->injectionPins[0] = H144_LS_7;
|
|
|
|
engineConfiguration->injectionPins[1] = H176_LS_6;
|
|
|
|
engineConfiguration->injectionPins[2] = H176_LS_8;
|
|
|
|
engineConfiguration->injectionPins[3] = H176_LS_5;
|
|
|
|
engineConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
|
|
|
engineConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
|
|
|
engineConfiguration->injectionPins[6] = GPIO_UNASSIGNED;
|
|
|
|
engineConfiguration->injectionPins[7] = GPIO_UNASSIGNED;
|
2021-12-30 14:41:45 -08:00
|
|
|
#endif // HW_HELLEN
|
2021-09-18 18:27:17 -07:00
|
|
|
}
|
2021-09-17 20:37:57 -07:00
|
|
|
|
2021-09-17 21:17:52 -07:00
|
|
|
// is this M104 or M112 or both?
|
2021-11-16 01:15:29 -08:00
|
|
|
void setHellenMercedes128_6_cyl() {
|
|
|
|
common();
|
2021-09-17 21:17:52 -07:00
|
|
|
engineConfiguration->specs.cylindersCount = 6;
|
|
|
|
// 1-4-2-5-3-6 M104
|
|
|
|
engineConfiguration->specs.firingOrder = FO_1_4_3_6_2_5; // M112
|
2021-09-17 20:37:57 -07:00
|
|
|
}
|
|
|
|
|
2021-09-17 21:17:52 -07:00
|
|
|
// M113
|
2021-11-16 01:15:29 -08:00
|
|
|
void setHellenMercedes128_8_cyl() {
|
|
|
|
common();
|
2021-09-17 21:17:52 -07:00
|
|
|
engineConfiguration->specs.cylindersCount = 8;
|
|
|
|
engineConfiguration->specs.firingOrder = FO_1_5_4_2_6_3_7_8;
|
2021-09-17 20:37:57 -07:00
|
|
|
}
|