mirror of https://github.com/rusefi/rusefi-1.git
extracting common hellen to it's own file
This commit is contained in:
parent
a5afce0f3e
commit
212687dd10
|
@ -15,10 +15,6 @@
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
static void hellenWbo() {
|
|
||||||
engineConfiguration->enableAemXSeries = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = H144_LS_2;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# Combine the related files for a specific platform and MCU.
|
# Combine the related files for a specific platform and MCU.
|
||||||
|
|
||||||
# Target ECU board design
|
# Target ECU board design
|
||||||
BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen121vag/board_configuration.cpp
|
BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen121vag/board_configuration.cpp \
|
||||||
|
$(BOARDS_DIR)/hellen/hellen_common.cpp
|
||||||
BOARDINC = $(BOARDS_DIR)/hellen/hellen121vag
|
BOARDINC = $(BOARDS_DIR)/hellen/hellen121vag
|
||||||
|
|
||||||
# Set this if you want a default engine type other than normal hellen121vag
|
# Set this if you want a default engine type other than normal hellen121vag
|
||||||
|
|
|
@ -16,10 +16,6 @@
|
||||||
#include "electronic_throttle_impl.h"
|
#include "electronic_throttle_impl.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
static void hellenWbo() {
|
|
||||||
engineConfiguration->enableAemXSeries = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = GPIOG_7; // 96 - INJ_1
|
engineConfiguration->injectionPins[0] = GPIOG_7; // 96 - INJ_1
|
||||||
engineConfiguration->injectionPins[1] = GPIOG_8;
|
engineConfiguration->injectionPins[1] = GPIOG_8;
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
# Combine the related files for a specific platform and MCU.
|
# Combine the related files for a specific platform and MCU.
|
||||||
|
|
||||||
# Target ECU board design
|
# Target ECU board design
|
||||||
BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen128/board_configuration.cpp
|
BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen128/board_configuration.cpp \
|
||||||
|
$(BOARDS_DIR)/hellen/hellen_common.cpp
|
||||||
|
|
||||||
BOARDINC = $(BOARDS_DIR)/hellen/hellen128
|
BOARDINC = $(BOARDS_DIR)/hellen/hellen128
|
||||||
|
|
||||||
# Set this if you want a default engine type other than normal hellen128
|
# Set this if you want a default engine type other than normal hellen128
|
||||||
|
|
|
@ -15,10 +15,6 @@
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
static void hellenWbo() {
|
|
||||||
engineConfiguration->enableAemXSeries = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H176_LS_1;
|
engineConfiguration->injectionPins[0] = H176_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H176_LS_2;
|
engineConfiguration->injectionPins[1] = H176_LS_2;
|
||||||
|
@ -182,7 +178,7 @@ void setBoardDefaultConfiguration(void) {
|
||||||
engineConfiguration->throttlePedalSecondaryUpVoltage = 1.34;
|
engineConfiguration->throttlePedalSecondaryUpVoltage = 1.34;
|
||||||
engineConfiguration->throttlePedalSecondaryWOTVoltage = 4.24;
|
engineConfiguration->throttlePedalSecondaryWOTVoltage = 4.24;
|
||||||
|
|
||||||
|
setHellenDefaultVrThresholds();
|
||||||
hellenWbo();
|
hellenWbo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
# Combine the related files for a specific platform and MCU.
|
# Combine the related files for a specific platform and MCU.
|
||||||
|
|
||||||
# Target ECU board design
|
# Target ECU board design
|
||||||
BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen72/board_configuration.cpp
|
BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen72/board_configuration.cpp \
|
||||||
|
$(BOARDS_DIR)/hellen/hellen_common.cpp
|
||||||
|
|
||||||
BOARDINC = $(BOARDS_DIR)/hellen/hellen72
|
BOARDINC = $(BOARDS_DIR)/hellen/hellen72
|
||||||
|
|
||||||
# Set this if you want a default engine type other than normal Hellen72
|
# Set this if you want a default engine type other than normal Hellen72
|
||||||
|
|
|
@ -14,10 +14,6 @@
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
|
|
||||||
static void hellenWbo() {
|
|
||||||
engineConfiguration->enableAemXSeries = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = GPIOG_7;
|
engineConfiguration->injectionPins[0] = GPIOG_7;
|
||||||
engineConfiguration->injectionPins[1] = GPIOG_8;
|
engineConfiguration->injectionPins[1] = GPIOG_8;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# Combine the related files for a specific platform and MCU.
|
# Combine the related files for a specific platform and MCU.
|
||||||
|
|
||||||
# Target ECU board design
|
# Target ECU board design
|
||||||
BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen88bmw/board_configuration.cpp
|
BOARDCPPSRC = $(BOARDS_DIR)/hellen/hellen88bmw/board_configuration.cpp \
|
||||||
|
$(BOARDS_DIR)/hellen/hellen_common.cpp
|
||||||
BOARDINC = $(BOARDS_DIR)/hellen/hellen88bmw
|
BOARDINC = $(BOARDS_DIR)/hellen/hellen88bmw
|
||||||
|
|
||||||
# Set this if you want a default engine type other than normal hellen88bmw
|
# Set this if you want a default engine type other than normal hellen88bmw
|
||||||
|
|
|
@ -15,10 +15,6 @@
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
static void hellenWbo() {
|
|
||||||
engineConfiguration->enableAemXSeries = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = H144_LS_2;
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#include "pch.h"
|
||||||
|
|
||||||
|
void hellenWbo() {
|
||||||
|
engineConfiguration->enableAemXSeries = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setHellenDefaultVrThresholds() {
|
||||||
|
for (int i = 0;i<VR_THRESHOLD_COUNT;i++) {
|
||||||
|
setLinearCurve(engineConfiguration->vrThreshold[i].rpmBins, 600, 7000, 100);
|
||||||
|
setLinearCurve(engineConfiguration->vrThreshold[i].values, 0.6, 1.2, 0.1);
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,6 +7,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
void hellenWbo();
|
||||||
|
void setHellenDefaultVrThresholds();
|
||||||
|
|
||||||
#define H144_LS_1 GPIOG_7
|
#define H144_LS_1 GPIOG_7
|
||||||
#define H144_LS_2 GPIOG_8
|
#define H144_LS_2 GPIOG_8
|
||||||
#define H144_LS_3 GPIOD_11
|
#define H144_LS_3 GPIOD_11
|
||||||
|
|
|
@ -720,19 +720,6 @@ void setBoschHDEV_5_injectors() {
|
||||||
engineConfiguration->mc33_hpfp_max_hold = 10; // this value in ms not us
|
engineConfiguration->mc33_hpfp_max_hold = 10; // this value in ms not us
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* set engine_type 108
|
|
||||||
*/
|
|
||||||
void setVrThresholdTest() {
|
|
||||||
engineConfiguration->trigger.type = TT_HONDA_1_24;
|
|
||||||
|
|
||||||
setHellenDefaultVrThresholds();
|
|
||||||
engineConfiguration->vrThreshold[0].pin = GPIOB_4;
|
|
||||||
|
|
||||||
engineConfiguration->triggerInputPins[0] = GPIOA_5;
|
|
||||||
engineConfiguration->triggerInputPins[1] = GPIOC_6;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set engine_type 107
|
* set engine_type 107
|
||||||
*/
|
*/
|
||||||
|
@ -802,19 +789,6 @@ void setTest33816EngineConfiguration() {
|
||||||
setBoschHDEV_5_injectors();
|
setBoschHDEV_5_injectors();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setHellen72etb() {
|
|
||||||
engineConfiguration->etbIo[0].directionPin1 = GPIOC_6;
|
|
||||||
engineConfiguration->etbIo[0].directionPin2 = GPIOC_7;
|
|
||||||
engineConfiguration->etb_use_two_wires = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setHellenDefaultVrThresholds() {
|
|
||||||
for (int i = 0;i<VR_THRESHOLD_COUNT;i++) {
|
|
||||||
setLinearCurve(engineConfiguration->vrThreshold[i].rpmBins, 600, 7000, 100);
|
|
||||||
setLinearCurve(engineConfiguration->vrThreshold[i].values, 0.6, 1.2, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set engine_type 6
|
* set engine_type 6
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
void setHellenDefaultVrThresholds();
|
|
||||||
void setFrankensoConfiguration();
|
void setFrankensoConfiguration();
|
||||||
void setFrankenso_01_LCD(engine_configuration_s *engineConfiguration);
|
void setFrankenso_01_LCD(engine_configuration_s *engineConfiguration);
|
||||||
void disableLCD(engine_configuration_s *engineConfiguration);
|
void disableLCD(engine_configuration_s *engineConfiguration);
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
#endif // HW_HELLEN
|
#endif // HW_HELLEN
|
||||||
|
|
||||||
static void common() {
|
static void common() {
|
||||||
setHellenDefaultVrThresholds();
|
|
||||||
engineConfiguration->vrThreshold[0].pin = GPIOD_14;
|
engineConfiguration->vrThreshold[0].pin = GPIOD_14;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -847,8 +847,8 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
|
||||||
*/
|
*/
|
||||||
switch (engineType) {
|
switch (engineType) {
|
||||||
case UNUSED60:
|
case UNUSED60:
|
||||||
// todo: is it time to replace MICRO_RUS_EFI, PROTEUS, PROMETHEUS_DEFAULTS with MINIMAL_PINS? maybe rename MINIMAL_PINS to DEFAULT?
|
|
||||||
case UNUSED61:
|
case UNUSED61:
|
||||||
|
case HELLEN72_ETB:
|
||||||
case UNUSED100:
|
case UNUSED100:
|
||||||
case MINIMAL_PINS:
|
case MINIMAL_PINS:
|
||||||
// all basic settings are already set in prepareVoidConfiguration(), no need to set anything here
|
// all basic settings are already set in prepareVoidConfiguration(), no need to set anything here
|
||||||
|
@ -968,9 +968,6 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
|
||||||
case HELLEN_NA8_96:
|
case HELLEN_NA8_96:
|
||||||
setHellenNB1();
|
setHellenNB1();
|
||||||
break;
|
break;
|
||||||
case HELLEN72_ETB:
|
|
||||||
setHellen72etb();
|
|
||||||
break;
|
|
||||||
case HELLEN_121_NISSAN_4_CYL:
|
case HELLEN_121_NISSAN_4_CYL:
|
||||||
setHellen121nissanQR();
|
setHellen121nissanQR();
|
||||||
break;
|
break;
|
||||||
|
@ -1118,8 +1115,6 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e
|
||||||
setTest33816EngineConfiguration();
|
setTest33816EngineConfiguration();
|
||||||
break;
|
break;
|
||||||
case TEST_108:
|
case TEST_108:
|
||||||
setVrThresholdTest();
|
|
||||||
break;
|
|
||||||
case TEST_109:
|
case TEST_109:
|
||||||
case TEST_110:
|
case TEST_110:
|
||||||
case TEST_ROTARY:
|
case TEST_ROTARY:
|
||||||
|
|
Loading…
Reference in New Issue