/*
ļڲ˵

API
****û****
************

****ײ****
************
*/

#ifndef _DOG_MENU_DATA_H_
#define _DOG_MENU_DATA_H_

#include "common.h"

/* ˵ */
typedef struct
{
	char* name;
	int16 data_int16;
	uint16 data_uint16;
	uint8 data_uint8;
	float data_float;
}_MENU_DATA_NAME_TYPE_;

//-----------------------------------ʵʱ-----------------------------------//

/* ˵ */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ encoder_1_count;
	_MENU_DATA_NAME_TYPE_ encoder_2_count;
	_MENU_DATA_NAME_TYPE_ encoder_3_count;	
	
	_MENU_DATA_NAME_TYPE_ encoder_1_speed;
	_MENU_DATA_NAME_TYPE_ encoder_2_speed;
	_MENU_DATA_NAME_TYPE_ encoder_3_speed;	
}_MENU_ENCODER_;

/* ˵ */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ motor_1_duty;
	_MENU_DATA_NAME_TYPE_ motor_2_duty;
	_MENU_DATA_NAME_TYPE_ motor_3_duty;
	_MENU_DATA_NAME_TYPE_ motor_1_speed;
	_MENU_DATA_NAME_TYPE_ motor_2_speed;
	_MENU_DATA_NAME_TYPE_ motor_3_speed;
	_MENU_DATA_NAME_TYPE_ motor_1_I;
	_MENU_DATA_NAME_TYPE_ motor_2_I;
	_MENU_DATA_NAME_TYPE_ motor_3_I;
}_MENU_MOTOR_;

/* ǡٶȼ */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ gyro_x;
	_MENU_DATA_NAME_TYPE_ gyro_y;
	_MENU_DATA_NAME_TYPE_ gyro_z;
	
	_MENU_DATA_NAME_TYPE_ acc_x;
	_MENU_DATA_NAME_TYPE_ acc_y;
	_MENU_DATA_NAME_TYPE_ acc_z;
}_MENU_GYRO_ACC_;

/* ŷ */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ roll;
	_MENU_DATA_NAME_TYPE_ pitch;
	_MENU_DATA_NAME_TYPE_ yaw;
}_MENU_EULER_ANGLE_;

/* λ */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ distance;
	_MENU_DATA_NAME_TYPE_ world_x;
	_MENU_DATA_NAME_TYPE_ world_y;
	_MENU_DATA_NAME_TYPE_ world_yaw;
}_MENU_SHIFT_;

/* ˵ */
extern _MENU_ENCODER_ MENU_ENCODER;
extern _MENU_MOTOR_ MENU_MOTOR;
extern _MENU_GYRO_ACC_ MENU_GYRO_ACC;
extern _MENU_EULER_ANGLE_ MENU_EULER_ANGLE;
extern _MENU_SHIFT_ MENU_SHIFT;

//-----------------------------------------------------------------------------//

//----------------------------------------------------------------------//

/* ԳƷ  */
//typedef struct
//{
//}_MENU_SYMMETRY_RECTIFICATE_;

/*   */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ plan_idx;		// 
}_MENU_PLAN_;

/* ͨͷ  */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ exp_time;		// ع
}_MENU_COMMON_CAMERA_;

/* AIͷ0  */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ ai_camera_0_enable_flag;		// ʹ
	_MENU_DATA_NAME_TYPE_ detection_box_width_limit;	// ʼӽļֵ
	_MENU_DATA_NAME_TYPE_ detection_box_width_target;	// ʼλļĿ
	_MENU_DATA_NAME_TYPE_ detection_box_center_limit;	// λļͼֵ
	_MENU_DATA_NAME_TYPE_ box_x_speed_target;			// ĿXٶ
	_MENU_DATA_NAME_TYPE_ box_x_angular_speed_rate;		// Ŀתٶ
	_MENU_DATA_NAME_TYPE_ box_fxxk_speed;				// ٶ
	_MENU_DATA_NAME_TYPE_ box_distance;					// Ӽ
}_MENU_AI_CAMERA_0_;

