/*
  保存任务属��，生成任务时使甄1�7
	堆栈大小取决与自己设定，堆栈溢出(分配的内存过小）导致过陀螺仪解算的欧拉角出问预1�7
    堆栈分配过大导致过各个线程跑飞（怢�疑是内存不够导致的）
    ！！！出现各种跑飞和奇��的问题 可以合理怢�疄1�7 是否是堆栈内存给的有问题


    对于内存分配的一些理规1�7 

   此处堆栈存放的都是一亄1�7 屢�部变釄1�7 全局变量  霢�要根据线程自身的大小设定
*/

/* Includes ----------------------------------------------------------------- */
#include "task\user_task.h"

Task_Runtime_t task_runtime;

/* 各个任务的参数，根据实际情况分配栈空间*/
const osThreadAttr_t attr_init = {
    .name = "init",
    .priority = osPriorityRealtime,
    .stack_size = 256 * 4,
};
const osThreadAttr_t attr_atti_esti = {
    .name = "atti_esti",
    .priority = osPriorityRealtime,
    .stack_size = 256 * 4,
};
const osThreadAttr_t attr_chassis = {
    .name = "chassis",
    .priority = osPriorityAboveNormal,
    .stack_size = 256 * 4,
};
const osThreadAttr_t attr_r12ds = {
    .name = "r12ds",
    .priority = osPriorityRealtime,
    .stack_size = 128 * 4,
};
//can的栈空间拉大了会导致每个轮小陀螺旋转，离谱
const osThreadAttr_t attr_can = {
    .name = "can",
    .priority = osPriorityRealtime,
    .stack_size = 128 * 4,
};

const osThreadAttr_t attr_cmd = {
	  .name = "cmd",
	  .priority = osPriorityHigh,
	  .stack_size = 128 *4,
};

const osThreadAttr_t attr_nuc = {
	  .name = "nuc",
	  .priority = osPriorityRealtime,
	  .stack_size = 128 *4,
};

const osThreadAttr_t attr_ops_9pos = {
    .name = "action",
    .priority = osPriorityRealtime,
    .stack_size = 128 *4,
};

const osThreadAttr_t attr_calc = {
    .name = "calc",
    .priority = osPriorityRealtime,
    .stack_size = 128 *4,
};

const osThreadAttr_t attr_navi = {
    .name = "navi",
    .priority = osPriorityRealtime,
    .stack_size = 256 *4,
};

const osThreadAttr_t attr_error_detect = {
	  .name = "error_detect",
	  .priority = osPriorityLow,
	  .stack_size = 128 *4,
};

const osThreadAttr_t attr_remote = {
	   .name = "dr16",
	   .priority = osPriorityRealtime,
	   .stack_size = 128 *4,
};
