smarter board ID handling

This commit is contained in:
Andrey 2023-09-16 00:16:26 -04:00
parent a3fbd86079
commit 3008f7bc9f
4 changed files with 4 additions and 21 deletions

View File

@ -92,7 +92,7 @@ void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration
static bool isMegaModuleRevision() {
int16_t hellenBoardId = engine->engineState.hellenBoardId;
return hellenBoardId != BOARD_ID_2chan_b && hellenBoardId != BOARD_ID_2chan_c && hellenBoardId != BOARD_ID_2chan_d;
return hellenBoardId != BOARD_ID_ALPHA2CH_B && hellenBoardId != BOARD_ID_ALPHA2CH_C && hellenBoardId != BOARD_ID_ALPHA2CH_D;
}
void setBoardConfigOverrides() {

View File

@ -101,7 +101,7 @@ static void setupDefaultSensorInputs() {
static bool is_F_OrOlder() {
int16_t hellenBoardId = engine->engineState.hellenBoardId;
return hellenBoardId == BOARD_ID_4chan_d || hellenBoardId == BOARD_ID_4chan_e || hellenBoardId == BOARD_ID_4chan_f;
return hellenBoardId == BOARD_ID_ALPHA4CH_D || hellenBoardId == BOARD_ID_ALPHA4CH_E || hellenBoardId == BOARD_ID_ALPHA4CH_F;
}
void boardInitHardware() {

View File

@ -104,7 +104,7 @@ void setBoardConfigOverrides() {
efiSetPadMode("ETB FIX2", Gpio::H144_OUT_IO13, PAL_MODE_INPUT_ANALOG);
}
engineConfiguration->stepperDcInvertedPins = false;
} else if (hellenBoardId == BOARD_ID_154hyundai_c || hellenBoardId == BOARD_ID_154hyundai_d) {
} else if (hellenBoardId == BOARD_ID_154HYUNDAI_C || hellenBoardId == BOARD_ID_154HYUNDAI_D) {
engineConfiguration->triggerInputPins[0] = Gpio::H144_IN_SENS2;
engineConfiguration->camInputs[0] = Gpio::H144_IN_SENS3;

View File

@ -7,24 +7,7 @@
#pragma once
#include "hellen_mm100_meta.h"
// see https://github.com/andreika-git/hellen-one/blob/master/board_id/board_ids.csv
#define BOARD_ID_154hyundai_c 10
#define BOARD_ID_154hyundai_d 201
#define BOARD_ID_2chan_b 3
#define BOARD_ID_2chan_c 5
#define BOARD_ID_2chan_d 107
// mega-module starts here
#define BOARD_ID_2chan_e 112
#define BOARD_ID_2chan_f 115
#define BOARD_ID_2chan_g 210
#define BOARD_ID_4chan_d 103
#define BOARD_ID_4chan_e 105
#define BOARD_ID_4chan_f 113
#define BOARD_ID_4chan_g 203
#define BOARD_ID_4chan_h 114
#include "../../board_id/boards_id.h"
void hellenWbo();