custom-board-bundle-sample-.../firmware/config/engines/mercedes.cpp

34 lines
962 B
C++
Raw Normal View History

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"
static void common(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
setHellenDefaultVrThresholds(PASS_CONFIG_PARAMETER_SIGNATURE);
2021-09-18 19:12:22 -07:00
engineConfiguration->vrThreshold[0].pin = GPIOD_14;
2021-09-18 18:27:17 -07:00
}
void setHellenMercedes128_4_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
common(PASS_CONFIG_PARAMETER_SIGNATURE);
}
2021-09-17 20:37:57 -07:00
2021-09-17 21:17:52 -07:00
// is this M104 or M112 or both?
2021-09-17 20:37:57 -07:00
void setHellenMercedes128_6_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
2021-09-18 18:27:17 -07:00
common(PASS_CONFIG_PARAMETER_SIGNATURE);
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-09-17 20:37:57 -07:00
void setHellenMercedes128_8_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
2021-09-18 18:27:17 -07:00
common(PASS_CONFIG_PARAMETER_SIGNATURE);
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
}