
#include "asr_config.h"
/**
 1、 将所需要的唤醒词填入改数组中；
 2、 所填入的唤醒词必须在数组 asr_cmd_data 中存在，且识别指令库中存在该指令（即：能够出识别结果）
 3、 所填入的指令，如果工作区间是utf-8编码格式，则可以直接填入汉字，不然需要填入汉字对应的utf-8编码
 4、 根据现有宏命令 ASR_WAKE_INDEX/ASR_WAKE_LEN 所设定，所填入的唤醒词不超过10个且每个唤醒词不能大于6个字
 */
unsigned char wakeup_cmd_data[ASR_WAKE_INDEX][ASR_WAKE_LEN] =
    {
        {"小安小安"},
        {"小安同学"},
		{"你好小安"},
};

/**
 1、 将所有需要识别表的指令填入改数组中；
 2、 所填入的识别指令词必须在识别指令库中存在该指令（即：能够出识别结果）
 3、 所填入的指令，如果工作区间是utf-8编码格式，则可以直接填入汉字，不然需要填入汉字对应的utf-8编码
 4、 根据现有宏命令 ASR_CMD_INDEX/ASR_CMD_LEN 所设定，所填入的识别指令不超过50个且每个唤醒词不能大于6个字
 5、 需要特别注意，填写了这里后还需要在 asr_logic 中将 识别指令与发送的串口及提示音对应起来
 */
unsigned char asr_cmd_data[ASR_CMD_INDEX][ASR_CMD_LEN] =
    {
        {"小安小安"},
        {"小安同学"},
        {"你好小安"},
        {"打开窗帘"},
        {"关闭窗帘"},
        {"停止"},
        {"调到十"},
        {"调到二十"},
        {"调到三十"},
        {"调到四十"},
        {"调到五十"},
        {"调到六十"},
        {"调到七十"},
        {"调到八十"},
        {"调到九十"},
        {"调到一百"},
        {"校准行程"},
		
};

/**
 1、 将所有需要发送的串口数据填入改数组
 2、 根据现有宏命令 SEND_UART_DATA_NUM/SEND_UART_DATA_LEN 所设定，所填入的串口数据不能超过50行，没行不超过32byte
 3、 需要特别注意，填写了这里后还需要在 asr_logic 中将 识别指令与发送的串口及提示音对应起来
 */
unsigned char send_uart_buf[SEND_UART_DATA_NUM][SEND_UART_DATA_LEN] =
    {
        {0xAA, 0x01, 0x00, 0xBB},//小安小安
        {0xAA, 0x01, 0x01, 0xBB},//小安同学
        {0xAA, 0x01, 0x02, 0xBB},//你好小安
        {0xBB, 0x00, 0x00, 0x64,0xDF},///打开窗帘
        {0xBB, 0x00, 0x00, 0x00,0xBB},//关闭窗帘
        {0xBB, 0x00, 0x00, 0xF0,0x4B},//停止
        {0xBB, 0x00, 0x00, 0x0A,0xB1},//调到十
        {0xBB, 0x00, 0x00, 0x14,0xAF},//调到二十
        {0xBB, 0x00, 0x00, 0x1E,0xA5},//调到三十
        {0xBB, 0X00, 0x00, 0x28,0x93},//调到四十
        {0xBB, 0x00, 0x00, 0x32,0x89},//调到五十
        {0xBB, 0x00, 0x00, 0x3C,0x87},//调到六十
        {0xBB, 0x00, 0x00, 0x46,0xFD},//调到七十
        {0xBB, 0x00, 0x00, 0x50,0xEB},//调到八十
        {0xBB, 0x00, 0x00, 0x5A,0xE1},//调到九十
        {0xBB, 0x00, 0x00, 0x64,0xDF},//调到一百
        {0xBB, 0x00, 0x03, 0xFF,0x47},//校准行程
        {0xAA, 0x01, 0x11, 0xBB},
        {0xAA, 0x01, 0x12, 0xBB},
        {0xAA, 0x01, 0x15, 0xBB},
        {0xAA, 0x01, 0x16, 0xBB},
        {0xAA, 0x01, 0x17, 0xBB},
        {0xAA, 0x01, 0x18, 0xBB},
        {0xAA, 0x01, 0x19, 0xBB},
        {0xAA, 0x01, 0x1A, 0xBB},
        {0xAA, 0x01, 0x1B, 0xBB},
        {0xAA, 0x01, 0x1C, 0xBB},
        {0xAA, 0x01, 0x1D, 0xBB},
        {0xAA, 0x01, 0x1E, 0xBB},
        {0xAA, 0x01, 0x1F, 0xBB},
        {0xAA, 0x01, 0x20, 0xBB},
        {0xAA, 0x01, 0x21, 0xBB},
        {0xAA, 0x01, 0x22, 0xBB},
        {0xAA, 0x01, 0x23, 0xBB},
        {0xAA, 0x01, 0x24, 0xBB},
};

