Skip to content

Commit

Permalink
guards
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Jan 11, 2025
1 parent 826098c commit 4ecb874
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions firmware/hw_layer/drivers/can/can_msg_tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ CanTxMessage::~CanTxMessage() {
}
#endif /* EFI_CAN_SUPPORT */

#if HAL_USE_CAN || EFI_UNIT_TEST
#if HAL_USE_CAN
void CanTxMessage::setDlc(uint8_t dlc) {
m_frame.DLC = dlc;
}
Expand All @@ -109,6 +109,10 @@ uint8_t& CanTxMessage::operator[](size_t index) {
return m_frame.data8[index];
}

#endif // HAL_USE_CAN

#if EFI_UNIT_TEST

static ICanTransmitMock* mockCan;

CanTxMessage::~CanTxMessage() {
Expand All @@ -125,4 +129,4 @@ void setCanTxMockHandler(ICanTransmitMock* mock) {
mockCan = mock;
}

#endif // HAL_USE_CAN || EFI_UNIT_TEST
#endif // EFI_UNIT_TEST

0 comments on commit 4ecb874

Please sign in to comment.