///////////////////////////////////////

#ifndef APP_CFG_MODULE_PRESENT
#define APP_CFG_MODULE_PRESENT

#define ENABLE_MODULE    1
#define DISABLE_MODULE   0

/// 配置模块
#define CFG_MODULE_AGENT_HY                         DISABLE_MODULE

/// 定义任务优先级
/// 0-12预留给网络用
//#define TASK_RECV_ENET_ISR_PRIO                     0u
//#define TASK_TCPIP_THREAD_PRIO                      1u
//#define TASK_SLIPIF_THREAD_PRIO                     2u
//#define TASK_PING_THREAD_PRIO                       3u   



/// 终端交互任务
#define TASK_TERM_PRIO                              (OS_LOWEST_PRIO - 4u)
#define TASK_FEEDDOG_PRIO                           (OS_LOWEST_PRIO - 3u)
#define OS_TASK_TMR_PRIO                            (OS_LOWEST_PRIO - 2u)


/// 定义任务堆栈大小
#define TASK_RECV_ENET_ISR_STK_SIZE                 400u
#define TASK_TCPIP_THREAD_STK_SIZE                  1500u
#define TASK_PING_THREAD_STK_SIZE                   150u 
/// 堆栈定义为0，具体参见"opt.h"
#define TASK_SLIPIF_THREAD_STK_SIZE                 0u
#define TASK_START_STK_SIZE                         900u 
#define TASK_FEEDDOG_STK_SIZE                       60u 
#define TASK_TERM_STK_SIZE                          200u
#define TASK_SYSTIME_STK_SIZE                       100u
#define TASK_LISTEN_QUEUE_UP_STK_SIZE               200u
#define TASK_LISTEN_QUEUE_DOWN_STK_SIZE             200u
#define TASK_TASK_TEST_STK_SIZE                     200u


/*******************************************************************************/
#define TASK_RECV_ENET_ISR_PRIO                     8u
#define TASK_TCPIP_THREAD_PRIO                      9u
#define TASK_SLIPIF_THREAD_PRIO                     10u
#define TASK_PING_THREAD_PRIO                       11u 
/// 起始任务
#define TASK_START_PRIO                             13u
/// 系统维护时钟
#define TASK_SYSTIME_PRIO                           14u
#define TASK_LISTEN_QUEUE_UP_PRIO                   15u

#define TASK_LISTEN_QUEUE_DOWN_PRIO                 19u