/**
 1、 将识别指令、识别后发送的串口、识别后播放的提示音对应起来
 2、 ASR_CMD_INDEX 与识别指令数量相同
 3、 asr_logic._asr_result   为识别指令，详见： asr_cmd_data
 4、 asr_logic._send_uart    为串口数据，详见： send_uart_buf；如果识别后不需要发送串口则填入：NULL
 5、 asr_logic._asr_response 为识别后需要播放的提示音名称，
     详见： app_beep.h/枚举：name,枚举标识符对应wav音频的名称，详见提示音生成说明，如果不需要播放提示音则填入：0
 6、 如不需要播放提示音，在提示音位置填入：0或者BEEP_000
 7、 如不需要发送串口，则在对应串口数据位置填入：NULL
 */
ASR_LOGIC asr_logic[ASR_CMD_INDEX] =
    {
        {asr_cmd_data[0], send_uart_buf[0], BEEP_01},
        {asr_cmd_data[1], send_uart_buf[0], BEEP_01},
        {asr_cmd_data[2], send_uart_buf[0], BEEP_03},
		
        {asr_cmd_data[3], send_uart_buf[3], BEEP_05},
		{asr_cmd_data[4], send_uart_buf[4], BEEP_06},
        {asr_cmd_data[5], send_uart_buf[5], BEEP_07},
        {asr_cmd_data[6], send_uart_buf[6], BEEP_08},
        {asr_cmd_data[7], send_uart_buf[7], BEEP_09},
        {asr_cmd_data[8], send_uart_buf[8], BEEP_10},
        {asr_cmd_data[9], send_uart_buf[9], BEEP_11},
        {asr_cmd_data[10], send_uart_buf[10], BEEP_12},
        {asr_cmd_data[11], send_uart_buf[11], BEEP_13},
        {asr_cmd_data[12], send_uart_buf[12], BEEP_14},
        {asr_cmd_data[13], send_uart_buf[13], BEEP_15},
        {asr_cmd_data[14], send_uart_buf[14], BEEP_16},
        {asr_cmd_data[15], send_uart_buf[15], BEEP_17},
        {asr_cmd_data[16], send_uart_buf[16], BEEP_18},
        /*{asr_cmd_data[17], send_uart_buf[17], BEEP_19},
        {asr_cmd_data[18], send_uart_buf[18], BEEP_20},
		
        {asr_cmd_data[19], send_uart_buf[19], BEEP_51},
        {asr_cmd_data[20], send_uart_buf[20], BEEP_52},
        {asr_cmd_data[21], send_uart_buf[21], BEEP_53},
        {asr_cmd_data[22], send_uart_buf[22], BEEP_54},
        {asr_cmd_data[23], send_uart_buf[23], BEEP_23},
        {asr_cmd_data[24], send_uart_buf[24], BEEP_24},
        {asr_cmd_data[25], send_uart_buf[25], BEEP_26},
        {asr_cmd_data[26], send_uart_buf[26], BEEP_28},
        {asr_cmd_data[27], send_uart_buf[27], BEEP_29},
        {asr_cmd_data[28], send_uart_buf[28], BEEP_30},
        {asr_cmd_data[29], send_uart_buf[29], BEEP_31},
        {asr_cmd_data[30], send_uart_buf[30], BEEP_32},
        {asr_cmd_data[31], send_uart_buf[31], BEEP_33},
        {asr_cmd_data[32], send_uart_buf[32], BEEP_34},
        {asr_cmd_data[33], send_uart_buf[33], BEEP_35},
        {asr_cmd_data[34], send_uart_buf[34], BEEP_36},
        {asr_cmd_data[35], send_uart_buf[35], BEEP_41},

        
        {asr_cmd_data[36], NULL, BEEP_55},
        {asr_cmd_data[37], NULL, BEEP_56},
        {asr_cmd_data[38], NULL, BEEP_58},
        {asr_cmd_data[39], NULL, BEEP_59},*/
};

/**
 1、 将所有需要接收的串口数据填入改数组./
 2、 串口数据的头和尾需要在宏命令设置： UART1_RCV_HEAD/UART1_RCV_END，如果不同则收不到数据
 3、 根据现有宏命令 RCV_UART_DATA_NUM/RCV_UART_DATA_LEN 所设定，所填入的串口数据不能超过50行，没行不超过32byte
 4、 需要特别注意，填写了这里后还需要在 rcv_uart_logic 中将接收到的串口数据与需要播放的提示音对应
 */
