2023-08-18 15:41:17 -07:00
|
|
|
/*
|
|
|
|
* board_id.cpp
|
|
|
|
*
|
|
|
|
* @date Aug 18, 2023
|
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2021
|
|
|
|
* @author andreika <prometheus.pcb@gmail.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "pch.h"
|
|
|
|
#include "board_id.h"
|
|
|
|
#include "boards_dictionary.h"
|
|
|
|
|
|
|
|
|
|
|
|
board_id_t getBoardId() {
|
2023-10-03 14:03:30 -07:00
|
|
|
#if HW_PROTEUS
|
|
|
|
if (engineConfiguration->engineType == engine_type_e::MAVERICK_X3) {
|
|
|
|
// a way to test harness patch cord
|
|
|
|
return STATIC_BOARD_ID_PROTEUS_CANAM;
|
|
|
|
}
|
2023-12-24 22:29:42 -08:00
|
|
|
if (engineConfiguration->engineType == engine_type_e::HARLEY) {
|
2023-10-29 07:17:24 -07:00
|
|
|
// a way to test harness patch cord
|
|
|
|
return STATIC_BOARD_ID_PROTEUS_HARLEY;
|
|
|
|
}
|
2024-02-17 11:52:18 -08:00
|
|
|
if (engineConfiguration->engineType == engine_type_e::GM_SBC) {
|
2024-01-01 13:09:13 -08:00
|
|
|
// a way to test harness patch cord
|
|
|
|
return STATIC_BOARD_ID_PROTEUS_SBC;
|
|
|
|
}
|
2023-10-03 14:03:30 -07:00
|
|
|
#endif
|
|
|
|
|
2024-01-01 12:08:31 -08:00
|
|
|
#if HW_MICRO_RUSEFI
|
2024-03-07 03:39:50 -08:00
|
|
|
if (engineConfiguration->engineType == engine_type_e::MERCEDES_M111) {
|
2024-01-01 12:08:31 -08:00
|
|
|
return STATIC_BOARD_ID_MRE_M111;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2023-12-20 12:42:20 -08:00
|
|
|
#if defined(HW_HELLEN_SKIP_BOARD_TYPE)
|
|
|
|
return (board_id_t)STATIC_BOARD_ID;
|
|
|
|
#elif HW_HELLEN
|
2023-08-18 15:41:17 -07:00
|
|
|
return (board_id_t)engine->engineState.hellenBoardId;
|
|
|
|
#elif STATIC_BOARD_ID
|
2023-12-20 12:42:20 -08:00
|
|
|
// should STATIC_BOARD_ID simply have priority over hellen board id? what's the use-case of HW_HELLEN with STATIC_BOARD_ID?
|
2023-08-18 15:41:17 -07:00
|
|
|
return (board_id_t)STATIC_BOARD_ID;
|
|
|
|
#else
|
|
|
|
return 0;
|
|
|
|
#endif
|
|
|
|
}
|