Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request #51 from utra-robosoccer/Command_Task_Priority_Mod…
Browse files Browse the repository at this point in the history
…ification

Change CommandTask priority from osPriorityNormal to osPriorityBelowN…
  • Loading branch information
tygamvrelis authored Aug 5, 2018
2 parents a35433a + 6b39ce6 commit d11a7e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Robot/Robot.ioc
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ FREERTOS.IPParameters=Tasks01,FootprintOK,MEMORY_ALLOCATION,INCLUDE_vTaskDelayUn
FREERTOS.MEMORY_ALLOCATION=2
FREERTOS.Mutexes01=PCUART,Static,PCUARTControlBlock
FREERTOS.Queues01=UART1_req,16,UARTcmd_t,0,Static,UART1_reqBuffer,UART1_reqControlBlock;UART2_req,16,UARTcmd_t,0,Static,UART2_reqBuffer,UART2_reqControlBlock;UART3_req,16,UARTcmd_t,0,Static,UART3_reqBuffer,UART3_reqControlBlock;UART4_req,16,UARTcmd_t,0,Static,UART4_reqBuffer,UART4_reqControlBlock;UART6_req,16,UARTcmd_t,0,Static,UART6_reqBuffer,UART6_reqControlBlock;TXQueue,32,TXData_t,0,Static,TXQueueBuffer,TXQueueControlBlock
FREERTOS.Tasks01=defaultTask,-3,128,StartDefaultTask,Default,NULL,Static,defaultTaskBuffer,defaultTaskControlBlock;UART1Task,0,128,StartUART1Task,As external,NULL,Static,UART1TaskBuffer,UART1TaskControlBlock;UART2Task,0,128,StartUART2Task,As external,NULL,Static,UART2TaskBuffer,UART2TaskControlBlock;UART3Task,0,128,StartUART3Task,As external,NULL,Static,UART3TaskBuffer,UART3TaskControlBlock;UART4Task,0,128,StartUART4Task,As external,NULL,Static,UART4TaskBuffer,UART4TaskControlBlock;UART6Task,0,128,StartUART6Task,As external,NULL,Static,UART6TaskBuffer,UART6TaskControlBlock;IMUTask,0,128,StartIMUTask,As external,NULL,Static,IMUTaskBuffer,IMUTaskControlBlock;CommandTask,0,512,StartCommandTask,As external,NULL,Static,CommandTaskBuffer,CommandTaskControlBlock;RxTask,3,512,StartRxTask,As external,NULL,Static,RxTaskBuffer,RxTaskControlBlock;TxTask,2,512,StartTxTask,As external,NULL,Static,TxTaskBuffer,TxTaskControlBlock
FREERTOS.Tasks01=defaultTask,-3,128,StartDefaultTask,Default,NULL,Static,defaultTaskBuffer,defaultTaskControlBlock;UART1Task,0,128,StartUART1Task,As external,NULL,Static,UART1TaskBuffer,UART1TaskControlBlock;UART2Task,0,128,StartUART2Task,As external,NULL,Static,UART2TaskBuffer,UART2TaskControlBlock;UART3Task,0,128,StartUART3Task,As external,NULL,Static,UART3TaskBuffer,UART3TaskControlBlock;UART4Task,0,128,StartUART4Task,As external,NULL,Static,UART4TaskBuffer,UART4TaskControlBlock;UART6Task,0,128,StartUART6Task,As external,NULL,Static,UART6TaskBuffer,UART6TaskControlBlock;IMUTask,0,128,StartIMUTask,As external,NULL,Static,IMUTaskBuffer,IMUTaskControlBlock;CommandTask,-1,512,StartCommandTask,As external,NULL,Static,CommandTaskBuffer,CommandTaskControlBlock;RxTask,3,512,StartRxTask,As external,NULL,Static,RxTaskBuffer,RxTaskControlBlock;TxTask,2,512,StartTxTask,As external,NULL,Static,TxTaskBuffer,TxTaskControlBlock
File.Version=6
I2C1.I2C_Mode=I2C_Fast
I2C1.IPParameters=I2C_Mode
Expand Down
5 changes: 2 additions & 3 deletions Robot/Src/freertos.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include "task.h"
#include "cmsis_os.h"

/* USER CODE BEGIN Includes */
/* USER CODE BEGIN Includes */
/**
* @file freertos.c
* @brief Code for freertos application
Expand Down Expand Up @@ -238,7 +238,7 @@ void MX_FREERTOS_Init(void) {
IMUTaskHandle = osThreadCreate(osThread(IMUTask), NULL);

/* definition and creation of CommandTask */
osThreadStaticDef(CommandTask, StartCommandTask, osPriorityNormal, 0, 512, CommandTaskBuffer, &CommandTaskControlBlock);
osThreadStaticDef(CommandTask, StartCommandTask, osPriorityBelowNormal, 0, 512, CommandTaskBuffer, &CommandTaskControlBlock);
CommandTaskHandle = osThreadCreate(osThread(CommandTask), NULL);

/* definition and creation of RxTask */
Expand Down Expand Up @@ -417,7 +417,6 @@ void StartCommandTask(void const * argument)
}
}

// TODO: This didn't really have an effect. Need to figure out why
if(numIterations % 100 == 0){
// Every 100 iterations, assert torque enable
for(uint8_t i = MOTOR1; i <= MOTOR18; i++){
Expand Down

0 comments on commit d11a7e4

Please sign in to comment.