mirror of https://github.com/rusefi/rusefi.git
Reducing code duplication
This commit is contained in:
parent
8f637b9f2c
commit
83b184077c
|
@ -75,7 +75,7 @@ void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration
|
|||
alphaCamPullDown.setValue(engineConfiguration->boardUseCamPullDown);
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
|
||||
static bool isMegaModuleRevision() {
|
||||
int16_t hellenBoardId = engine->engineState.hellenBoardId;
|
||||
|
|
|
@ -126,7 +126,7 @@ void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration
|
|||
alphaD5PullDown.setValue(engineConfiguration->boardUseD5PullDown);
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellenVbatt();
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
#include "hellen_meta.h"
|
||||
#include "defaults.h"
|
||||
|
||||
// mm176 matches mm144 in terms of LED pinout
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
static OutputPin alphaTachPullUp;
|
||||
static OutputPin alphaTempPullUp;
|
||||
static OutputPin alphaCrankPPullUp;
|
||||
|
@ -122,8 +125,6 @@ void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration
|
|||
//alphaD5PullDown.setValue(engineConfiguration->boardUseD5PullDown);
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellenVbatt();
|
||||
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
#include "hellen_meta.h"
|
||||
#include "defaults.h"
|
||||
|
||||
// mm176 matches mm144 in terms of LED pinout
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
static OutputPin alphaTachPullUp;
|
||||
static OutputPin alphaTempPullUp;
|
||||
static OutputPin alphaCrankPPullUp;
|
||||
|
@ -128,8 +131,6 @@ void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration
|
|||
//alphaD5PullDown.setValue(engineConfiguration->boardUseD5PullDown);
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellenVbatt();
|
||||
|
||||
|
|
|
@ -10,4 +10,5 @@ PRIMARY_COMMUNICATION_PORT_USART2=-DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::D6 -DEFI_CONS
|
|||
|
||||
DDEFS += -DHELLEN_BOARD_ID_PIN_1=Gpio::F0 -DHELLEN_BOARD_ID_PIN_2=Gpio::F1
|
||||
|
||||
BOARDCPPSRC += $(BOARDS_DIR)/hellen/hellen_leds_144.cpp
|
||||
include $(BOARDS_DIR)/hellen/hellen-common.mk
|
|
@ -60,7 +60,7 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellenVbatt();
|
||||
|
|
|
@ -45,7 +45,7 @@ void onBoardStandBy() {
|
|||
hellenBoardStandBy();
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellenMegaEnPin();
|
||||
|
|
|
@ -50,7 +50,7 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellenVbatt();
|
||||
|
|
|
@ -54,8 +54,6 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellenVbatt();
|
||||
setHellenSdCardSpi3();
|
||||
|
|
|
@ -47,7 +47,7 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
|
||||
static bool isFirstInvocation = true;
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellenVbatt();
|
||||
|
|
|
@ -50,7 +50,7 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellenVbatt();
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#include "pch.h"
|
||||
#include "hellen_meta.h"
|
||||
|
||||
Gpio getCommsLedPin() {
|
||||
return H144_LED3_BLUE;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
// original mcu176 (not mm-mcu176)
|
||||
Gpio getCommsLedPin() {
|
||||
return Gpio::H10; // blue
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue