File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
stm32-modules/flex-stacker Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -224,9 +224,9 @@ bool system_hardware_read_door_closed(void) {
224224}
225225
226226bool system_hardware_read_install_detected (void ) {
227- #if flex - stacker_BOARD_REVISION != 'b '
227+ #if PRIMARY_REVISION == 'a '
228228 return false;
229- #elif
229+ #else
230230 return HAL_GPIO_ReadPin (INSTALL_DETECTION_PORT , INSTALL_DETECTION_PIN ) == GPIO_PIN_SET ;
231231#endif
232232}
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ endif()
3838
3939set (${TARGET_MODULE_NAME} _VERSION "${VERSION} " CACHE STRING "${TARGET_MODULE_NAME} fw version" FORCE)
4040set (${TARGET_MODULE_NAME} _BOARD_REVISION "${TARGET_MODULE_NAME} -${STACKER_REVISION} " CACHE STRING "${TARGET_MODULE_NAME} board revision" FORCE)
41+ string (SUBSTRING ${STACKER_REVISION} 0 1 PRIMARY_REVISION)
42+ string (SUBSTRING ${STACKER_REVISION} 1 1 SECONDARY_REVISION)
4143message (STATUS "Building ${TARGET_MODULE_NAME} version: ${${TARGET_MODULE_NAME} _VERSION} for board revision: ${${TARGET_MODULE_NAME} _BOARD_REVISION}" )
4244
4345configure_file (./version .cpp.in ./version .cpp)
@@ -73,6 +75,11 @@ set_target_properties(${TARGET_MODULE_NAME}-core
7375
7476target_link_libraries (${TARGET_MODULE_NAME} -core PUBLIC common-core)
7577
78+ target_compile_definitions (${TARGET_MODULE_NAME} -core PUBLIC
79+ PRIMARY_REVISION='${PRIMARY_REVISION} '
80+ SECONDARY_REVISION='${SECONDARY_REVISION} '
81+ )
82+
7683target_include_directories (${TARGET_MODULE_NAME} -core
7784 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /../../include /${TARGET_MODULE_NAME}
7885 PUBLIC ${CMAKE_CURRENT_BINARY_DIR} # need to add this to get the generated conversion header
You can’t perform that action at this time.
0 commit comments