/// CE
#define TASK_TESTQUEUE_PRIO                         55u
///*****************************************************************/
//
//#define TASK_GET_ANGLE_PRIO                            21u
//#define TASK_GET_ANGLE_STK_SIZE                        120u
//
//#define POWER_OFF_PRIO                                 17u//原来为7，后导致ping包有延时，造成网络阻塞，UCOSII系统卡死，故优先级低于TCPIP
//#define POWER_OFF_STK_SIZE                             200u
//
//#define TASK_PS_PRIO                                   22u
//#define TASK_PS_STK_SIZE                               80u
//
//#define TASK_HORI_ROATE_MONITOR_PRIO                   23u
//#define TASK_HORI_ROATE_MONITOR_STK_SIZE               120u
//
//#define TASK_VERT_ROATE_MONITOR_PRIO                   24u
//#define TASK_VERT_ROATE_MONITOR_STK_SIZE               120u
//
//#define TASK_ELECTRIC_STABLE_PRIO                      25u
//#define TASK_ELECTRIC_STABLE_STK_SIZE                  150u
//
//#define TASK_VERT_ELECTRIC_STABLE_PWM_PRIO             26u
//#define TASK_VERT_ELECTRIC_STABLE_PWM_SIZE             150u
//
//#define TASK_PTZ_UPDATE_RECE_DATA_PRIO                 27u//接收升级数据
//#define TASK_PTZ_UPDATE_RECE_DATA_STK_SIZE             170u
//
//#define TASK_VERT_SELF_CHECK_PRIO                      28u
//#define TASK_VERT_SELF_CHECK_STK_SIZE                  180u
//
//#define TASK_HORI_SELF_CHECK_PRIO                      29u
//#define TASK_HORI_SELF_CHECK_STK_SIZE                  180u
//
//#define TASK_HORI_PID_PRIO                             30u
//#define TASK_HORI_PID_STK_SIZE                         150u
//
//#define TASK_VERT_DIRECTOR_SPEED_PWM_PRIO              31u
//#define TASK_VERT_DIRECTOR_SPEED_PWM_STK_SIZE          150u
//
//#define TASK_VERT_PID_PRIO                             32u
//#define TASK_VERT_PID_STK_SIZE                         150u
//
//#define TASK_FAULT_DETECT_PRIO                         34u
//#define TASK_FAULT_DETECT_STK_SIZE                     180u
///**/
//#define TASK_AREA_SCAN_PRIO                            35u
//#define TASK_AREA_SCAN_STK_SIZE                        120u
//
//#define TASK_PRESET_BIT_SCAN_PRIO                      36u
//#define TASK_PRESET_BIT_SCAN_STK_SIZE                  100u
//
//#define TASK_LISTEN_PTZ_SERVER_PRIO                    37u//云台接收指令分析
//#define TASK_LISTEN_PTZ_SERVER_STK_SIZE                600
//
//#define TASK_PTZ_UPDATE_DATA_PROCESS_PRIO              39u//处理升级数据
//#define TASK_PTZ_UPDATE_DATA_PROCESS_STK_SIZE          200u
//
//#define TASK_PTZ_UART_485_LASER_PROCESS_PRIO           40u//处理串口数据
//#define TASK_PTZ_UART_485_LASER_PROCESS_STK_SIZE       150u
//
//#define TASK_PTZ_UART_485_DATA_PROCESS_PRIO            41u//处理串口数据
//#define TASK_PTZ_UART_485_DATA_PROCESS_STK_SIZE        300u
//
//#define TASK_PTZ_UART_422_DATA_PROCESS_PRIO            42u//处理串口数据
//#define TASK_PTZ_UART_422_DATA_PROCESS_STK_SIZE        300u
//
//#define TASK_PTZ_AUTO_RETURN_PRIO                      43u//角度回传任务
//#define TASK_PTZ_AUTO_RETURN_STK_SIZE                  180u
//
//#define TASK_PTZ_SPEED_RETURN_PRIO                     44u//角度回传任务
//#define TASK_PTZ_SPEED_RETURN_STK_SIZE                 180u
//
//#define TASK_PTZ_DATA_COLLECT_PRIO                     45u
//#define TASK_PTZ_DATA_COLLECT_STK_SIZE                 200u
//
//#define TASK_PTZ_HEAT_RESISTOR_PRIO                    46u
//#define TASK_PTZ_HEAT_RESISTOR_STK_SIZE                60u
//
//#define TASK_PTZ_RESTORE_PRIO                          47u
//#define TASK_PTZ_RESTORE_STK_SIZE                      60u
//
//
//#define TASK_PTZ_ERROR_COUNT_PRIO                          48u
//#define TASK_PTZ_ERROR_COUNT_STK_SIZE                      200u
//
//
////打印任务堆栈等信息
//#define TASK_PTZ_TASK_PRINTF_PRIO                          55u
//#define TASK_PTZ_TASK_PRINTF_STK_SIZE                      200u
//
//
////解析水平电机返回的数据
//#define TASK_RECV_HORI_SERVO_PRIO                          56u
//#define TASK_RECV_HORI_SERVO_STK_SIZE                      200u
//
////解析俯仰电机返回的数据
//#define TASK_RECV_VERT_SERVO_PRIO                          57u
//#define TASK_RECV_VERT_SERVO_STK_SIZE                      200u
//
//
//
////#define ????????????????????_PRIO                    55u
////#define ????????????????????_STK_SIZE                150u
///*******************************************************************************/

/*****************************************************************/

#define TASK_GET_ANGLE_PRIO                            22u
#define TASK_GET_ANGLE_STK_SIZE                        120u

#define POWER_OFF_PRIO                                 17u//原来为7，后导致ping包有延时，造成网络阻塞，UCOSII系统卡死，故优先级低于TCPIP
#define POWER_OFF_STK_SIZE                             200u



/*********电机通讯协议任务优先级在此**********/
//解析水平电机返回的数据
#define TASK_RECV_HORI_SERVO_PRIO                      18u
#define TASK_RECV_HORI_SERVO_STK_SIZE                  200u

//解析俯仰电机返回的数据
#define TASK_RECV_VERT_SERVO_PRIO                      19u
#define TASK_RECV_VERT_SERVO_STK_SIZE                  200u

#define TASK_HORI_PID_PRIO                             20u
#define TASK_HORI_PID_STK_SIZE                         150u

