From 4ecb874b8f7991c12ee907db36783e76cb6059f2 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Fri, 10 Jan 2025 21:51:16 -0800 Subject: [PATCH] guards --- firmware/hw_layer/drivers/can/can_msg_tx.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/firmware/hw_layer/drivers/can/can_msg_tx.cpp b/firmware/hw_layer/drivers/can/can_msg_tx.cpp index 7f64e59052..e5f7fe4fe5 100644 --- a/firmware/hw_layer/drivers/can/can_msg_tx.cpp +++ b/firmware/hw_layer/drivers/can/can_msg_tx.cpp @@ -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; } @@ -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() { @@ -125,4 +129,4 @@ void setCanTxMockHandler(ICanTransmitMock* mock) { mockCan = mock; } -#endif // HAL_USE_CAN || EFI_UNIT_TEST +#endif // EFI_UNIT_TEST