From bfba17245ff5a4f2c5e2f7e08a8dc719676ae32a Mon Sep 17 00:00:00 2001 From: "@CarlWachter" Date: Fri, 16 Feb 2024 14:48:21 +0100 Subject: [PATCH] +Define guards -redundant getter for can controller --- src/startup.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/startup.cpp b/src/startup.cpp index 46f8490..3531b63 100644 --- a/src/startup.cpp +++ b/src/startup.cpp @@ -138,11 +138,8 @@ namespace sta Watchdog::instance()->start(); } #endif // STA_TACOS_WATCHDOG_ENABLED - STA_WEAK - CanController * getCanController(){ - extern CAN_HandleTypeDef hcan1; - return new STM32CanController(&hcan1); - } + +#ifdef STA_CAN_BUS_ENABLE /** * @brief Function that is called before the Can Bus task is started. Override it to adjust * the Can bus to your specifications. @@ -159,7 +156,7 @@ namespace sta CanBus::instance(getCanController())->start(); } - +#endif //STA_CAN_BUS_ENABLE } // namespace tacos