Skip to content

Commit

Permalink
add definition
Browse files Browse the repository at this point in the history
  • Loading branch information
meltingrabbit committed Apr 5, 2024
1 parent 8733505 commit fa22857
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ if(C2A_USE_STDINT_WRAPPER)
include_directories(library/stdint_wrapper)
endif()

if(C2A_MOBC_FEATURES)
message("Enable some features for MOBC")
target_compile_definitions(${PROJECT_NAME} PUBLIC C2A_MOBC_FEATURES)
endif()

execute_process(
COMMAND git log -1 --format=%H
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
Expand Down
6 changes: 3 additions & 3 deletions tlm_cmd/common_packet/space_packet/common_tlm_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ void CTP_set_on_board_subnet_time(CommonTlmPacket* packet)
{
// 何を設定するかはユーザー定義
// MOBC では主に TI を,sub OBC では主に 0xffffffff を
uint32_t time = 0xffffffff;
#ifdef C2A_MOBC_FEATURES
TSP_set_on_board_subnet_time(packet, (uint32_t)TMGR_get_master_total_cycle());
#else
TSP_set_on_board_subnet_time(packet, 0xffffffff);
time = (uint32_t)TMGR_get_master_total_cycle();
#endif
TSP_set_on_board_subnet_time(packet, time);
}

ctp_dest_flags_t CTP_get_dest_flags(const CommonTlmPacket* packet)
Expand Down

0 comments on commit fa22857

Please sign in to comment.