hardware-quality-management/issues/21 hack :(
only:hellen154hyundai
This commit is contained in:
parent
0b3cc98efb
commit
9028a832ab
|
@ -51,6 +51,14 @@ static void setupDefaultSensorInputs() {
|
|||
|
||||
static bool isFirstInvocation = true;
|
||||
|
||||
int hackHellenBoardId(int detectedId) {
|
||||
if (detectedId == BOARD_ID_VAG121_D) {
|
||||
// wow something bad has happened to that batch of boards?!
|
||||
return BOARD_ID_154HYUNDAI_C;
|
||||
}
|
||||
return detectedId;
|
||||
}
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellenVbatt();
|
||||
|
||||
|
@ -65,6 +73,7 @@ void setBoardConfigOverrides() {
|
|||
engineConfiguration->camInputs[1] = Gpio::H144_IN_D_AUX4;
|
||||
|
||||
int16_t hellenBoardId = engine->engineState.hellenBoardId;
|
||||
|
||||
if (hellenBoardId == -1) {
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::H144_IN_CRANK;
|
||||
engineConfiguration->camInputs[0] = Gpio::H144_IN_CAM;
|
||||
|
|
|
@ -80,5 +80,5 @@ void configureHellenCanTerminator() {
|
|||
}
|
||||
|
||||
void detectHellenBoardType() {
|
||||
engine->engineState.hellenBoardId = detectHellenBoardId();
|
||||
engine->engineState.hellenBoardId = hackHellenBoardId(detectHellenBoardId());
|
||||
}
|
||||
|
|
|
@ -1091,6 +1091,8 @@ void commonFrankensoAnalogInputs() {
|
|||
BOARD_WEAK void setBoardDefaultConfiguration() { }
|
||||
BOARD_WEAK void setBoardConfigOverrides() { }
|
||||
|
||||
BOARD_WEAK int hackHellenBoardId(int detectedId) { return detectedId; }
|
||||
|
||||
BOARD_WEAK void onBoardStandBy() { }
|
||||
|
||||
BOARD_WEAK int getBoardMetaOutputsCount() { return 0; }
|
||||
|
|
|
@ -74,6 +74,8 @@ Gpio getCommsLedPin();
|
|||
Gpio getWarningLedPin();
|
||||
Gpio getRunningLedPin();
|
||||
|
||||
int hackHellenBoardId(int detectedId);
|
||||
|
||||
#if !EFI_UNIT_TEST
|
||||
extern persistent_config_container_s persistentState;
|
||||
static engine_configuration_s * const engineConfiguration =
|
||||
|
|
Loading…
Reference in New Issue