#define TASK_VERT_PID_PRIO                             21u
#define TASK_VERT_PID_STK_SIZE                         150u

#define TASK_VERT_DIRECTOR_SPEED_PWM_PRIO              21u
#define TASK_VERT_DIRECTOR_SPEED_PWM_STK_SIZE          150u
/***************/


#define TASK_PS_PRIO                                   23u
#define TASK_PS_STK_SIZE                               80u

#define TASK_HORI_ROATE_MONITOR_PRIO                   24u
#define TASK_HORI_ROATE_MONITOR_STK_SIZE               120u

#define TASK_VERT_ROATE_MONITOR_PRIO                   25u
#define TASK_VERT_ROATE_MONITOR_STK_SIZE               120u

#define TASK_ELECTRIC_STABLE_PRIO                      26u
#define TASK_ELECTRIC_STABLE_STK_SIZE                  150u

#define TASK_VERT_ELECTRIC_STABLE_PWM_PRIO             27u
#define TASK_VERT_ELECTRIC_STABLE_PWM_SIZE             150u

#define TASK_PTZ_UPDATE_RECE_DATA_PRIO                 28u//接收升级数据
#define TASK_PTZ_UPDATE_RECE_DATA_STK_SIZE             170u

#define TASK_VERT_SELF_CHECK_PRIO                      29u
#define TASK_VERT_SELF_CHECK_STK_SIZE                  180u

#define TASK_HORI_SELF_CHECK_PRIO                      32u
#define TASK_HORI_SELF_CHECK_STK_SIZE                  180u

// #define TASK_VERT_PID_PRIO                             34u
// #define TASK_VERT_PID_STK_SIZE                         150u

#define TASK_FAULT_DETECT_PRIO                         35u
#define TASK_FAULT_DETECT_STK_SIZE                     180u
/**/
#define TASK_AREA_SCAN_PRIO                            36u
#define TASK_AREA_SCAN_STK_SIZE                        120u

#define TASK_PRESET_BIT_SCAN_PRIO                      37u
#define TASK_PRESET_BIT_SCAN_STK_SIZE                  100u

#define TASK_LISTEN_PTZ_SERVER_PRIO                    39u//云台接收指令分析
#define TASK_LISTEN_PTZ_SERVER_STK_SIZE                600

#define TASK_PTZ_UPDATE_DATA_PROCESS_PRIO              40u//处理升级数据
#define TASK_PTZ_UPDATE_DATA_PROCESS_STK_SIZE          200u

#define TASK_PTZ_UART_485_LASER_PROCESS_PRIO           41u//处理串口数据
#define TASK_PTZ_UART_485_LASER_PROCESS_STK_SIZE       150u

#define TASK_PTZ_UART_485_DATA_PROCESS_PRIO            42u//处理串口数据
#define TASK_PTZ_UART_485_DATA_PROCESS_STK_SIZE        300u

#define TASK_PTZ_UART_422_DATA_PROCESS_PRIO            43u//处理串口数据
#define TASK_PTZ_UART_422_DATA_PROCESS_STK_SIZE        300u

#define TASK_PTZ_AUTO_RETURN_PRIO                      44u//角度回传任务
#define TASK_PTZ_AUTO_RETURN_STK_SIZE                  180u

#define TASK_PTZ_SPEED_RETURN_PRIO                     45u//角度回传任务
#define TASK_PTZ_SPEED_RETURN_STK_SIZE                 180u

#define TASK_PTZ_DATA_COLLECT_PRIO                     46u
#define TASK_PTZ_DATA_COLLECT_STK_SIZE                 200u

#define TASK_PTZ_HEAT_RESISTOR_PRIO                    47u
#define TASK_PTZ_HEAT_RESISTOR_STK_SIZE                60u

#define TASK_PTZ_RESTORE_PRIO                          48u
#define TASK_PTZ_RESTORE_STK_SIZE                      60u


#define TASK_PTZ_ERROR_COUNT_PRIO                          49u
#define TASK_PTZ_ERROR_COUNT_STK_SIZE                      200u


//打印任务堆栈等信息
#define TASK_PTZ_TASK_PRINTF_PRIO                          55u
#define TASK_PTZ_TASK_PRINTF_STK_SIZE                      200u






//#define ????????????????????_PRIO                    55u
//#define ????????????????????_STK_SIZE                150u
/*******************************************************************************/
#endif
