Small bugfix and adapted naming

This commit is contained in:
dario 2024-05-22 11:04:54 +02:00
parent 6933decf26
commit 556a8c91a4
4 changed files with 11 additions and 5 deletions

View File

@ -78,6 +78,7 @@ namespace sta
return thread_ptr; return thread_ptr;
} }
#ifdef STA_TACOS_CAN_BUS_ENABLED
/** /**
* @brief Queue a message to be sent over the CAN bus. * @brief Queue a message to be sent over the CAN bus.
* *
@ -102,7 +103,7 @@ namespace sta
* @ingroup tacos_api * @ingroup tacos_api
*/ */
bool publishState(uint32_t from, uint32_t to, uint32_t lockout = 0); bool publishState(uint32_t from, uint32_t to, uint32_t lockout = 0);
#endif STA_TACOS_CAN_BUS_ENABLED
} // namespace tacos } // namespace tacos
} }

View File

@ -3,7 +3,7 @@
#include <sta/config.hpp> #include <sta/config.hpp>
#ifdef STA_CAN_BUS_ENABLE #ifdef STA_TACOS_CAN_BUS_ENABLED
#include <sta/rtos/queue.hpp> #include <sta/rtos/queue.hpp>
#include <sta/rtos/system/can_bus.hpp> #include <sta/rtos/system/can_bus.hpp>
@ -13,6 +13,9 @@
#include <sta/tacos/thread.hpp> #include <sta/tacos/thread.hpp>
#include <sta/tacos/statemachine.hpp> #include <sta/tacos/statemachine.hpp>
#ifndef STA_STM32_CAN_ENABLED
# error "CAN has to be enabled in the IOC first"
#endif // STA_STM32_CAN_ENABLED
/** /**
* @defgroup tacos_can_bus Can Bus Task * @defgroup tacos_can_bus Can Bus Task
@ -117,5 +120,5 @@ namespace sta
} /* namespace sta */ } /* namespace sta */
#endif /* STA_CAN_BUS_ENABLE */ #endif /* STA_TACOS_CAN_BUS_ENABLED */
#endif /* INCLUDE_TACOS_CAN_BUS_HPP_ */ #endif /* INCLUDE_TACOS_CAN_BUS_HPP_ */

View File

@ -1,5 +1,5 @@
#include <sta/config.hpp> #include <sta/config.hpp>
#ifdef STA_CAN_BUS_ENABLE #ifdef STA_TACOS_CAN_BUS_ENABLED
#include <sta/tacos/can_bus.hpp> #include <sta/tacos/can_bus.hpp>
#include <sta/debug/assert.hpp> #include <sta/debug/assert.hpp>
@ -161,4 +161,4 @@ namespace sta {
} // namespace tacos } // namespace tacos
} // namespace sta } // namespace sta
#endif // STA_CAN_BUS_ENABLE #endif // STA_TACOS_CAN_BUS_ENABLED

View File

@ -26,6 +26,7 @@ namespace sta
Statemachine::instance()->requestTimedStateTransition(from, to, millis, lockout); Statemachine::instance()->requestTimedStateTransition(from, to, millis, lockout);
} }
#ifdef STA_TACOS_CAN_BUS_ENABLED
bool queueCanBusMsg(CanSysMsg & msg, uint32_t timeout){ bool queueCanBusMsg(CanSysMsg & msg, uint32_t timeout){
return CanBus::instance()->queueCanBusMsg(msg, timeout); return CanBus::instance()->queueCanBusMsg(msg, timeout);
} }
@ -42,6 +43,7 @@ namespace sta
return CanBus::instance()->queueCanBusMsg(msg, lockout); return CanBus::instance()->queueCanBusMsg(msg, lockout);
} }
#endif // STA_TACOS_CAN_BUS_ENABLED
} // namespace tacos } // namespace tacos
} // namespace sta } // namespace sta