/* AIͷ1/2  */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ ai_camera_1_enable_flag;		// ʹ
	_MENU_DATA_NAME_TYPE_ ai_camera_2_enable_flag;		// ʹ
	_MENU_DATA_NAME_TYPE_ supplement_lamp_enable_flag;	// ʹ
	_MENU_DATA_NAME_TYPE_ detection_result;		// ־ʶ
}_MENU_AI_CAMERA_1_2_;

/* ˵ѭ߲ */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ zebra_enable_flag;			// ʹ
	_MENU_DATA_NAME_TYPE_ y_speed_target;
	_MENU_DATA_NAME_TYPE_ path_start;
	_MENU_DATA_NAME_TYPE_ path_end;
	_MENU_DATA_NAME_TYPE_ control_point_0;
	_MENU_DATA_NAME_TYPE_ control_point_1;
	_MENU_DATA_NAME_TYPE_ control_point_2;
	_MENU_DATA_NAME_TYPE_ control_point_3;
	_MENU_DATA_NAME_TYPE_ prediction_point;
	_MENU_DATA_NAME_TYPE_ x_speed_rate;
	_MENU_DATA_NAME_TYPE_ auto_control_point_min;
	_MENU_DATA_NAME_TYPE_ auto_control_point_max;
}_MENU_PATH_;

/* ˵Բѭ߲ */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ circle_enable_flag;
	_MENU_DATA_NAME_TYPE_ circle_y_speed_target;
	_MENU_DATA_NAME_TYPE_ circle_angular_speed_target;
	_MENU_DATA_NAME_TYPE_ circle_check_y;
	_MENU_DATA_NAME_TYPE_ circle_in_angle;
	_MENU_DATA_NAME_TYPE_ circle_out_angle;
	_MENU_DATA_NAME_TYPE_ side_extract_start;
	_MENU_DATA_NAME_TYPE_ side_extract_end;
	_MENU_DATA_NAME_TYPE_ circle_in_distance_limit;
	_MENU_DATA_NAME_TYPE_ circle_out_distance_limit;
}_MENU_CIRCLE_PATH_;

/* ˵PID */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ p;
	_MENU_DATA_NAME_TYPE_ i;
	_MENU_DATA_NAME_TYPE_ d;
	_MENU_DATA_NAME_TYPE_ output_limit;
	_MENU_DATA_NAME_TYPE_ i_limit;
	_MENU_DATA_NAME_TYPE_ gyro_d;
}_MENU_PID_;

/* ˵PID */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ control_mode;
	_MENU_DATA_NAME_TYPE_ motor_target;
	_MENU_PID_ MOTOR_SPEED_PID;
	_MENU_PID_ MOTOR_I_PID;
}_MENU_MOTOR_PID_;

/* ˵ѭPID */
typedef struct
{
	_MENU_DATA_NAME_TYPE_ pid_kind;
	_MENU_PID_ PATH_PID;
}_MENU_PATH_PID_;

/* ˵ */
extern _MENU_COMMON_CAMERA_ MENU_COMMON_CAMERA;
extern _MENU_PLAN_ MENU_PLAN;
extern _MENU_AI_CAMERA_0_ MENU_AI_CAMERA_0;
extern _MENU_AI_CAMERA_1_2_ MENU_AI_CAMERA_1_2;
extern _MENU_PATH_ MENU_PATH;
extern _MENU_CIRCLE_PATH_ MENU_CIRCLE_PATH;
extern _MENU_MOTOR_PID_ MENU_MOTOR_1_PID;
extern _MENU_MOTOR_PID_ MENU_MOTOR_2_PID;
extern _MENU_MOTOR_PID_ MENU_MOTOR_3_PID;
extern _MENU_PATH_PID_ MENU_PATH_PID;

//--------------------------------------------------------------------------//

/* ݳʼ */
void menu_data_leeeezy_init(void);

/* Ӳ˵ݳʼ */
void menu_data_yjc_init(void);

#endif