unsigned char rcv_uart_buf[RCV_UART_DATA_NUM][RCV_UART_DATA_LEN] =
    {
        {0xBB, 0x01, 0x01, 0x64, 0xDF},//提示校准完成
        {0xAA, 0x02, 0x01, 0xBB},
        {0xAA, 0x02, 0x02, 0xBB},
        {0xAA, 0x02, 0x03, 0xBB},
        {0xAA, 0x02, 0x04, 0xBB},
        {0xAA, 0x02, 0x05, 0xBB},
        {0xAA, 0x02, 0x06, 0xBB},
        {0xAA, 0x02, 0x07, 0xBB},
        {0xAA, 0x02, 0x08, 0xBB},
        {0xAA, 0x02, 0x09, 0xBB},
        {0xAA, 0x02, 0x0A, 0xBB},
        {0xAA, 0x02, 0x0B, 0xBB},
        {0xAA, 0x02, 0x0C, 0xBB},
        {0xAA, 0x02, 0x0D, 0xBB},
        {0xAA, 0x02, 0x0E, 0xBB},
        {0xAA, 0x02, 0x0F, 0xBB},
        {0xAA, 0x02, 0x10, 0xBB},
        {0xAA, 0x02, 0x11, 0xBB},
        {0xAA, 0x02, 0x12, 0xBB},
        {0xAA, 0x02, 0x15, 0xBB},
        {0xAA, 0x02, 0x16, 0xBB},
        {0xAA, 0x02, 0x17, 0xBB},
        {0xAA, 0x02, 0x18, 0xBB},
        {0xAA, 0x02, 0x19, 0xBB},
        {0xAA, 0x02, 0x1A, 0xBB},
        {0xAA, 0x02, 0x1B, 0xBB},
        {0xAA, 0x02, 0x1C, 0xBB},
        {0xAA, 0x02, 0x1D, 0xBB},
        {0xAA, 0x02, 0x1E, 0xBB},
        {0xAA, 0x02, 0x1F, 0xBB},
        {0xAA, 0x02, 0x20, 0xBB},
        {0xAA, 0x02, 0x21, 0xBB},
        {0xAA, 0x02, 0x22, 0xBB},
        {0xAA, 0x02, 0x23, 0xBB},
        {0xAA, 0x02, 0x24, 0xBB},
        {0xAA, 0x02, 0x25, 0xBB},
        {0xAA, 0x02, 0x26, 0xBB},
};

/**
 1、 将需要接收的串口数据、接收到串口数据后播放的提示音对应起来，如不需要播放提示音，在提示音位置填入：0或者BEEP_000
 2、 RCV_UART_DATA_NUM 与接收串口数据的条数一直
 3、 rcv_uart_logic._rcv_uart     为识别指令，详见： asr_cmd_data
 5、 rcv_uart_logic._rcv_response 为接收到串口数据后要播放的提示音名称，
     详见： 枚举：app_beep.h/name,枚举标识符对应wav音频的名称，详见提示音生成说明
 */ 
RCV_LOGIC rcv_uart_logic[RCV_UART_DATA_NUM] =
    {
        {rcv_uart_buf[0], BEEP_01},
        {rcv_uart_buf[1], BEEP_03},
        {rcv_uart_buf[2], BEEP_04},
        {rcv_uart_buf[3], BEEP_05},
        {rcv_uart_buf[4], BEEP_06},
        {rcv_uart_buf[5], BEEP_07},
        {rcv_uart_buf[6], BEEP_08},
        {rcv_uart_buf[7], BEEP_09},
        {rcv_uart_buf[8], BEEP_10},
        {rcv_uart_buf[9], BEEP_11},
        {rcv_uart_buf[10], BEEP_12},
        {rcv_uart_buf[11], BEEP_13},
        {rcv_uart_buf[12], BEEP_14},
        {rcv_uart_buf[13], BEEP_15},
        {rcv_uart_buf[14], BEEP_16},
		
        /*{rcv_uart_buf[15], BEEP_19},
        {rcv_uart_buf[16], BEEP_20},
        {rcv_uart_buf[17], BEEP_50},
        {rcv_uart_buf[18], BEEP_51},
        {rcv_uart_buf[19], BEEP_52},
        {rcv_uart_buf[20], BEEP_53},
        {rcv_uart_buf[21], BEEP_54},
        {rcv_uart_buf[22], BEEP_23},
        {rcv_uart_buf[23], BEEP_24},
        {rcv_uart_buf[24], BEEP_26},
        {rcv_uart_buf[25], BEEP_28},
        {rcv_uart_buf[26], BEEP_29},
        {rcv_uart_buf[27], BEEP_30},
        {rcv_uart_buf[28], BEEP_31},
        {rcv_uart_buf[29], BEEP_32},
        {rcv_uart_buf[30], BEEP_33},
        {rcv_uart_buf[31], BEEP_34},
        {rcv_uart_buf[32], BEEP_35},
        {rcv_uart_buf[33], BEEP_36},
        {rcv_uart_buf[34], BEEP_41},*/
        {rcv_uart_buf[35], BEEP_00},
        {rcv_uart_buf[36], BEEP_02},
};