diff --git a/App/Inc/sta/config.hpp b/App/Inc/sta/config.hpp index 06a096a..bd3f7e0 100644 --- a/App/Inc/sta/config.hpp +++ b/App/Inc/sta/config.hpp @@ -29,14 +29,10 @@ #define STA_RTOS_SYSTEM_EVENTS_ENABLE // #define STA_RTOS_SYSTEM_WATCHDOG_ENABLE // #define STA_RTOS_WATCHDOG_ENABLE +//#define STA_CAN_BUS_ENABLE - -// Settings for TACOS -#define STA_TACOS_MANAGER_PRIORITY osPriorityNormal -#define STA_TACOS_STATEMACHINE_PRIORITY osPriorityNormal - -// Statemachine settings. Here, we only have a single state which is also the initial state. +// Uses the default configuration for TACOS. +#include #define STA_TACOS_NUM_STATES 3 -#define STA_TACOS_INITIAL_STATE 0 #endif /* INC_STA_CONFIG_HPP_ */ diff --git a/App/Src/tasks/can_task.cpp b/App/Src/tasks/can_task.cpp index 9f8e2ee..4ffd940 100644 --- a/App/Src/tasks/can_task.cpp +++ b/App/Src/tasks/can_task.cpp @@ -8,9 +8,12 @@ #include #include #include +#include #include +#include + namespace demo { CanTask::CanTask(const char* name, CAN_HandleTypeDef * handle) @@ -36,9 +39,12 @@ namespace demo void CanTask::func() { - //STA_DEBUG_HEAP_STATS(); + //struct CanDataMsg myCanDataMsg = { + ///*.header = */ txHeader.id.sid, txHeader.id.eid, (uint8_t)txHeader.id.format, txHeader.payloadLength , + ///*.payload = */ *payload // Initialize payload to zero (or any other values as needed) + //}; canController.sendFrame(txHeader, payload); - //STA_DEBUG_HEAP_STATS(); + //STA_DEBUG_PRINTLN(sta::tacos::CanBus::instance()->queueCanBusMsg(myCanDataMsg, osWaitForever)); STA_DEBUG_PRINTLN("SENT FRAME"); HAL_Delay(1000); } diff --git a/CAN-Demo Debug.launch b/CAN-Demo Debug.launch index 957bae9..9dae82a 100644 --- a/CAN-Demo Debug.launch +++ b/CAN-Demo Debug.launch @@ -30,7 +30,7 @@ - + diff --git a/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c b/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c index 9977a70..60543e3 100644 --- a/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c +++ b/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c @@ -386,8 +386,7 @@ HAL_TickFreqTypeDef HAL_GetTickFreq(void) * @param Delay specifies the delay time length, in milliseconds. * @retval None */ -__weak void HAL_Delay(uint32_t Delay) -{ +__weak void HAL_Delay(uint32_t Delay){ uint32_t tickstart = HAL_GetTick(); uint32_t wait = Delay; diff --git a/Libs/TACOS b/Libs/TACOS index bfba172..16b2ed5 160000 --- a/Libs/TACOS +++ b/Libs/TACOS @@ -1 +1 @@ -Subproject commit bfba17245ff5a4f2c5e2f7e08a8dc719676ae32a +Subproject commit 16b2ed5a20df1c04b9bbcf5e12101d5e822e45d2 diff --git a/Libs/rtos2-utils b/Libs/rtos2-utils index 16f3385..1925a16 160000 --- a/Libs/rtos2-utils +++ b/Libs/rtos2-utils @@ -1 +1 @@ -Subproject commit 16f33857f7f32f1b7b71959e5a322728a88a53ce +Subproject commit 1925a1668e847e048423499f523f3293ea9d923a