作者 潘浩彬

00 00 01 02更新

正在显示 96 个修改的文件 包含 3171 行增加1001 行删除
... ... @@ -27,12 +27,14 @@ typedef enum {
JZ_INSCODE_5AFRAME_ASKFORCONNECT = 0x10000100, //申请连接
JZ_INSCODE_5AFRAME_REALTIMEMP2_START = 0x10000200, //开启实时MP2
JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION = 0x10000201, //传输实时MP2
JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION = 0x10000201, //无限制传输实时MP2
JZ_INSCODE_5AFRAME_REALTIMEMP2_STOP = 0x10000202, //结束实时MP2
JZ_INSCODE_5AFRAME_REALTIMEMP2_LIMIT_TRANSMISSION = 0x10000203, //有限制传输MP2
JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_START = 0x10000300, //打开音频文件上传
JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION = 0x10000301, //传输音频文件
JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION = 0x10000301, //无限制传输音频文件
JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_STOP = 0x10000302, //关闭音频文件上传
JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_LIMIT_TRANSMISSION = 0x10000303, //定长传输音频文件
JZ_INSCODE_5AFRAME_AUDIO_PLAYFILE = 0x10000400, //播放指定音频
JZ_INSCODE_5AFRAME_AUDIO_CONTINUE = 0x10000401, //音频继续播放
... ... @@ -83,17 +85,21 @@ typedef enum {
JZ_INSCODE_5AFRAME_TTS_SET_TONE = 0x10000801, //TTS设置音色
JZ_INSCODE_5AFRAME_TTS_SET_SPEED = 0x10000802, //TTS设置语速
JZ_INSCODE_5AFRAME_TTS_TRANS_START = 0x10000803, //TTS开始发送
JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION = 0x10000804, //TTS正在接收
JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION = 0x10000804, //TTS正在无限制接收
JZ_INSCODE_5AFRAME_TTS_TRANS_STOP = 0x10000805, //TTS发送完毕
JZ_INSCODE_5AFRAME_TTS_TRANS_LIMIT_TRANSMISSION = 0x10000806, //TTS正在定长接收
JZ_INSCODE_5AFRAME_OPUS_TRANS_START = 0x10000900, //opus传输开始
JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION = 0x10000901, //opus传输中
JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION = 0x10000901, //opus 无限制传输中
JZ_INSCODE_5AFRAME_OPUS_TRANS_STOP = 0x10000902, //opus传输结束
JZ_INSCODE_5AFRAME_OPUS_TRANS_LIMIT_TRANSMISSION = 0x10000903, //opus传输中
JZ_INSCODE_5AFRAME_OPUS_PLAY = 0x10000910, //opus播放
JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_START = 0x10000A00, //开启opus实时语音
JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION = 0x10000A01, //传输opus实时语音
JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION = 0x10000A01, //无限制传输opus实时语音
JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_STOP = 0x10000A02, //结束opus实时语音
JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_LIMIT_TRANSMISSION = 0x10000A03, //定长传输opus实时语音
JZ_INSCODE_5AFRAME_GIMBAL_PITCH_CONTROL = 0x10000B00, //云台俯仰控制
JZ_INSCODE_5AFRAME_GIMBAL_YAW_CONTROL = 0x10000B01, //云台朝向控制
... ... @@ -119,7 +125,7 @@ typedef enum {
//5B类帧
JZ_INSCODE_5BFRAME_FRAME = 0x10004000, //发送帧
JZ_INSCODE_5BFRAME_INITIATECONNECT = 0x10004101, //回复连接
JZ_INSCODE_5BFRAME_INITIATECONNECT = 0x10004101, //主动连接
JZ_INSCODE_5BFRAME_SUCESS = 0x10004200, //操作成功
JZ_INSCODE_5BFRAME_DEFEAT = 0x10004201, //操作失败
... ...
... ... @@ -55,7 +55,7 @@ int JZsdk_FrameComparsion(char *getdata, int len)
|| ( (getdata[len -2]!= 0x00) && (getdata[ len -1] != 0x23) )
)
{
//printf("接受到的帧,没有帧头或者帧尾,退出recv帧判断函数\n");
printf("接受到的帧,没有帧头或者帧尾,退出recv帧判断函数\n");
return JZ_ERROR_SYSTEM_FRAME_ERROR;
}
}
\ No newline at end of file
... ...
... ... @@ -38,11 +38,21 @@ static int Comparison_5AFRAME_FirstLevelCode_0x51(char *getdata)
return JZ_INSCODE_5AFRAME_REALTIMEMP2_STOP;
break;
//有限制传输mp2语言
case 0xb3:
return JZ_INSCODE_5AFRAME_REALTIMEMP2_LIMIT_TRANSMISSION;
break;
//打开音频文件上传
case 0x01:
return JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_START;
break;
//有限制传输音频文件
case 0x02:
return JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_LIMIT_TRANSMISSION;
break;
//关闭音频文件上传
case 0x03:
return JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_STOP;
... ... @@ -245,6 +255,11 @@ static int Comparison_5AFRAME_FirstLevelCode_0x57(char *getdata)
return JZ_INSCODE_5AFRAME_TTS_TRANS_STOP;
break;
//定长传输文本
case 0x05:
return JZ_INSCODE_5AFRAME_TTS_TRANS_LIMIT_TRANSMISSION;
break;
default:
break;
}
... ... @@ -281,6 +296,11 @@ static int Comparison_5AFRAME_FirstLevelCode_0x59(char *getdata)
return JZ_INSCODE_5AFRAME_OPUS_TRANS_STOP;
break;
//opus定长传输
case 0xF3:
return JZ_INSCODE_5AFRAME_OPUS_TRANS_LIMIT_TRANSMISSION;
break;
//opus播放
case 0x01:
return JZ_INSCODE_5AFRAME_OPUS_PLAY;
... ... @@ -295,6 +315,11 @@ static int Comparison_5AFRAME_FirstLevelCode_0x59(char *getdata)
return JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_STOP;
break;
//opus定长传输文件
case 0xE3:
return JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_LIMIT_TRANSMISSION;
break;
default:
return JZ_ERROR_SYSTEM_FRAME_ERROR;
break;
... ...
... ... @@ -18,14 +18,6 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len)
*
********************************************************************************************************************************************************/
case JZ_INSCODE_5AFRAME_ASKFORCONNECT:
{
char sendbuf[12] = {0x5A ,0x5A ,0x77 ,0x00 ,0x0C ,0x00 ,0x00 ,0x50 ,0x51 ,0x00 ,0x00 ,0x23};
memcpy(str, sendbuf, 12);
*str_len = 12;
}
break;
case JZ_INSCODE_5AFRAME_SEARCHLIGHT_SET_FREQUENCY:
{
char sendbuf[13] = {0x5A ,0x5A ,0x77 ,0x00 ,0x0D ,0x00 ,0x00 ,0x61 ,0x51 ,0x00 ,0x00 ,0x00 ,0x23};
... ...
... ... @@ -196,14 +196,6 @@ void JZsdk_UserLogOutput(E_JZsdkConsoleLogLevel level, const char *fmt, ...)
default:
break;
}
//减少打印
if (level < JZSDK_LOG_LEVEL)
{
return;
}
// 使用可变参数处理传入的格式化字符串和可变参数
va_list args;
va_start(args, fmt);
... ...
... ... @@ -59,8 +59,6 @@ void JZsdk_User_OutputHex(E_JZsdkConsoleLogLevel level, const char *fmt, ...);
#define JZSDK_LOG_OUTPUTHEX(fmt, ...) \
JZsdk_User_OutputHex(JZSDK_LOGGER_CONSOLE_LOG_LEVEL_INFO, "" fmt , ##__VA_ARGS__)
#define JZSDK_LOG_LEVEL JZSDK_LOGGER_CONSOLE_LOG_LEVEL_DEBUG
#ifdef __cplusplus
}
... ...
... ... @@ -64,7 +64,8 @@ int JZsdk_Socket()
T_JZsdkReturnCode GetSerialNumber(char *SerialNumber)
{
FILE *num_file;
char num_char[15];
char num_char[128];
memset(num_char,0,sizeof(num_char));
num_file = fopen("/root/num", "rb+");
if (num_file == NULL)
... ... @@ -72,6 +73,9 @@ T_JZsdkReturnCode GetSerialNumber(char *SerialNumber)
num_file = fopen("/root/num", "wb+");
if (num_file == NULL)
{
//无序列号
memcpy(SerialNumber, "无", sizeof("无"));
fclose(num_file);
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
}
... ... @@ -83,20 +87,26 @@ T_JZsdkReturnCode GetSerialNumber(char *SerialNumber)
}
ret = fread((char *) &num_char,14, sizeof(char), num_file);
if (ret != sizeof(char)) {
if (ret != sizeof(char))
{
printf("Read num file error.\r\n");
//无序列号
memcpy(SerialNumber, "无", sizeof("无"));
fclose(num_file);
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
else{
printf("Read num file=%s\n",&num_char);
}
}
fclose(num_file);
if (SerialNumber != NULL)
{
memcpy(SerialNumber, num_char, 14);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
fclose(num_file);
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
\ No newline at end of file
... ...
... ... @@ -158,30 +158,6 @@ int JZsdk_Uart_SecondInit(int UART_DEV_NAME, int BitRate)
UartDevUseFlag.UartDev_4G = JZ_FLAGCODE_ON;
}
}
/*
*
* 发送自由帧
*
*/
int JZsdk_Uart_Send_CustomOrder(int UartPort, char *sendbuf, int len)
{
JZsdk_Uart_SendDeal_Send_CustomOrder(UartPort, sendbuf, len);
}
/*
*
* 发送请求连接帧
*
*/
int JZsdk_Uart_Send_ConnectFrame(int PortNum)
{
//发送请求连接帧
JZsdk_Uart_SendDeal_Send_ConnectFrame(PortNum);
}
/*
*
* 发送播放结束状态帧
... ...
... ... @@ -25,8 +25,6 @@ extern "C" {
/* Exported functions --------------------------------------------------------*/
int JZsdk_Uart_Init(int UART_DEV_NAME);
int JZsdk_Get_UartDev_UseFlag(int UART_DEV_NAME);
int JZsdk_Uart_Send_ConnectFrame(int PortNum);
int JZsdk_Uart_Send_CustomOrder(int UartPort, char *sendbuf, int len);
int JZsdk_Uart_Reply_PlayStatus_end(int PortNum);
int JZsdk_Uart_Send_PlayStatus(int Uartport ,int num);
... ...
... ... @@ -728,19 +728,6 @@ T_JZsdkReturnCode JZsdk_Uart_Checkstatus_OutPutPower(int DeviceName, int FrameSe
********* ********|
********* ********|
*********************************************************************************************************/
/*********
*
* 收到连接回复帧
*
**********/
int JZsdl_Uart_ObtainConnectFrame(char *getbuf, int value)
{
#if APP_VERSION == APP_TEST
TestAPP_Connect(value);
#endif
}
/*******************************************************************************************************************************
*
... ...
... ... @@ -28,7 +28,6 @@ extern "C" {
/* Exported functions --------------------------------------------------------*/
int JZsdk_Uart_Init(int UART_DEV_NAME);
int JZsdk_Get_UartDev_UseFlag(int UART_DEV_NAME);
int JZsdl_Uart_ObtainConnectFrame(char *getbuf, int value);
int JZsdk_Uart_Set_Amplifier(int status);
T_JZsdkReturnCode JZsdk_Uart_Set_Volume(int DeviceName, int value);
... ...
... ... @@ -41,7 +41,7 @@ static T_JZsdkReturnCode JZsdk_Uart_RecvDeal_UART_4G_TransmodeDecide();
**********/
static int Uart_4G_RecvDeal_AskForConnect(char *getbuf)
{
JZSDK_LOG_INFO("串口设备4G,连接成功");
JZSDK_LOG_INFO("串口设备4g,连接成功");
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
... ... @@ -49,7 +49,7 @@ static int Uart_4G_RecvDeal_AskForConnect(char *getbuf)
int Device_name = JZsdk_Uart_GetVersionReplay();
//3、回复连接成功
JZsdk_Uart_SendDeal_Send_Connect(UART_4G, Device_name);
JZsdk_Uart_SendDeal_Send_Connect(UART_DEV_1, Device_name);
//1、将串口程序设置为连接模式
//JZsdk_Uart_SetMainWorkMode(JZ_FLAGCODE_ON);
... ... @@ -79,14 +79,14 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_RealTimeMP2_start(char *getbuf)
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("开启MP2实时喊话功能失败\n");
return ret;
}
//1、修改接收模式
JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION);
//2、获取码率倍率 默认8k
int RateMagnification = (int)getbuf[9];
... ... @@ -106,12 +106,12 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_RealTimeMP2_start(char *getbuf)
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//4、回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//4、回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -121,7 +121,7 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_RealTimeMP2_start(char *getbuf)
*
*
**********/
static int Uart_4G_RecvDeal_RealTimeMP2_transmission(char *getdata, int len)
static int Uart_4G_RecvDeal_RealTimeMP2_Unlimit_transmission(char *getdata, int len)
{
JZSDK_LOG_INFO("MP2实时喊话传输中\n");
T_JZsdkReturnCode ret;
... ... @@ -130,6 +130,31 @@ static int Uart_4G_RecvDeal_RealTimeMP2_transmission(char *getdata, int len)
ret = JZsdk_Uart_RealTimeMP2_Trans(getdata, len);
}
/*********
*
* 语音MP2实时喊话有限传输中
*
*
**********/
static int Uart_4G_RecvDeal_RealTimeMP2_Limit_transmission(char *getdata, int len)
{
JZSDK_LOG_INFO("MP2实时喊话有限制传输中\n");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 128)
{
JZSDK_LOG_ERROR("传输得到的mp2实时数据帧长度超出128上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//传输数据接口
ret = JZsdk_Uart_RealTimeMP2_Trans(getdata+9, DataLen);
}
/*********
*
* 关闭语音MP2发送功能
... ... @@ -144,10 +169,10 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_RealTimeMP2_stop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION)
if ((UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION) )
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("操作失败,mp2传输未开始,无法关闭");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
... ... @@ -161,12 +186,12 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_RealTimeMP2_stop(char *getbuf)
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//4、回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//4、回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -186,7 +211,7 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_SaveAudioFileTrans_start(char *getbuf,
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("开始传输的音频文件保存失败");
return ret;
}
... ... @@ -203,44 +228,69 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_SaveAudioFileTrans_start(char *getbuf,
ret = JZsdk_Uart_SaveAudioFileStart(FileName);
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
return -1;
}
//3、调整接收模式为音频文件传输
JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION);
//4、回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
* 传输音频文件中
* 传输无限制音频文件中
*
*
**********/
static int Uart_4G_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int len)
static T_JZsdkReturnCode Uart_4G_RecvDeal_SaveAudioFileTrans_UnlimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("传输音频文件中\n");
JZsdk_Uart_SaveAudioFileTrans(getdata, len);
}
/*********
*
* 传输定长音频文件中
*
*
**********/
static T_JZsdkReturnCode Uart_4G_RecvDeal_SaveAudioFileTrans_LimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("传输定长音频文件中\n");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 128)
{
JZSDK_LOG_ERROR("传输得到的定长音频文帧长度超出128上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//传输数据接口
ret = JZsdk_Uart_SaveAudioFileTrans(getdata+9, DataLen);
}
/*********
*
* 关闭音频文件上传
*
*
**********/
static int Uart_4G_RecvDeal_SaveAudioFileTrans_stop(char *getbuf)
static T_JZsdkReturnCode Uart_4G_RecvDeal_SaveAudioFileTrans_stop(char *getbuf)
{
JZSDK_LOG_INFO("开始传输的音频文件保存\n");
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION)
if (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("关闭音频文件上传失败,音频文件上传未开始,无法关闭");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
... ... @@ -252,7 +302,7 @@ static int Uart_4G_RecvDeal_SaveAudioFileTrans_stop(char *getbuf)
JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_STOP);
//2、回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -281,16 +331,16 @@ static int Uart_4G_RecvDeal_audio_PlayFile(char *getbuf)
JZSDK_LOG_INFO("播放指定音频:%s\n",music_name);
ret = JZsdk_Uart_PlayMusic(UART_4G, music_name, datasize);
ret = JZsdk_Uart_PlayMusic(UART_DEV_1, music_name, datasize);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//4、回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//4、回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
/*********
... ... @@ -305,10 +355,10 @@ static int Uart_4G_RecvDeal_audio_PlayContinue(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_audio_PlayContinue(UART_4G);
JZsdk_Uart_audio_PlayContinue(UART_DEV_1);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
... ... @@ -322,10 +372,10 @@ static int Uart_4G_RecvDeal_audio_PlayPause(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_audio_PlayPause(UART_4G);
JZsdk_Uart_audio_PlayPause(UART_DEV_1);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
... ... @@ -339,10 +389,10 @@ static int Uart_4G_RecvDeal_audio_PlayStop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_audio_PlayStop(UART_4G);
JZsdk_Uart_audio_PlayStop(UART_DEV_1);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -357,10 +407,10 @@ static int Uart_4G_RecvDeal_audio_LastSong(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_audio_LastSong(UART_4G);
JZsdk_Uart_audio_LastSong(UART_DEV_1);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -375,10 +425,10 @@ static int Uart_4G_RecvDeal_audio_NextSong(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_audio_NextSong(UART_4G);
JZsdk_Uart_audio_NextSong(UART_DEV_1);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -394,7 +444,7 @@ static int Uart_4G_RecvDeal_audio_GetMusicList(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//0、刷新歌曲列表
JZsdk_Uart_Flush_MusicList();
... ... @@ -411,16 +461,16 @@ static int Uart_4G_RecvDeal_audio_GetMusicList(char *getbuf)
}
//3、发送开始帧
JZsdk_Uart_SendDeal_Reply_Musiclist_start(UART_4G, music_sum);
JZsdk_Uart_SendDeal_Reply_Musiclist_start(UART_DEV_1, music_sum);
//4、逐一调用发送函数将歌曲名发出
for (int i = 0; i < music_sum; i++)
{
JZsdk_Uart_SendDeal_Reply_Musiclist(UART_4G, MusicName[i], MusicNameLength[i]);
JZsdk_Uart_SendDeal_Reply_Musiclist(UART_DEV_1, MusicName[i], MusicNameLength[i]);
}
//5、发送结束帧
JZsdk_Uart_SendDeal_Reply_Musiclist_end(UART_4G);
JZsdk_Uart_SendDeal_Reply_Musiclist_end(UART_DEV_1);
}
/*********
... ... @@ -438,7 +488,7 @@ static int Uart_4G_RecvDeal_Amplifier_stop(char *getbuf)
JZsdk_Uart_Set_Amplifier(JZ_FLAGCODE_OFF);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -456,7 +506,7 @@ static int Uart_4G_RecvDeal_Amplifier_open(char *getbuf)
JZsdk_Uart_Set_Amplifier(JZ_FLAGCODE_ON);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -483,10 +533,10 @@ static int Uart_4G_RecvDeal_SetVolume(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
int value = (int)getbuf[9];
JZsdk_Uart_Set_Volume(UART_4G, value);
JZsdk_Uart_Set_Volume(UART_DEV_1, value);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -505,10 +555,10 @@ static int Uart_4G_RecvDeal_CheckStatus_volume(char *getbuf)
int volume = JZsdk_Uart_CheckStatus_volume();
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送音量
JZsdk_Uart_SendDeal_Reply_Volume(UART_4G, volume);
JZsdk_Uart_SendDeal_Reply_Volume(UART_DEV_1, volume);
}
/*********
... ... @@ -530,10 +580,10 @@ static int Uart_4G_RecvDeal_CheckStatus_play(char *getbuf)
ret = JZsdk_Uart_CheckStatus_play();
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送播放状态
JZsdk_Uart_SendDeal_Send_PlayStatus(UART_4G, ret);
JZsdk_Uart_SendDeal_Send_PlayStatus(UART_DEV_1, ret);
}
/*********
... ... @@ -556,7 +606,7 @@ static int Uart_4G_RecvDeal_CheckStatus_gimbal(char *getbuf)
JZsdk_Uart_CheckStatus_gimbal(&PitchAngle, &YawAngle);
//2、发送本地云台值
JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(UART_4G, PitchAngle);
JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(UART_DEV_1, PitchAngle);
}
/*********
*
... ... @@ -569,7 +619,7 @@ static int Uart_4G_RecvDeal_CheckStatus_GimbalFineTuning(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_CheckStatus_GimbalFineTuning(UART_4G, FrameSequence);
JZsdk_Uart_CheckStatus_GimbalFineTuning(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -593,10 +643,10 @@ static int Uart_4G_RecvDeal_CheckStatus_PLayFileName(char *getbuf)
JZSDK_LOG_INFO("当前播放的是%s %d\n",MusicName, MusicName_Len);
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送名字
JZsdk_Uart_SendDeal_Reply_MusicName(UART_4G, MusicName,MusicName_Len);
JZsdk_Uart_SendDeal_Reply_MusicName(UART_DEV_1, MusicName,MusicName_Len);
}
/*********
*
... ... @@ -621,10 +671,10 @@ static int Uart_4G_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf)
JZSDK_LOG_INFO("当前的软件版本号为:%2x, %2x, %2x, %2x",majorVersion, minorVersion, modifyVersion, debugVersion);
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送版本号
JZsdk_Uart_SendDeal_Reply_SoftVersion(UART_4G, majorVersion, minorVersion, modifyVersion, debugVersion);
JZsdk_Uart_SendDeal_Reply_SoftVersion(UART_DEV_1, majorVersion, minorVersion, modifyVersion, debugVersion);
}
/*********
*
... ... @@ -648,10 +698,10 @@ static int Uart_4G_RecvDeal_CheckStatus_LoopPlay(char *getbuf)
}
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送循环状态
JZsdk_Uart_SendDeal_Reply_LoopPlayStatus(UART_4G ,LoopStatus);
JZsdk_Uart_SendDeal_Reply_LoopPlayStatus(UART_DEV_1 ,LoopStatus);
}
/*********
*
... ... @@ -675,10 +725,10 @@ static int Uart_4G_RecvDeal_CheckStatus_TTS_tone(char *getbuf)
}
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送音色
JZsdk_Uart_SendDeal_Reply_TTS_tone(UART_4G ,TTS_tone);
JZsdk_Uart_SendDeal_Reply_TTS_tone(UART_DEV_1 ,TTS_tone);
}
/*********
... ... @@ -703,10 +753,10 @@ static int Uart_4G_RecvDeal_CheckStatus_TTS_speed(char *getbuf)
}
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送语速
JZsdk_Uart_SendDeal_Reply_TTS_speed(UART_4G ,TTS_speed);
JZsdk_Uart_SendDeal_Reply_TTS_speed(UART_DEV_1 ,TTS_speed);
}
... ... @@ -734,10 +784,10 @@ static int Uart_4G_RecvDeal_PlayLoop(char *getbuf)
mode = JZ_FLAGCODE_OFF;
}
JZsdk_Uart_audio_PlayLoop(UART_4G, mode);
JZsdk_Uart_audio_PlayLoop(UART_DEV_1, mode);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
... ... @@ -772,7 +822,7 @@ static int Uart_4G_RecvDeal_Delete_Audio(char *getbuf)
JZsdk_Uart_Flush_MusicList();
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
... ... @@ -805,7 +855,7 @@ static int Uart_4G_RecvDeal_Delete_VoiceRecord(char *getbuf)
JZsdk_Uart_Flush_MusicList();
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
... ... @@ -832,16 +882,16 @@ static int Uart_4G_RecvDeal_TTS_SetTone(char *getbuf)
int tone = (int)getbuf[9];
//2、设置音色
T_JZsdkReturnCode ret = JZsdk_Uart_TTS_SetTone(UART_4G, tone);
T_JZsdkReturnCode ret = JZsdk_Uart_TTS_SetTone(UART_DEV_1, tone);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
/*********
... ... @@ -864,21 +914,21 @@ static int Uart_4G_RecvDeal_TTS_SetSpeed(char *getbuf)
JZSDK_LOG_INFO("语速超出范围\n");
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
return -1 ;
}
//2、设置语速
T_JZsdkReturnCode ret = JZsdk_Uart_TTS_SetSpeed(UART_4G, speed);
T_JZsdkReturnCode ret = JZsdk_Uart_TTS_SetSpeed(UART_DEV_1, speed);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
/*********
... ... @@ -900,7 +950,7 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_TTS_Trans_start(char *getbuf)
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("tts开始传输失败");
return ret;
}
... ... @@ -912,10 +962,10 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_TTS_Trans_start(char *getbuf)
TTS_Recv_buffer_length = 0;
//3、将接收模式设置为接收TTS数据模式
JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
... ... @@ -923,7 +973,7 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_TTS_Trans_start(char *getbuf)
*
*
**********/
static int Uart_4G_RecvDeal_TTS_Trans_transmission(char *getdata, int len)
static int Uart_4G_RecvDeal_TTS_Trans_UnlimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("tts传输中");
... ... @@ -940,6 +990,38 @@ static int Uart_4G_RecvDeal_TTS_Trans_transmission(char *getdata, int len)
JZSDK_LOG_ERROR("TTS字数超出1000字节");
}
}
/***********
*
* tts定长传输中
*
* ***/
static T_JZsdkReturnCode Uart_4G_RecvDeal_TTS_Trans_LimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("tts定长传输中");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 128)
{
JZSDK_LOG_ERROR("tts定长帧,单帧数据长度超出128上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
if (TTS_Recv_buffer_length+DataLen < 1000)
{
//1、将新的数据 放入缓冲区
memcpy(TTS_Recv_buffer+TTS_Recv_buffer_length, getdata+9, DataLen);
//2、记录已加载的长度
TTS_Recv_buffer_length = TTS_Recv_buffer_length + DataLen;
}
else
{
JZSDK_LOG_ERROR("TTS总字数超出1000字节");
}
}
/*********
*
... ... @@ -953,15 +1035,15 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_TTS_Trans_stop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION)
if (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION)
{
JZSDK_LOG_INFO("未刷新文本,TTS播放%s",TTS_Recv_buffer);
//3、播放TTS
JZsdk_Uart_TTS_Play(UART_4G, TTS_Recv_buffer, TTS_Recv_buffer_length);
JZsdk_Uart_TTS_Play(UART_DEV_1, TTS_Recv_buffer, TTS_Recv_buffer_length);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
... ... @@ -973,10 +1055,10 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_TTS_Trans_stop(char *getbuf)
JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(JZ_INSCODE_5AFRAME_TTS_TRANS_STOP);
//3、播放TTS
JZsdk_Uart_TTS_Play(UART_4G, TTS_Recv_buffer, TTS_Recv_buffer_length);
JZsdk_Uart_TTS_Play(UART_DEV_1, TTS_Recv_buffer, TTS_Recv_buffer_length);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
... ... @@ -996,7 +1078,7 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_OpusTrans_start(char *getbuf)
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("打开opus传输失败");
return ret;
}
... ... @@ -1012,25 +1094,51 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_OpusTrans_start(char *getbuf)
JZsdk_Uart_SaveOpusStart(decode_rate);
//3、修改接收模式为传输opus
JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION);
JZSDK_LOG_INFO("已完成打开opus传输处理\n");
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
* opus传输
* opus不定长传输
*
*
**********/
static int Uart_4G_RecvDeal_OpusTrans_transmission(char *SaveData, int size)
static int Uart_4G_RecvDeal_OpusTrans_UnlimitTransmission(char *SaveData, int size)
{
JZsdk_Uart_SaveOpusTrans(SaveData,size);
JZSDK_LOG_INFO("已完成opus传输保存处理\n");
}
/*********
*
* opus定长传输文件
*
*
**********/
static T_JZsdkReturnCode Uart_4G_RecvDeal_OpusTrans_LimitTransmission(char *getdata, int size)
{
JZSDK_LOG_INFO("传输opus定长音频文件中\n");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 128)
{
JZSDK_LOG_ERROR("传输得到的opus定长音频文件帧长度超出128上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//传输数据接口
ret = JZsdk_Uart_SaveOpusTrans(getdata+9, DataLen);
}
/*********
*
* opus结束传输
... ... @@ -1043,10 +1151,10 @@ static int Uart_4G_RecvDeal_OpusTrans_stop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION)
if (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("关闭opus结束传输失败,opus结束传输未开始,无法关闭");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
... ... @@ -1059,7 +1167,7 @@ static int Uart_4G_RecvDeal_OpusTrans_stop(char *getbuf)
JZSDK_LOG_INFO("结束opus传输处理\n");
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
... ... @@ -1077,15 +1185,15 @@ static int Uart_4G_RecvDeal_OpusPlay(char *getbuf)
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("opus播放失败,存在传输模式打开中");
return ret;
}
JZsdk_Uart_Opus_PlayFixedFile(UART_4G);
JZsdk_Uart_Opus_PlayFixedFile(UART_DEV_1);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
... ... @@ -1106,13 +1214,13 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_Opus_RealTimeVoice_start(char *getbuf)
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("开启opus实时喊话失败");
return ret;
}
//1、修改接收模式
JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION);
//2、获取码率倍率 默认8k*1倍
int RateMagnification = (int)getbuf[9];
... ... @@ -1131,21 +1239,47 @@ static T_JZsdkReturnCode Uart_4G_RecvDeal_Opus_RealTimeVoice_start(char *getbuf)
JZsdk_Uart_RealTimeVoiceStart(Rate);
//4、通知成功打开语音发送模式
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
* opus实时语音传输中
* opus实时语音无限制传输中
*
*
**********/
static int Uart_4G_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int len)
static int Uart_4G_RecvDeal_Opus_RealTimeVoice_UnlimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("opus语音传输中\n");
JZsdk_Uart_RealTimeVoiceTrans(getdata, len);
}
/*********
*
* opus实时语音定长传输中
*
*
**********/
static T_JZsdkReturnCode Uart_4G_RecvDeal_Opus_RealTimeVoice_LimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("传输opus定长语音传输中\n");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 80)
{
JZSDK_LOG_ERROR("opus实时语音定长传输帧数据长度超出80上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//传输数据接口
ret = JZsdk_Uart_RealTimeVoiceTrans(getdata+9, DataLen);
}
/*********
*
* 关闭opus实时语音发送功能
... ... @@ -1158,10 +1292,10 @@ static int Uart_4G_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION)
if (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("关闭opus实时语音发送功能失败,opus实时语音发送功能未开始,无法关闭");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
... ... @@ -1173,7 +1307,7 @@ static int Uart_4G_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf)
JZsdk_Uart_RealTimeVoiceClose();
//3、通知成功关闭语音发送模式
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
... ... @@ -1215,22 +1349,22 @@ static int Uart_4G_RecvDeal_Gimbal_PitchControl(char *getbuf)
{
JZSDK_LOG_INFO("云台输入角度符号错误,无法正常控制");
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
JZSDK_LOG_INFO("处理得到的角度是%d",Gimbal_angle);
T_JZsdkReturnCode ret = JZsdk_Uart_Gimbal_PitchControl(UART_4G, Gimbal_angle);
T_JZsdkReturnCode ret = JZsdk_Uart_Gimbal_PitchControl(UART_DEV_1, Gimbal_angle);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1265,13 +1399,13 @@ static int Uart_4G_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf)
{
JZSDK_LOG_INFO("云台俯仰微调角度符号错误,无法正常控制");
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
JZSDK_LOG_INFO("处理得到云台俯仰微调角度是%d",Gimbal_angle);
JZsdk_Uart_Gimbal_PitchFineTuningControl(UART_4G, FrameSequence ,Gimbal_angle);
JZsdk_Uart_Gimbal_PitchFineTuningControl(UART_DEV_1, FrameSequence ,Gimbal_angle);
}
... ... @@ -1297,16 +1431,16 @@ static int Uart_4G_RecvDeal_SearchLight_SetFrequency(char *getbuf)
//1、通过数据帧2,获取爆闪频率
int Frequency = getbuf[10];
T_JZsdkReturnCode ret = JZsdk_Uart_Lighting_SetSearchLightFrequency(UART_4G, Frequency);
T_JZsdkReturnCode ret = JZsdk_Uart_Lighting_SetSearchLightFrequency(UART_DEV_1, Frequency);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1324,16 +1458,16 @@ static int Uart_4G_RecvDeal_SearchLight_Control(char *getbuf)
//1、通过数据帧2,获取灯光控制模式
int value = getbuf[10];
T_JZsdkReturnCode ret = JZsdk_Uart_SearchLight_Control(UART_4G, value);
T_JZsdkReturnCode ret = JZsdk_Uart_SearchLight_Control(UART_DEV_1, value);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1352,16 +1486,16 @@ static int Uart_4G_RecvDeal_SearchLight_Lumen(char *getbuf)
int LeftLumen = getbuf[9]; //左灯亮度
int RightLumen = getbuf[10]; //右灯亮度
T_JZsdkReturnCode ret = JZsdk_Uart_SearchLight_Lumen(UART_4G, LeftLumen, RightLumen);
T_JZsdkReturnCode ret = JZsdk_Uart_SearchLight_Lumen(UART_DEV_1, LeftLumen, RightLumen);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1377,7 +1511,7 @@ static int Uart_4G_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//2、查询灯光属性
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_SearchLightLightAttribute(UART_4G, FrameSequence);
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_SearchLightLightAttribute(UART_DEV_1, FrameSequence);
}
... ... @@ -1393,7 +1527,7 @@ static int Uart_4G_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//2、查询探照灯温度
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_SearchLightTemperture(UART_4G, FrameSequence);
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_SearchLightTemperture(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -1410,16 +1544,16 @@ static int Uart_4G_RecvDeal_SearchLight_SubscriptionControl(char *getbuf)
//1、通过数据帧2,获取控制值
int value = getbuf[10];
T_JZsdkReturnCode ret = JZsdk_Uart_SearchLight_SubscriptionControl(UART_4G, value);
T_JZsdkReturnCode ret = JZsdk_Uart_SearchLight_SubscriptionControl(UART_DEV_1, value);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1434,7 +1568,7 @@ static int Uart_4G_RecvDeal_CheckStatus_SerialNumber(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_CheckStatus_SerialNumber(UART_4G, FrameSequence);
JZsdk_Uart_CheckStatus_SerialNumber(UART_DEV_1, FrameSequence);
}
... ... @@ -1453,7 +1587,7 @@ static int Uart_4G_RecvDeal_OutPutPower_Control(char *getbuf)
int Value = getbuf[9];
//控制
JZsdk_Uart_OutPutPower_Control(UART_4G, FrameSequence, Value);
JZsdk_Uart_OutPutPower_Control(UART_DEV_1, FrameSequence, Value);
}
/*********
... ... @@ -1469,7 +1603,7 @@ static int Uart_4G_RecvDeal_Checkstatus_OutPutPower(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//获取本地数值
JZsdk_Uart_Checkstatus_OutPutPower(UART_4G, FrameSequence);
JZsdk_Uart_Checkstatus_OutPutPower(UART_DEV_1, FrameSequence);
}
/*******************************************************************************************************************************
... ... @@ -1492,16 +1626,16 @@ static int Uart_4G_RecvDeal_WarningLight_ModeControl(char *getbuf)
int value1 = getbuf[9];
int value2 = getbuf[10];
T_JZsdkReturnCode ret = JZsdk_Uart_WarningLight_ModeControl(UART_4G, value1, value2);
T_JZsdkReturnCode ret = JZsdk_Uart_WarningLight_ModeControl(UART_DEV_1, value1, value2);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1520,16 +1654,16 @@ static int Uart_4G_RecvDeal_WarningLight_SetColor(char *getbuf)
int value1 = getbuf[9];
int value2 = getbuf[10];
T_JZsdkReturnCode ret = JZsdk_Uart_WarningLight_SetColor(UART_4G, value1, value2);
T_JZsdkReturnCode ret = JZsdk_Uart_WarningLight_SetColor(UART_DEV_1, value1, value2);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1545,7 +1679,7 @@ static int Uart_4G_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//2、查询灯光属性
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_WarningLightStatus(UART_4G, FrameSequence);
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_WarningLightStatus(UART_DEV_1, FrameSequence);
}
... ... @@ -1561,7 +1695,7 @@ static int Uart_4G_RecvDeal_CheckStatus_WarningLightColor(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//2、查询灯光属性
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_WarningLightColor(UART_4G, FrameSequence);
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_WarningLightColor(UART_DEV_1, FrameSequence);
}
/********************************************************************************************************
... ... @@ -1603,7 +1737,7 @@ static int Uart_4G_RecvDeal_ObtainSearchLight_Frequency(char *getbuf)
int value = getbuf[10];
//2、发送到本地处理
JZsdl_Uart_ObtainSearchLight_Frequency(UART_4G, value);
JZsdl_Uart_ObtainSearchLight_Frequency(UART_DEV_1, value);
}
/*********
... ... @@ -1621,7 +1755,7 @@ static int Uart_4G_RecvDeal_ObtainSearchLight_Mode(char *getbuf)
int value = getbuf[10];
//2、发送到本地处理
JZsdl_Uart_ObtainSearchLight_Mode(UART_4G, value);
JZsdl_Uart_ObtainSearchLight_Mode(UART_DEV_1, value);
}
/*********
... ... @@ -1640,7 +1774,7 @@ static int Uart_4G_RecvDeal_ObtainSearchLight_Lumen(char *getbuf)
int value2 = getbuf[10];
//2、发送到本地处理
JZsdl_Uart_ObtainSearchLight_Lumen(UART_4G, value1, value2);
JZsdl_Uart_ObtainSearchLight_Lumen(UART_DEV_1, value1, value2);
}
/*********
... ... @@ -1659,7 +1793,7 @@ static int Uart_4G_RecvDeal_ObtainSearchLight_Temperature(char *getbuf)
int value2 = getbuf[10];
//2、发送到本地处理
JZsdl_Uart_ObtainSearchLight_Temperature(UART_4G, value1, value2);
JZsdl_Uart_ObtainSearchLight_Temperature(UART_DEV_1, value1, value2);
}
/*********
... ... @@ -1690,7 +1824,7 @@ static int Uart_4G_RecvDeal_ObtainGimbal_Pitch(char *getbuf)
}
//2、发送到本地处理
JZsdl_Uart_RecvDeal_ObtainGimbal_Pitch(UART_4G, Gimbal_angle);
JZsdl_Uart_RecvDeal_ObtainGimbal_Pitch(UART_DEV_1, Gimbal_angle);
}
/*********
... ... @@ -1721,7 +1855,7 @@ static int Uart_4G_RecvDeal_ObtainGimbal_Yaw(char *getbuf)
}
//2、发送到本地处理
JZsdl_Uart_RecvDeal_ObtainGimbal_Yaw(UART_4G, Gimbal_angle);
JZsdl_Uart_RecvDeal_ObtainGimbal_Yaw(UART_DEV_1, Gimbal_angle);
}
/*********
... ... @@ -1750,7 +1884,7 @@ static int Uart_4G_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf)
pitch = -pitch;
}
JZsdl_Uart_ObtainGimbalPitchFineTuning(UART_4G, FrameSequence, pitch);
JZsdl_Uart_ObtainGimbalPitchFineTuning(UART_DEV_1, FrameSequence, pitch);
}
/*********
... ... @@ -1769,7 +1903,7 @@ static int Uart_4G_RecvDeal_ObtainWaringlight_Status(char *getbuf)
int value2 = getbuf[10];
//2、发送到本地处理
JZsdl_Uart_RecvDeal_ObtainWaringlight_Status(UART_4G, value1, value2);
JZsdl_Uart_RecvDeal_ObtainWaringlight_Status(UART_DEV_1, value1, value2);
}
/*********
... ... @@ -1788,7 +1922,7 @@ static int Uart_4G_RecvDeal_ObtainWaringlight_Color(char *getbuf)
int value2 = getbuf[10];
//2、发送到本地处理
JZsdl_Uart_RecvDeal_ObtainWaringlight_Color(UART_4G, value1, value2);
JZsdl_Uart_RecvDeal_ObtainWaringlight_Color(UART_DEV_1, value1, value2);
}
/*********
... ... @@ -1843,7 +1977,7 @@ static int Uart_4G_RecvDeal_QuerySecondaryDeviceName(char *getbuf)
int SecondaryName = JZsdk_Uart_GetSecondaryDeviceName();
//3、回复当前从设备名
JZsdk_Uart_SendDeal_Reply_SecondaryDeviceName(UART_4G ,SecondaryName, FrameSequence);
JZsdk_Uart_SendDeal_Reply_SecondaryDeviceName(UART_DEV_1 ,SecondaryName, FrameSequence);
}
/*******************************************************************************************************************************
... ... @@ -1865,16 +1999,16 @@ static int Uart_4G_RecvDeal_SetGimbalRange(char *getbuf)
//1、通过数据帧2,获取设置的大小值
int value = getbuf[10] ;
T_JZsdkReturnCode ret = JZsdk_Uart_SetGimbalRange(UART_4G, value);
T_JZsdkReturnCode ret = JZsdk_Uart_SetGimbalRange(UART_DEV_1, value);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1894,7 +2028,7 @@ static int Uart_4G_RecvDeal_GimbalLinkageControl(char *getbuf)
int value = getbuf[10] ;
//2、设置
JZsdk_Uart_GimbalLinkageControl(UART_4G, FrameSequence, value);
JZsdk_Uart_GimbalLinkageControl(UART_DEV_1, FrameSequence, value);
}
... ... @@ -1911,7 +2045,7 @@ static int Uart_4G_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//查询是否开启云台联动
JZsdk_Uart_Checkstatus_GimbalLinkage(UART_4G, FrameSequence);
JZsdk_Uart_Checkstatus_GimbalLinkage(UART_DEV_1, FrameSequence);
}
static int Uart_4G_RecvDeal_UartBitrateChange(char *getbuf)
... ... @@ -1952,7 +2086,7 @@ static int Uart_4G_RecvDeal_UartBitrateChange(char *getbuf)
break;
}
JZsdk_Uart_BitRateChange(UART_4G, BitRate);
JZsdk_Uart_BitRateChange(UART_DEV_1, BitRate);
}
/********************************************************************************************************
... ... @@ -1991,12 +2125,12 @@ static int Uart_4G_RecvDeal_ObtainSecondaryDeviceName(char *getbuf)
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -2020,7 +2154,7 @@ static int Uart_4G_RecvDeal_ObtainGimbalLinkage(char *getbuf)
int value1 = getbuf[10];
//2、保存
JZsdk_Uart_ObtainGimbalLinkage(UART_4G,FrameSequence,value1);
JZsdk_Uart_ObtainGimbalLinkage(UART_DEV_1,FrameSequence,value1);
}
... ... @@ -2050,7 +2184,7 @@ static int Uart_4G_RecvDeal_FrameErrorReply(char *getbuf)
JZSDK_LOG_ERROR("帧指令错误:帧错误或者是帧无对应操作\n");
//无法正常获取帧的序列号
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, 0x00);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, 0x00);
}
... ... @@ -2090,7 +2224,7 @@ static int Uart_4G_RecvDeal_OperationFailed(char *getbuf)
*********************************************************************************************************/
int Uart_4G_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len)
{
JZSDK_LOG_INFO("串口设备4G,接受到的模式为:%x",Receive_mode);
JZSDK_LOG_INFO("串口设备4g,接受到的模式为:%x",Receive_mode);
switch (Receive_mode)
{
/*******************************************************************************************************************************
... ... @@ -2110,8 +2244,8 @@ int Uart_4G_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len)
return 0;
break;
//语音传输处理
case JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION:
Uart_4G_RecvDeal_RealTimeMP2_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION:
Uart_4G_RecvDeal_RealTimeMP2_Unlimit_transmission(getdata, len);
return 0;
break;
//关闭语音传输
... ... @@ -2119,17 +2253,30 @@ int Uart_4G_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len)
Uart_4G_RecvDeal_RealTimeMP2_stop(getdata);
return 0;
break;
//定长mp2语音
case JZ_INSCODE_5AFRAME_REALTIMEMP2_LIMIT_TRANSMISSION:
Uart_4G_RecvDeal_RealTimeMP2_Limit_transmission(getdata, len);
return 0;
break;
//打开音频文件上传
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_START:
Uart_4G_RecvDeal_SaveAudioFileTrans_start(getdata, len);
return 0;
break;
//传输音频文件
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION:
Uart_4G_RecvDeal_SaveAudioFileTrans_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION:
Uart_4G_RecvDeal_SaveAudioFileTrans_UnlimitTransmission(getdata, len);
return 0;
break;
//传输定长音频文件
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_LIMIT_TRANSMISSION:
Uart_4G_RecvDeal_SaveAudioFileTrans_LimitTransmission(getdata, len);
return 0;
break;
//关闭音频文件上传
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_STOP:
Uart_4G_RecvDeal_SaveAudioFileTrans_stop(getdata);
... ... @@ -2267,11 +2414,19 @@ int Uart_4G_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len)
Uart_4G_RecvDeal_OpusTrans_start(getdata);
return 0;
break;
//传输opus
case JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION:
Uart_4G_RecvDeal_OpusTrans_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION:
Uart_4G_RecvDeal_OpusTrans_UnlimitTransmission(getdata, len);
return 0;
break;
//传输定长opus文件数据
case JZ_INSCODE_5AFRAME_OPUS_TRANS_LIMIT_TRANSMISSION:
Uart_4G_RecvDeal_OpusTrans_LimitTransmission(getdata, len);
return 0;
break;
//关闭opus传输
case JZ_INSCODE_5AFRAME_OPUS_TRANS_STOP:
Uart_4G_RecvDeal_OpusTrans_stop(getdata);
... ... @@ -2291,8 +2446,14 @@ int Uart_4G_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len)
break;
//传输opus实时喊话数据
case JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION:
Uart_4G_RecvDeal_Opus_RealTimeVoice_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION:
Uart_4G_RecvDeal_Opus_RealTimeVoice_UnlimitTransmission(getdata, len);
return 0;
break;
//传输定长opus实时喊话数据
case JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_LIMIT_TRANSMISSION:
Uart_4G_RecvDeal_Opus_RealTimeVoice_LimitTransmission(getdata, len);
return 0;
break;
... ... @@ -2330,10 +2491,17 @@ int Uart_4G_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len)
return 0;
break;
//TTS传输中
case JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION:
Uart_4G_RecvDeal_TTS_Trans_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION:
Uart_4G_RecvDeal_TTS_Trans_UnlimitTransmission(getdata, len);
return 0;
break;
//定长TTS传输中
case JZ_INSCODE_5AFRAME_TTS_TRANS_LIMIT_TRANSMISSION:
Uart_4G_RecvDeal_TTS_Trans_LimitTransmission(getdata, len);
return 0;
break;
//TTS传输关闭
case JZ_INSCODE_5AFRAME_TTS_TRANS_STOP:
Uart_4G_RecvDeal_TTS_Trans_stop(getdata);
... ... @@ -2594,11 +2762,11 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_4G(unsigned char *getbuf, int len)
{
Uart_4G_RecvDeal_RecvDeal(flag, getbuf, len);
//如果不处于5大传输模式
if ((UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION ) //语音传输模式
&& (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION) //音频文件传输模式
&& (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION) //opus传输模式
&& (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION) //opus实时语音传输模式
&& (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION)) //TTS传输模式)
if ((UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION ) //语音传输模式
&& (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION) //音频文件传输模式
&& (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION) //opus传输模式
&& (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION) //opus实时语音传输模式
&& (UART_4G_Receive_mode != JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION)) //TTS传输模式)
{
//刷新模式
UART_4G_Receive_mode = flag;
... ... @@ -2608,11 +2776,11 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_4G(unsigned char *getbuf, int len)
//否则 如果处于传输传输过程 处理模式 正常录入数据
else if (flag == JZ_ERROR_SYSTEM_FRAME_ERROR
&& ((UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION ) //语音传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION) //音频文件传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION) //opus传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION) //opus实时语音传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION))) //TTS传输模式)
&& ((UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION ) //语音传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION) //音频文件传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION) //opus传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION) //opus实时语音传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION))) //TTS传输模式)
{
Uart_4G_RecvDeal_RecvDeal(UART_4G_Receive_mode, getbuf, len);
}
... ... @@ -2629,7 +2797,7 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_4G(unsigned char *getbuf, int len)
* ****************/
int JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(int value)
{
JZSDK_LOG_INFO("串口设备4G,二次修改接收模式%x\n",value);
JZSDK_LOG_INFO("串口设备4g,二次修改接收模式%x\n",value);
UART_4G_Receive_mode = value;
return 0;
}
... ... @@ -2641,11 +2809,11 @@ int JZsdk_Uart_RecvDeal_Set_UART_4G_ReceiveMode(int value)
*/
static T_JZsdkReturnCode JZsdk_Uart_RecvDeal_UART_4G_TransmodeDecide()
{
if ((UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION ) //语音传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION) //音频文件传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION) //opus传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION) //opus实时语音传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION)) //TTS传输模式)
if ((UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION ) //mp2语音无限制传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION) //音频文件无限制传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION) //opus无限制传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION) //opus实时语音无限制传输模式
|| (UART_4G_Receive_mode == JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION)) //TTS无限制传输模式)
{
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
... ...
... ... @@ -69,7 +69,7 @@ static int Uart_DEV1_RecvDeal_AskForConnect(char *getbuf)
**********/
static T_JZsdkReturnCode Uart_DEV1_RecvDeal_RealTimeMP2_start(char *getbuf)
{
JZSDK_LOG_DEBUG("开启MP2实时喊话功能\n");
JZSDK_LOG_INFO("开启MP2实时喊话功能\n");
T_JZsdkReturnCode ret;
//获取帧的序列号
... ... @@ -86,7 +86,7 @@ static T_JZsdkReturnCode Uart_DEV1_RecvDeal_RealTimeMP2_start(char *getbuf)
}
//1、修改接收模式
JZsdk_Uart_RecvDeal_Set_UART_DEV1_ReceiveMode(JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_DEV1_ReceiveMode(JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION);
//2、获取码率倍率 默认8k
int RateMagnification = (int)getbuf[9];
... ... @@ -121,7 +121,7 @@ static T_JZsdkReturnCode Uart_DEV1_RecvDeal_RealTimeMP2_start(char *getbuf)
*
*
**********/
static int Uart_DEV1_RecvDeal_RealTimeMP2_transmission(char *getdata, int len)
static int Uart_DEV1_RecvDeal_RealTimeMP2_Unlimit_transmission(char *getdata, int len)
{
JZSDK_LOG_INFO("MP2实时喊话传输中\n");
T_JZsdkReturnCode ret;
... ... @@ -130,6 +130,31 @@ static int Uart_DEV1_RecvDeal_RealTimeMP2_transmission(char *getdata, int len)
ret = JZsdk_Uart_RealTimeMP2_Trans(getdata, len);
}
/*********
*
* 语音MP2实时喊话有限传输中
*
*
**********/
static int Uart_DEV1_RecvDeal_RealTimeMP2_Limit_transmission(char *getdata, int len)
{
JZSDK_LOG_INFO("MP2实时喊话有限制传输中\n");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 128)
{
JZSDK_LOG_ERROR("传输得到的mp2实时数据帧长度超出128上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//传输数据接口
ret = JZsdk_Uart_RealTimeMP2_Trans(getdata+9, DataLen);
}
/*********
*
* 关闭语音MP2发送功能
... ... @@ -138,13 +163,13 @@ static int Uart_DEV1_RecvDeal_RealTimeMP2_transmission(char *getdata, int len)
**********/
static T_JZsdkReturnCode Uart_DEV1_RecvDeal_RealTimeMP2_stop(char *getbuf)
{
JZSDK_LOG_DEBUG("关闭MP2实时喊话功能\n");
JZSDK_LOG_INFO("关闭MP2实时喊话功能\n");
T_JZsdkReturnCode ret;
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION)
if ((UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION) )
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
... ... @@ -208,7 +233,7 @@ static T_JZsdkReturnCode Uart_DEV1_RecvDeal_SaveAudioFileTrans_start(char *getbu
}
//3、调整接收模式为音频文件传输
JZsdk_Uart_RecvDeal_Set_UART_DEV1_ReceiveMode(JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_DEV1_ReceiveMode(JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION);
//4、回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
... ... @@ -216,28 +241,53 @@ static T_JZsdkReturnCode Uart_DEV1_RecvDeal_SaveAudioFileTrans_start(char *getbu
}
/*********
*
* 传输音频文件中
* 传输无限制音频文件中
*
*
**********/
static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int len)
static T_JZsdkReturnCode Uart_DEV1_RecvDeal_SaveAudioFileTrans_UnlimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("传输音频文件中\n");
JZsdk_Uart_SaveAudioFileTrans(getdata, len);
}
/*********
*
* 传输定长音频文件中
*
*
**********/
static T_JZsdkReturnCode Uart_DEV1_RecvDeal_SaveAudioFileTrans_LimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("传输定长音频文件中\n");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 128)
{
JZSDK_LOG_ERROR("传输得到的定长音频文帧长度超出128上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//传输数据接口
ret = JZsdk_Uart_SaveAudioFileTrans(getdata+9, DataLen);
}
/*********
*
* 关闭音频文件上传
*
*
**********/
static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_stop(char *getbuf)
static T_JZsdkReturnCode Uart_DEV1_RecvDeal_SaveAudioFileTrans_stop(char *getbuf)
{
JZSDK_LOG_INFO("开始传输的音频文件保存\n");
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION)
if (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
... ... @@ -912,7 +962,7 @@ static T_JZsdkReturnCode Uart_DEV1_RecvDeal_TTS_Trans_start(char *getbuf)
TTS_Recv_buffer_length = 0;
//3、将接收模式设置为接收TTS数据模式
JZsdk_Uart_RecvDeal_Set_UART_DEV1_ReceiveMode(JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_DEV1_ReceiveMode(JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
... ... @@ -923,7 +973,7 @@ static T_JZsdkReturnCode Uart_DEV1_RecvDeal_TTS_Trans_start(char *getbuf)
*
*
**********/
static int Uart_DEV1_RecvDeal_TTS_Trans_transmission(char *getdata, int len)
static int Uart_DEV1_RecvDeal_TTS_Trans_UnlimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("tts传输中");
... ... @@ -940,6 +990,38 @@ static int Uart_DEV1_RecvDeal_TTS_Trans_transmission(char *getdata, int len)
JZSDK_LOG_ERROR("TTS字数超出1000字节");
}
}
/***********
*
* tts定长传输中
*
* ***/
static T_JZsdkReturnCode Uart_DEV1_RecvDeal_TTS_Trans_LimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("tts定长传输中");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 128)
{
JZSDK_LOG_ERROR("tts定长帧,单帧数据长度超出128上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
if (TTS_Recv_buffer_length+DataLen < 1000)
{
//1、将新的数据 放入缓冲区
memcpy(TTS_Recv_buffer+TTS_Recv_buffer_length, getdata+9, DataLen);
//2、记录已加载的长度
TTS_Recv_buffer_length = TTS_Recv_buffer_length + DataLen;
}
else
{
JZSDK_LOG_ERROR("TTS总字数超出1000字节");
}
}
/*********
*
... ... @@ -953,7 +1035,7 @@ static T_JZsdkReturnCode Uart_DEV1_RecvDeal_TTS_Trans_stop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION)
if (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION)
{
JZSDK_LOG_INFO("未刷新文本,TTS播放%s",TTS_Recv_buffer);
... ... @@ -1012,7 +1094,7 @@ static T_JZsdkReturnCode Uart_DEV1_RecvDeal_OpusTrans_start(char *getbuf)
JZsdk_Uart_SaveOpusStart(decode_rate);
//3、修改接收模式为传输opus
JZsdk_Uart_RecvDeal_Set_UART_DEV1_ReceiveMode(JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_DEV1_ReceiveMode(JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION);
JZSDK_LOG_INFO("已完成打开opus传输处理\n");
... ... @@ -1021,16 +1103,42 @@ static T_JZsdkReturnCode Uart_DEV1_RecvDeal_OpusTrans_start(char *getbuf)
}
/*********
*
* opus传输
* opus不定长传输
*
*
**********/
static int Uart_DEV1_RecvDeal_OpusTrans_transmission(char *SaveData, int size)
static int Uart_DEV1_RecvDeal_OpusTrans_UnlimitTransmission(char *SaveData, int size)
{
JZsdk_Uart_SaveOpusTrans(SaveData,size);
JZSDK_LOG_INFO("已完成opus传输保存处理\n");
}
/*********
*
* opus定长传输文件
*
*
**********/
static T_JZsdkReturnCode Uart_DEV1_RecvDeal_OpusTrans_LimitTransmission(char *getdata, int size)
{
JZSDK_LOG_INFO("传输opus定长音频文件中\n");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 400)
{
JZSDK_LOG_ERROR("传输得到的opus定长音频文件帧长度超出400上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//传输数据接口
ret = JZsdk_Uart_SaveOpusTrans(getdata+9, DataLen);
}
/*********
*
* opus结束传输
... ... @@ -1043,7 +1151,7 @@ static int Uart_DEV1_RecvDeal_OpusTrans_stop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION)
if (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
... ... @@ -1112,7 +1220,7 @@ static T_JZsdkReturnCode Uart_DEV1_RecvDeal_Opus_RealTimeVoice_start(char *getbu
}
//1、修改接收模式
JZsdk_Uart_RecvDeal_Set_UART_DEV1_ReceiveMode(JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_DEV1_ReceiveMode(JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION);
//2、获取码率倍率 默认8k*1倍
int RateMagnification = (int)getbuf[9];
... ... @@ -1136,16 +1244,42 @@ static T_JZsdkReturnCode Uart_DEV1_RecvDeal_Opus_RealTimeVoice_start(char *getbu
/*********
*
* opus实时语音传输中
* opus实时语音无限制传输中
*
*
**********/
static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int len)
static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_UnlimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("opus语音传输中\n");
JZsdk_Uart_RealTimeVoiceTrans(getdata, len);
}
/*********
*
* opus实时语音定长传输中
*
*
**********/
static T_JZsdkReturnCode Uart_DEV1_RecvDeal_Opus_RealTimeVoice_LimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("传输opus定长语音传输中\n");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 80)
{
JZSDK_LOG_ERROR("opus实时语音定长传输帧数据长度超出80上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//传输数据接口
ret = JZsdk_Uart_RealTimeVoiceTrans(getdata+9, DataLen);
}
/*********
*
* 关闭opus实时语音发送功能
... ... @@ -1158,7 +1292,7 @@ static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION)
if (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
... ... @@ -1582,26 +1716,6 @@ static int Uart_DEV1_RecvDeal_CheckStatus_WarningLightColor(char *getbuf)
* 设备相关
*
* *******************************************************************************************************************************/
/*********
*
* 收到连接回复帧
*
**********/
static int Uart_DEV1_RecvDeal_ObtainConnectFrame(char *getbuf)
{
JZSDK_LOG_INFO("收到连接回复帧\n");
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//1、通过数据帧2,获取值
int value = getbuf[9];
//2、发送到本地处理
JZsdl_Uart_ObtainConnectFrame(UART_DEV_1, value);
}
/*******************************************************************************************************************************
*
... ... @@ -2130,8 +2244,8 @@ int Uart_DEV1_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le
return 0;
break;
//语音传输处理
case JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION:
Uart_DEV1_RecvDeal_RealTimeMP2_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION:
Uart_DEV1_RecvDeal_RealTimeMP2_Unlimit_transmission(getdata, len);
return 0;
break;
//关闭语音传输
... ... @@ -2139,17 +2253,30 @@ int Uart_DEV1_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le
Uart_DEV1_RecvDeal_RealTimeMP2_stop(getdata);
return 0;
break;
//定长mp2语音
case JZ_INSCODE_5AFRAME_REALTIMEMP2_LIMIT_TRANSMISSION:
Uart_DEV1_RecvDeal_RealTimeMP2_Limit_transmission(getdata, len);
return 0;
break;
//打开音频文件上传
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_START:
Uart_DEV1_RecvDeal_SaveAudioFileTrans_start(getdata, len);
return 0;
break;
//传输音频文件
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION:
Uart_DEV1_RecvDeal_SaveAudioFileTrans_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION:
Uart_DEV1_RecvDeal_SaveAudioFileTrans_UnlimitTransmission(getdata, len);
return 0;
break;
//传输定长音频文件
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_LIMIT_TRANSMISSION:
Uart_DEV1_RecvDeal_SaveAudioFileTrans_LimitTransmission(getdata, len);
return 0;
break;
//关闭音频文件上传
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_STOP:
Uart_DEV1_RecvDeal_SaveAudioFileTrans_stop(getdata);
... ... @@ -2287,11 +2414,19 @@ int Uart_DEV1_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le
Uart_DEV1_RecvDeal_OpusTrans_start(getdata);
return 0;
break;
//传输opus
case JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION:
Uart_DEV1_RecvDeal_OpusTrans_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION:
Uart_DEV1_RecvDeal_OpusTrans_UnlimitTransmission(getdata, len);
return 0;
break;
//传输定长opus文件数据
case JZ_INSCODE_5AFRAME_OPUS_TRANS_LIMIT_TRANSMISSION:
Uart_DEV1_RecvDeal_OpusTrans_LimitTransmission(getdata, len);
return 0;
break;
//关闭opus传输
case JZ_INSCODE_5AFRAME_OPUS_TRANS_STOP:
Uart_DEV1_RecvDeal_OpusTrans_stop(getdata);
... ... @@ -2311,8 +2446,14 @@ int Uart_DEV1_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le
break;
//传输opus实时喊话数据
case JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION:
Uart_DEV1_RecvDeal_Opus_RealTimeVoice_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION:
Uart_DEV1_RecvDeal_Opus_RealTimeVoice_UnlimitTransmission(getdata, len);
return 0;
break;
//传输定长opus实时喊话数据
case JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_LIMIT_TRANSMISSION:
Uart_DEV1_RecvDeal_Opus_RealTimeVoice_LimitTransmission(getdata, len);
return 0;
break;
... ... @@ -2350,10 +2491,17 @@ int Uart_DEV1_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le
return 0;
break;
//TTS传输中
case JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION:
Uart_DEV1_RecvDeal_TTS_Trans_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION:
Uart_DEV1_RecvDeal_TTS_Trans_UnlimitTransmission(getdata, len);
return 0;
break;
//定长TTS传输中
case JZ_INSCODE_5AFRAME_TTS_TRANS_LIMIT_TRANSMISSION:
Uart_DEV1_RecvDeal_TTS_Trans_LimitTransmission(getdata, len);
return 0;
break;
//TTS传输关闭
case JZ_INSCODE_5AFRAME_TTS_TRANS_STOP:
Uart_DEV1_RecvDeal_TTS_Trans_stop(getdata);
... ... @@ -2438,11 +2586,6 @@ int Uart_DEV1_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le
* 5B类部分
*
* *******************************************************************************************************************************/
//连接回复
case JZ_INSCODE_5BFRAME_INITIATECONNECT:
Uart_DEV1_RecvDeal_ObtainConnectFrame(getdata);
break;
//回复灯光频率
case JZ_INSCODE_5BFRAME_CHECKSTATUS_SEARCHLIGHT_FREQUENCY:
Uart_DEV1_RecvDeal_ObtainSearchLight_Frequency(getdata);
... ... @@ -2619,11 +2762,11 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV1(unsigned char *getbuf, int len)
{
Uart_DEV1_RecvDeal_RecvDeal(flag, getbuf, len);
//如果不处于5大传输模式
if ((UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION ) //语音传输模式
&& (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION) //音频文件传输模式
&& (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION) //opus传输模式
&& (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION) //opus实时语音传输模式
&& (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION)) //TTS传输模式)
if ((UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION ) //语音传输模式
&& (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION) //音频文件传输模式
&& (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION) //opus传输模式
&& (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION) //opus实时语音传输模式
&& (UART_DEV1_Receive_mode != JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION)) //TTS传输模式)
{
//刷新模式
UART_DEV1_Receive_mode = flag;
... ... @@ -2633,11 +2776,11 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV1(unsigned char *getbuf, int len)
//否则 如果处于传输传输过程 处理模式 正常录入数据
else if (flag == JZ_ERROR_SYSTEM_FRAME_ERROR
&& ((UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION ) //语音传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION) //音频文件传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION) //opus传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION) //opus实时语音传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION))) //TTS传输模式)
&& ((UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION ) //语音传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION) //音频文件传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION) //opus传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION) //opus实时语音传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION))) //TTS传输模式)
{
Uart_DEV1_RecvDeal_RecvDeal(UART_DEV1_Receive_mode, getbuf, len);
}
... ... @@ -2666,11 +2809,11 @@ int JZsdk_Uart_RecvDeal_Set_UART_DEV1_ReceiveMode(int value)
*/
static T_JZsdkReturnCode JZsdk_Uart_RecvDeal_UART_DEV1_TransmodeDecide()
{
if ((UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION ) //语音传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION) //音频文件传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION) //opus传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION) //opus实时语音传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION)) //TTS传输模式)
if ((UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION ) //mp2语音无限制传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION) //音频文件无限制传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION) //opus无限制传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION) //opus实时语音无限制传输模式
|| (UART_DEV1_Receive_mode == JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION)) //TTS无限制传输模式)
{
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
... ...
... ... @@ -41,7 +41,7 @@ static T_JZsdkReturnCode JZsdk_Uart_RecvDeal_UART_DEV2_TransmodeDecide();
**********/
static int Uart_DEV2_RecvDeal_AskForConnect(char *getbuf)
{
JZSDK_LOG_INFO("串口设备2号,连接成功");
JZSDK_LOG_INFO("串口设备4g,连接成功");
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
... ... @@ -49,10 +49,10 @@ static int Uart_DEV2_RecvDeal_AskForConnect(char *getbuf)
int Device_name = JZsdk_Uart_GetVersionReplay();
//3、回复连接成功
JZsdk_Uart_SendDeal_Send_Connect(UART_DEV_2, Device_name);
JZsdk_Uart_SendDeal_Send_Connect(UART_DEV_1, Device_name);
//1、将串口程序设置为连接模式
//JZsdk_Uart_SetMainWorkMode(JZ_FLAGCODE_ON);
JZsdk_Uart_SetMainWorkMode(JZ_FLAGCODE_ON);
}
/*******************************************************************************************************************************
... ... @@ -79,14 +79,14 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_RealTimeMP2_start(char *getbuf)
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("开启MP2实时喊话功能失败\n");
return ret;
}
//1、修改接收模式
JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION);
//2、获取码率倍率 默认8k
int RateMagnification = (int)getbuf[9];
... ... @@ -106,12 +106,12 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_RealTimeMP2_start(char *getbuf)
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//4、回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//4、回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -121,7 +121,7 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_RealTimeMP2_start(char *getbuf)
*
*
**********/
static int Uart_DEV2_RecvDeal_RealTimeMP2_transmission(char *getdata, int len)
static int Uart_DEV2_RecvDeal_RealTimeMP2_Unlimit_transmission(char *getdata, int len)
{
JZSDK_LOG_INFO("MP2实时喊话传输中\n");
T_JZsdkReturnCode ret;
... ... @@ -130,6 +130,31 @@ static int Uart_DEV2_RecvDeal_RealTimeMP2_transmission(char *getdata, int len)
ret = JZsdk_Uart_RealTimeMP2_Trans(getdata, len);
}
/*********
*
* 语音MP2实时喊话有限传输中
*
*
**********/
static int Uart_DEV2_RecvDeal_RealTimeMP2_Limit_transmission(char *getdata, int len)
{
JZSDK_LOG_INFO("MP2实时喊话有限制传输中\n");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 128)
{
JZSDK_LOG_ERROR("传输得到的mp2实时数据帧长度超出128上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//传输数据接口
ret = JZsdk_Uart_RealTimeMP2_Trans(getdata+9, DataLen);
}
/*********
*
* 关闭语音MP2发送功能
... ... @@ -144,10 +169,10 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_RealTimeMP2_stop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION)
if ((UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION) )
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("操作失败,mp2传输未开始,无法关闭");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
... ... @@ -161,12 +186,12 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_RealTimeMP2_stop(char *getbuf)
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//4、回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//4、回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -186,7 +211,7 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_SaveAudioFileTrans_start(char *getbu
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("开始传输的音频文件保存失败");
return ret;
}
... ... @@ -203,44 +228,69 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_SaveAudioFileTrans_start(char *getbu
ret = JZsdk_Uart_SaveAudioFileStart(FileName);
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
return -1;
}
//3、调整接收模式为音频文件传输
JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION);
//4、回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
* 传输音频文件中
* 传输无限制音频文件中
*
*
**********/
static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int len)
static T_JZsdkReturnCode Uart_DEV2_RecvDeal_SaveAudioFileTrans_UnlimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("传输音频文件中\n");
JZsdk_Uart_SaveAudioFileTrans(getdata, len);
}
/*********
*
* 传输定长音频文件中
*
*
**********/
static T_JZsdkReturnCode Uart_DEV2_RecvDeal_SaveAudioFileTrans_LimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("传输定长音频文件中\n");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 128)
{
JZSDK_LOG_ERROR("传输得到的定长音频文帧长度超出128上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//传输数据接口
ret = JZsdk_Uart_SaveAudioFileTrans(getdata+9, DataLen);
}
/*********
*
* 关闭音频文件上传
*
*
**********/
static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_stop(char *getbuf)
static T_JZsdkReturnCode Uart_DEV2_RecvDeal_SaveAudioFileTrans_stop(char *getbuf)
{
JZSDK_LOG_INFO("开始传输的音频文件保存\n");
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION)
if (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("关闭音频文件上传失败,音频文件上传未开始,无法关闭");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
... ... @@ -252,7 +302,7 @@ static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_stop(char *getbuf)
JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_STOP);
//2、回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -281,16 +331,16 @@ static int Uart_DEV2_RecvDeal_audio_PlayFile(char *getbuf)
JZSDK_LOG_INFO("播放指定音频:%s\n",music_name);
ret = JZsdk_Uart_PlayMusic(UART_DEV_2, music_name, datasize);
ret = JZsdk_Uart_PlayMusic(UART_DEV_1, music_name, datasize);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//4、回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//4、回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
/*********
... ... @@ -305,10 +355,10 @@ static int Uart_DEV2_RecvDeal_audio_PlayContinue(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_audio_PlayContinue(UART_DEV_2);
JZsdk_Uart_audio_PlayContinue(UART_DEV_1);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
... ... @@ -322,10 +372,10 @@ static int Uart_DEV2_RecvDeal_audio_PlayPause(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_audio_PlayPause(UART_DEV_2);
JZsdk_Uart_audio_PlayPause(UART_DEV_1);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
... ... @@ -339,10 +389,10 @@ static int Uart_DEV2_RecvDeal_audio_PlayStop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_audio_PlayStop(UART_DEV_2);
JZsdk_Uart_audio_PlayStop(UART_DEV_1);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -357,10 +407,10 @@ static int Uart_DEV2_RecvDeal_audio_LastSong(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_audio_LastSong(UART_DEV_2);
JZsdk_Uart_audio_LastSong(UART_DEV_1);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -375,10 +425,10 @@ static int Uart_DEV2_RecvDeal_audio_NextSong(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_audio_NextSong(UART_DEV_2);
JZsdk_Uart_audio_NextSong(UART_DEV_1);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -394,7 +444,7 @@ static int Uart_DEV2_RecvDeal_audio_GetMusicList(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//0、刷新歌曲列表
JZsdk_Uart_Flush_MusicList();
... ... @@ -411,16 +461,16 @@ static int Uart_DEV2_RecvDeal_audio_GetMusicList(char *getbuf)
}
//3、发送开始帧
JZsdk_Uart_SendDeal_Reply_Musiclist_start(UART_DEV_2, music_sum);
JZsdk_Uart_SendDeal_Reply_Musiclist_start(UART_DEV_1, music_sum);
//4、逐一调用发送函数将歌曲名发出
for (int i = 0; i < music_sum; i++)
{
JZsdk_Uart_SendDeal_Reply_Musiclist(UART_DEV_2, MusicName[i], MusicNameLength[i]);
JZsdk_Uart_SendDeal_Reply_Musiclist(UART_DEV_1, MusicName[i], MusicNameLength[i]);
}
//5、发送结束帧
JZsdk_Uart_SendDeal_Reply_Musiclist_end(UART_DEV_2);
JZsdk_Uart_SendDeal_Reply_Musiclist_end(UART_DEV_1);
}
/*********
... ... @@ -438,7 +488,7 @@ static int Uart_DEV2_RecvDeal_Amplifier_stop(char *getbuf)
JZsdk_Uart_Set_Amplifier(JZ_FLAGCODE_OFF);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -456,7 +506,7 @@ static int Uart_DEV2_RecvDeal_Amplifier_open(char *getbuf)
JZsdk_Uart_Set_Amplifier(JZ_FLAGCODE_ON);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -483,10 +533,10 @@ static int Uart_DEV2_RecvDeal_SetVolume(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
int value = (int)getbuf[9];
JZsdk_Uart_Set_Volume(UART_DEV_2, value);
JZsdk_Uart_Set_Volume(UART_DEV_1, value);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -505,10 +555,10 @@ static int Uart_DEV2_RecvDeal_CheckStatus_volume(char *getbuf)
int volume = JZsdk_Uart_CheckStatus_volume();
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送音量
JZsdk_Uart_SendDeal_Reply_Volume(UART_DEV_2, volume);
JZsdk_Uart_SendDeal_Reply_Volume(UART_DEV_1, volume);
}
/*********
... ... @@ -530,10 +580,10 @@ static int Uart_DEV2_RecvDeal_CheckStatus_play(char *getbuf)
ret = JZsdk_Uart_CheckStatus_play();
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送播放状态
JZsdk_Uart_SendDeal_Send_PlayStatus(UART_DEV_2, ret);
JZsdk_Uart_SendDeal_Send_PlayStatus(UART_DEV_1, ret);
}
/*********
... ... @@ -556,7 +606,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_gimbal(char *getbuf)
JZsdk_Uart_CheckStatus_gimbal(&PitchAngle, &YawAngle);
//2、发送本地云台值
JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(UART_DEV_2, PitchAngle);
JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(UART_DEV_1, PitchAngle);
}
/*********
*
... ... @@ -569,7 +619,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_GimbalFineTuning(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_CheckStatus_GimbalFineTuning(UART_DEV_2, FrameSequence);
JZsdk_Uart_CheckStatus_GimbalFineTuning(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -593,10 +643,10 @@ static int Uart_DEV2_RecvDeal_CheckStatus_PLayFileName(char *getbuf)
JZSDK_LOG_INFO("当前播放的是%s %d\n",MusicName, MusicName_Len);
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送名字
JZsdk_Uart_SendDeal_Reply_MusicName(UART_DEV_2, MusicName,MusicName_Len);
JZsdk_Uart_SendDeal_Reply_MusicName(UART_DEV_1, MusicName,MusicName_Len);
}
/*********
*
... ... @@ -621,10 +671,10 @@ static int Uart_DEV2_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf)
JZSDK_LOG_INFO("当前的软件版本号为:%2x, %2x, %2x, %2x",majorVersion, minorVersion, modifyVersion, debugVersion);
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送版本号
JZsdk_Uart_SendDeal_Reply_SoftVersion(UART_DEV_2, majorVersion, minorVersion, modifyVersion, debugVersion);
JZsdk_Uart_SendDeal_Reply_SoftVersion(UART_DEV_1, majorVersion, minorVersion, modifyVersion, debugVersion);
}
/*********
*
... ... @@ -648,10 +698,10 @@ static int Uart_DEV2_RecvDeal_CheckStatus_LoopPlay(char *getbuf)
}
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送循环状态
JZsdk_Uart_SendDeal_Reply_LoopPlayStatus(UART_DEV_2 ,LoopStatus);
JZsdk_Uart_SendDeal_Reply_LoopPlayStatus(UART_DEV_1 ,LoopStatus);
}
/*********
*
... ... @@ -675,10 +725,10 @@ static int Uart_DEV2_RecvDeal_CheckStatus_TTS_tone(char *getbuf)
}
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送音色
JZsdk_Uart_SendDeal_Reply_TTS_tone(UART_DEV_2 ,TTS_tone);
JZsdk_Uart_SendDeal_Reply_TTS_tone(UART_DEV_1 ,TTS_tone);
}
/*********
... ... @@ -703,10 +753,10 @@ static int Uart_DEV2_RecvDeal_CheckStatus_TTS_speed(char *getbuf)
}
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
//2、发送语速
JZsdk_Uart_SendDeal_Reply_TTS_speed(UART_DEV_2 ,TTS_speed);
JZsdk_Uart_SendDeal_Reply_TTS_speed(UART_DEV_1 ,TTS_speed);
}
... ... @@ -734,10 +784,10 @@ static int Uart_DEV2_RecvDeal_PlayLoop(char *getbuf)
mode = JZ_FLAGCODE_OFF;
}
JZsdk_Uart_audio_PlayLoop(UART_DEV_2, mode);
JZsdk_Uart_audio_PlayLoop(UART_DEV_1, mode);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
... ... @@ -772,7 +822,7 @@ static int Uart_DEV2_RecvDeal_Delete_Audio(char *getbuf)
JZsdk_Uart_Flush_MusicList();
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
... ... @@ -805,7 +855,7 @@ static int Uart_DEV2_RecvDeal_Delete_VoiceRecord(char *getbuf)
JZsdk_Uart_Flush_MusicList();
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
... ... @@ -832,16 +882,16 @@ static int Uart_DEV2_RecvDeal_TTS_SetTone(char *getbuf)
int tone = (int)getbuf[9];
//2、设置音色
T_JZsdkReturnCode ret = JZsdk_Uart_TTS_SetTone(UART_DEV_2, tone);
T_JZsdkReturnCode ret = JZsdk_Uart_TTS_SetTone(UART_DEV_1, tone);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
/*********
... ... @@ -864,21 +914,21 @@ static int Uart_DEV2_RecvDeal_TTS_SetSpeed(char *getbuf)
JZSDK_LOG_INFO("语速超出范围\n");
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
return -1 ;
}
//2、设置语速
T_JZsdkReturnCode ret = JZsdk_Uart_TTS_SetSpeed(UART_DEV_2, speed);
T_JZsdkReturnCode ret = JZsdk_Uart_TTS_SetSpeed(UART_DEV_1, speed);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
/*********
... ... @@ -900,7 +950,7 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_TTS_Trans_start(char *getbuf)
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("tts开始传输失败");
return ret;
}
... ... @@ -912,10 +962,10 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_TTS_Trans_start(char *getbuf)
TTS_Recv_buffer_length = 0;
//3、将接收模式设置为接收TTS数据模式
JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
... ... @@ -923,7 +973,7 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_TTS_Trans_start(char *getbuf)
*
*
**********/
static int Uart_DEV2_RecvDeal_TTS_Trans_transmission(char *getdata, int len)
static int Uart_DEV2_RecvDeal_TTS_Trans_UnlimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("tts传输中");
... ... @@ -940,6 +990,38 @@ static int Uart_DEV2_RecvDeal_TTS_Trans_transmission(char *getdata, int len)
JZSDK_LOG_ERROR("TTS字数超出1000字节");
}
}
/***********
*
* tts定长传输中
*
* ***/
static T_JZsdkReturnCode Uart_DEV2_RecvDeal_TTS_Trans_LimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("tts定长传输中");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 128)
{
JZSDK_LOG_ERROR("tts定长帧,单帧数据长度超出128上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
if (TTS_Recv_buffer_length+DataLen < 1000)
{
//1、将新的数据 放入缓冲区
memcpy(TTS_Recv_buffer+TTS_Recv_buffer_length, getdata+9, DataLen);
//2、记录已加载的长度
TTS_Recv_buffer_length = TTS_Recv_buffer_length + DataLen;
}
else
{
JZSDK_LOG_ERROR("TTS总字数超出1000字节");
}
}
/*********
*
... ... @@ -953,15 +1035,15 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_TTS_Trans_stop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION)
if (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION)
{
JZSDK_LOG_INFO("未刷新文本,TTS播放%s",TTS_Recv_buffer);
//3、播放TTS
JZsdk_Uart_TTS_Play(UART_DEV_2, TTS_Recv_buffer, TTS_Recv_buffer_length);
JZsdk_Uart_TTS_Play(UART_DEV_1, TTS_Recv_buffer, TTS_Recv_buffer_length);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
... ... @@ -973,10 +1055,10 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_TTS_Trans_stop(char *getbuf)
JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(JZ_INSCODE_5AFRAME_TTS_TRANS_STOP);
//3、播放TTS
JZsdk_Uart_TTS_Play(UART_DEV_2, TTS_Recv_buffer, TTS_Recv_buffer_length);
JZsdk_Uart_TTS_Play(UART_DEV_1, TTS_Recv_buffer, TTS_Recv_buffer_length);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
... ... @@ -996,7 +1078,7 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_OpusTrans_start(char *getbuf)
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("打开opus传输失败");
return ret;
}
... ... @@ -1012,25 +1094,51 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_OpusTrans_start(char *getbuf)
JZsdk_Uart_SaveOpusStart(decode_rate);
//3、修改接收模式为传输opus
JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION);
JZSDK_LOG_INFO("已完成打开opus传输处理\n");
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
* opus传输
* opus不定长传输
*
*
**********/
static int Uart_DEV2_RecvDeal_OpusTrans_transmission(char *SaveData, int size)
static int Uart_DEV2_RecvDeal_OpusTrans_UnlimitTransmission(char *SaveData, int size)
{
JZsdk_Uart_SaveOpusTrans(SaveData,size);
JZSDK_LOG_INFO("已完成opus传输保存处理\n");
}
/*********
*
* opus定长传输文件
*
*
**********/
static T_JZsdkReturnCode Uart_DEV2_RecvDeal_OpusTrans_LimitTransmission(char *getdata, int size)
{
JZSDK_LOG_INFO("传输opus定长音频文件中\n");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 128)
{
JZSDK_LOG_ERROR("传输得到的opus定长音频文件帧长度超出128上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//传输数据接口
ret = JZsdk_Uart_SaveOpusTrans(getdata+9, DataLen);
}
/*********
*
* opus结束传输
... ... @@ -1043,10 +1151,10 @@ static int Uart_DEV2_RecvDeal_OpusTrans_stop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION)
if (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("关闭opus结束传输失败,opus结束传输未开始,无法关闭");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
... ... @@ -1059,7 +1167,7 @@ static int Uart_DEV2_RecvDeal_OpusTrans_stop(char *getbuf)
JZSDK_LOG_INFO("结束opus传输处理\n");
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
... ... @@ -1077,15 +1185,15 @@ static int Uart_DEV2_RecvDeal_OpusPlay(char *getbuf)
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("opus播放失败,存在传输模式打开中");
return ret;
}
JZsdk_Uart_Opus_PlayFixedFile(UART_DEV_2);
JZsdk_Uart_Opus_PlayFixedFile(UART_DEV_1);
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
... ... @@ -1106,13 +1214,13 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_Opus_RealTimeVoice_start(char *getbu
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("开启opus实时喊话失败");
return ret;
}
//1、修改接收模式
JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION);
JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION);
//2、获取码率倍率 默认8k*1倍
int RateMagnification = (int)getbuf[9];
... ... @@ -1131,21 +1239,47 @@ static T_JZsdkReturnCode Uart_DEV2_RecvDeal_Opus_RealTimeVoice_start(char *getbu
JZsdk_Uart_RealTimeVoiceStart(Rate);
//4、通知成功打开语音发送模式
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
/*********
*
* opus实时语音传输中
* opus实时语音无限制传输中
*
*
**********/
static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int len)
static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_UnlimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("opus语音传输中\n");
JZsdk_Uart_RealTimeVoiceTrans(getdata, len);
}
/*********
*
* opus实时语音定长传输中
*
*
**********/
static T_JZsdkReturnCode Uart_DEV2_RecvDeal_Opus_RealTimeVoice_LimitTransmission(char *getdata, int len)
{
JZSDK_LOG_INFO("传输opus定长语音传输中\n");
T_JZsdkReturnCode ret;
//提取出数据
int DataLen = ((int)getdata[3] << 8 ) + (int)getdata[4] - 2 - 9;
if (DataLen > 80)
{
JZSDK_LOG_ERROR("opus实时语音定长传输帧数据长度超出80上限");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//传输数据接口
ret = JZsdk_Uart_RealTimeVoiceTrans(getdata+9, DataLen);
}
/*********
*
* 关闭opus实时语音发送功能
... ... @@ -1158,10 +1292,10 @@ static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
if (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION)
if (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION)
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
JZSDK_LOG_ERROR("关闭opus实时语音发送功能失败,opus实时语音发送功能未开始,无法关闭");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
... ... @@ -1173,7 +1307,7 @@ static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf)
JZsdk_Uart_RealTimeVoiceClose();
//3、通知成功关闭语音发送模式
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
... ... @@ -1215,22 +1349,22 @@ static int Uart_DEV2_RecvDeal_Gimbal_PitchControl(char *getbuf)
{
JZSDK_LOG_INFO("云台输入角度符号错误,无法正常控制");
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
JZSDK_LOG_INFO("处理得到的角度是%d",Gimbal_angle);
T_JZsdkReturnCode ret = JZsdk_Uart_Gimbal_PitchControl(UART_DEV_2, Gimbal_angle);
T_JZsdkReturnCode ret = JZsdk_Uart_Gimbal_PitchControl(UART_DEV_1, Gimbal_angle);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1265,13 +1399,13 @@ static int Uart_DEV2_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf)
{
JZSDK_LOG_INFO("云台俯仰微调角度符号错误,无法正常控制");
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
JZSDK_LOG_INFO("处理得到云台俯仰微调角度是%d",Gimbal_angle);
JZsdk_Uart_Gimbal_PitchFineTuningControl(UART_DEV_2, FrameSequence ,Gimbal_angle);
JZsdk_Uart_Gimbal_PitchFineTuningControl(UART_DEV_1, FrameSequence ,Gimbal_angle);
}
... ... @@ -1297,16 +1431,16 @@ static int Uart_DEV2_RecvDeal_SearchLight_SetFrequency(char *getbuf)
//1、通过数据帧2,获取爆闪频率
int Frequency = getbuf[10];
T_JZsdkReturnCode ret = JZsdk_Uart_Lighting_SetSearchLightFrequency(UART_DEV_2, Frequency);
T_JZsdkReturnCode ret = JZsdk_Uart_Lighting_SetSearchLightFrequency(UART_DEV_1, Frequency);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1324,16 +1458,16 @@ static int Uart_DEV2_RecvDeal_SearchLight_Control(char *getbuf)
//1、通过数据帧2,获取灯光控制模式
int value = getbuf[10];
T_JZsdkReturnCode ret = JZsdk_Uart_SearchLight_Control(UART_DEV_2, value);
T_JZsdkReturnCode ret = JZsdk_Uart_SearchLight_Control(UART_DEV_1, value);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1352,16 +1486,16 @@ static int Uart_DEV2_RecvDeal_SearchLight_Lumen(char *getbuf)
int LeftLumen = getbuf[9]; //左灯亮度
int RightLumen = getbuf[10]; //右灯亮度
T_JZsdkReturnCode ret = JZsdk_Uart_SearchLight_Lumen(UART_DEV_2, LeftLumen, RightLumen);
T_JZsdkReturnCode ret = JZsdk_Uart_SearchLight_Lumen(UART_DEV_1, LeftLumen, RightLumen);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1377,7 +1511,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//2、查询灯光属性
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_SearchLightLightAttribute(UART_DEV_2, FrameSequence);
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_SearchLightLightAttribute(UART_DEV_1, FrameSequence);
}
... ... @@ -1393,7 +1527,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//2、查询探照灯温度
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_SearchLightTemperture(UART_DEV_2, FrameSequence);
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_SearchLightTemperture(UART_DEV_1, FrameSequence);
}
/*********
... ... @@ -1410,16 +1544,16 @@ static int Uart_DEV2_RecvDeal_SearchLight_SubscriptionControl(char *getbuf)
//1、通过数据帧2,获取控制值
int value = getbuf[10];
T_JZsdkReturnCode ret = JZsdk_Uart_SearchLight_SubscriptionControl(UART_DEV_2, value);
T_JZsdkReturnCode ret = JZsdk_Uart_SearchLight_SubscriptionControl(UART_DEV_1, value);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1434,7 +1568,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_SerialNumber(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
JZsdk_Uart_CheckStatus_SerialNumber(UART_DEV_2, FrameSequence);
JZsdk_Uart_CheckStatus_SerialNumber(UART_DEV_1, FrameSequence);
}
... ... @@ -1453,7 +1587,7 @@ static int Uart_DEV2_RecvDeal_OutPutPower_Control(char *getbuf)
int Value = getbuf[9];
//控制
JZsdk_Uart_OutPutPower_Control(UART_DEV_2, FrameSequence, Value);
JZsdk_Uart_OutPutPower_Control(UART_DEV_1, FrameSequence, Value);
}
/*********
... ... @@ -1469,7 +1603,7 @@ static int Uart_DEV2_RecvDeal_Checkstatus_OutPutPower(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//获取本地数值
JZsdk_Uart_Checkstatus_OutPutPower(UART_DEV_2, FrameSequence);
JZsdk_Uart_Checkstatus_OutPutPower(UART_DEV_1, FrameSequence);
}
/*******************************************************************************************************************************
... ... @@ -1492,16 +1626,16 @@ static int Uart_DEV2_RecvDeal_WarningLight_ModeControl(char *getbuf)
int value1 = getbuf[9];
int value2 = getbuf[10];
T_JZsdkReturnCode ret = JZsdk_Uart_WarningLight_ModeControl(UART_DEV_2, value1, value2);
T_JZsdkReturnCode ret = JZsdk_Uart_WarningLight_ModeControl(UART_DEV_1, value1, value2);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1520,16 +1654,16 @@ static int Uart_DEV2_RecvDeal_WarningLight_SetColor(char *getbuf)
int value1 = getbuf[9];
int value2 = getbuf[10];
T_JZsdkReturnCode ret = JZsdk_Uart_WarningLight_SetColor(UART_DEV_2, value1, value2);
T_JZsdkReturnCode ret = JZsdk_Uart_WarningLight_SetColor(UART_DEV_1, value1, value2);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1545,7 +1679,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//2、查询灯光属性
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_WarningLightStatus(UART_DEV_2, FrameSequence);
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_WarningLightStatus(UART_DEV_1, FrameSequence);
}
... ... @@ -1561,7 +1695,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_WarningLightColor(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//2、查询灯光属性
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_WarningLightColor(UART_DEV_2, FrameSequence);
T_JZsdkReturnCode ret = JZsdk_Uart_CheckStatus_WarningLightColor(UART_DEV_1, FrameSequence);
}
/********************************************************************************************************
... ... @@ -1603,7 +1737,7 @@ static int Uart_DEV2_RecvDeal_ObtainSearchLight_Frequency(char *getbuf)
int value = getbuf[10];
//2、发送到本地处理
JZsdl_Uart_ObtainSearchLight_Frequency(UART_DEV_2, value);
JZsdl_Uart_ObtainSearchLight_Frequency(UART_DEV_1, value);
}
/*********
... ... @@ -1621,7 +1755,7 @@ static int Uart_DEV2_RecvDeal_ObtainSearchLight_Mode(char *getbuf)
int value = getbuf[10];
//2、发送到本地处理
JZsdl_Uart_ObtainSearchLight_Mode(UART_DEV_2, value);
JZsdl_Uart_ObtainSearchLight_Mode(UART_DEV_1, value);
}
/*********
... ... @@ -1640,7 +1774,7 @@ static int Uart_DEV2_RecvDeal_ObtainSearchLight_Lumen(char *getbuf)
int value2 = getbuf[10];
//2、发送到本地处理
JZsdl_Uart_ObtainSearchLight_Lumen(UART_DEV_2, value1, value2);
JZsdl_Uart_ObtainSearchLight_Lumen(UART_DEV_1, value1, value2);
}
/*********
... ... @@ -1659,7 +1793,7 @@ static int Uart_DEV2_RecvDeal_ObtainSearchLight_Temperature(char *getbuf)
int value2 = getbuf[10];
//2、发送到本地处理
JZsdl_Uart_ObtainSearchLight_Temperature(UART_DEV_2, value1, value2);
JZsdl_Uart_ObtainSearchLight_Temperature(UART_DEV_1, value1, value2);
}
/*********
... ... @@ -1690,7 +1824,7 @@ static int Uart_DEV2_RecvDeal_ObtainGimbal_Pitch(char *getbuf)
}
//2、发送到本地处理
JZsdl_Uart_RecvDeal_ObtainGimbal_Pitch(UART_DEV_2, Gimbal_angle);
JZsdl_Uart_RecvDeal_ObtainGimbal_Pitch(UART_DEV_1, Gimbal_angle);
}
/*********
... ... @@ -1721,7 +1855,7 @@ static int Uart_DEV2_RecvDeal_ObtainGimbal_Yaw(char *getbuf)
}
//2、发送到本地处理
JZsdl_Uart_RecvDeal_ObtainGimbal_Yaw(UART_DEV_2, Gimbal_angle);
JZsdl_Uart_RecvDeal_ObtainGimbal_Yaw(UART_DEV_1, Gimbal_angle);
}
/*********
... ... @@ -1750,7 +1884,7 @@ static int Uart_DEV2_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf)
pitch = -pitch;
}
JZsdl_Uart_ObtainGimbalPitchFineTuning(UART_DEV_2, FrameSequence, pitch);
JZsdl_Uart_ObtainGimbalPitchFineTuning(UART_DEV_1, FrameSequence, pitch);
}
/*********
... ... @@ -1769,7 +1903,7 @@ static int Uart_DEV2_RecvDeal_ObtainWaringlight_Status(char *getbuf)
int value2 = getbuf[10];
//2、发送到本地处理
JZsdl_Uart_RecvDeal_ObtainWaringlight_Status(UART_DEV_2, value1, value2);
JZsdl_Uart_RecvDeal_ObtainWaringlight_Status(UART_DEV_1, value1, value2);
}
/*********
... ... @@ -1788,7 +1922,7 @@ static int Uart_DEV2_RecvDeal_ObtainWaringlight_Color(char *getbuf)
int value2 = getbuf[10];
//2、发送到本地处理
JZsdl_Uart_RecvDeal_ObtainWaringlight_Color(UART_DEV_2, value1, value2);
JZsdl_Uart_RecvDeal_ObtainWaringlight_Color(UART_DEV_1, value1, value2);
}
/*********
... ... @@ -1843,7 +1977,7 @@ static int Uart_DEV2_RecvDeal_QuerySecondaryDeviceName(char *getbuf)
int SecondaryName = JZsdk_Uart_GetSecondaryDeviceName();
//3、回复当前从设备名
JZsdk_Uart_SendDeal_Reply_SecondaryDeviceName(UART_DEV_2 ,SecondaryName, FrameSequence);
JZsdk_Uart_SendDeal_Reply_SecondaryDeviceName(UART_DEV_1 ,SecondaryName, FrameSequence);
}
/*******************************************************************************************************************************
... ... @@ -1865,16 +1999,16 @@ static int Uart_DEV2_RecvDeal_SetGimbalRange(char *getbuf)
//1、通过数据帧2,获取设置的大小值
int value = getbuf[10] ;
T_JZsdkReturnCode ret = JZsdk_Uart_SetGimbalRange(UART_DEV_2, value);
T_JZsdkReturnCode ret = JZsdk_Uart_SetGimbalRange(UART_DEV_1, value);
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -1894,7 +2028,7 @@ static int Uart_DEV2_RecvDeal_GimbalLinkageControl(char *getbuf)
int value = getbuf[10] ;
//2、设置
JZsdk_Uart_GimbalLinkageControl(UART_DEV_2, FrameSequence, value);
JZsdk_Uart_GimbalLinkageControl(UART_DEV_1, FrameSequence, value);
}
... ... @@ -1911,7 +2045,7 @@ static int Uart_DEV2_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//查询是否开启云台联动
JZsdk_Uart_Checkstatus_GimbalLinkage(UART_DEV_2, FrameSequence);
JZsdk_Uart_Checkstatus_GimbalLinkage(UART_DEV_1, FrameSequence);
}
static int Uart_DEV2_RecvDeal_UartBitrateChange(char *getbuf)
... ... @@ -1952,7 +2086,7 @@ static int Uart_DEV2_RecvDeal_UartBitrateChange(char *getbuf)
break;
}
JZsdk_Uart_BitRateChange(UART_DEV_2, BitRate);
JZsdk_Uart_BitRateChange(UART_DEV_1, BitRate);
}
/********************************************************************************************************
... ... @@ -1991,12 +2125,12 @@ static int Uart_DEV2_RecvDeal_ObtainSecondaryDeviceName(char *getbuf)
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
//回复操作成功
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
}
else
{
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence);
}
}
... ... @@ -2020,7 +2154,7 @@ static int Uart_DEV2_RecvDeal_ObtainGimbalLinkage(char *getbuf)
int value1 = getbuf[10];
//2、保存
JZsdk_Uart_ObtainGimbalLinkage(UART_DEV_2,FrameSequence,value1);
JZsdk_Uart_ObtainGimbalLinkage(UART_DEV_1,FrameSequence,value1);
}
... ... @@ -2050,7 +2184,7 @@ static int Uart_DEV2_RecvDeal_FrameErrorReply(char *getbuf)
JZSDK_LOG_ERROR("帧指令错误:帧错误或者是帧无对应操作\n");
//无法正常获取帧的序列号
//回复操作失败
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, 0x00);
JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, 0x00);
}
... ... @@ -2090,7 +2224,7 @@ static int Uart_DEV2_RecvDeal_OperationFailed(char *getbuf)
*********************************************************************************************************/
int Uart_DEV2_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len)
{
JZSDK_LOG_INFO("串口设备2号,接受到的模式为:%x",Receive_mode);
JZSDK_LOG_INFO("串口设备4g,接受到的模式为:%x",Receive_mode);
switch (Receive_mode)
{
/*******************************************************************************************************************************
... ... @@ -2110,8 +2244,8 @@ int Uart_DEV2_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le
return 0;
break;
//语音传输处理
case JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION:
Uart_DEV2_RecvDeal_RealTimeMP2_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION:
Uart_DEV2_RecvDeal_RealTimeMP2_Unlimit_transmission(getdata, len);
return 0;
break;
//关闭语音传输
... ... @@ -2119,17 +2253,30 @@ int Uart_DEV2_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le
Uart_DEV2_RecvDeal_RealTimeMP2_stop(getdata);
return 0;
break;
//定长mp2语音
case JZ_INSCODE_5AFRAME_REALTIMEMP2_LIMIT_TRANSMISSION:
Uart_DEV2_RecvDeal_RealTimeMP2_Limit_transmission(getdata, len);
return 0;
break;
//打开音频文件上传
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_START:
Uart_DEV2_RecvDeal_SaveAudioFileTrans_start(getdata, len);
return 0;
break;
//传输音频文件
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION:
Uart_DEV2_RecvDeal_SaveAudioFileTrans_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION:
Uart_DEV2_RecvDeal_SaveAudioFileTrans_UnlimitTransmission(getdata, len);
return 0;
break;
//传输定长音频文件
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_LIMIT_TRANSMISSION:
Uart_DEV2_RecvDeal_SaveAudioFileTrans_LimitTransmission(getdata, len);
return 0;
break;
//关闭音频文件上传
case JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_STOP:
Uart_DEV2_RecvDeal_SaveAudioFileTrans_stop(getdata);
... ... @@ -2267,11 +2414,19 @@ int Uart_DEV2_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le
Uart_DEV2_RecvDeal_OpusTrans_start(getdata);
return 0;
break;
//传输opus
case JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION:
Uart_DEV2_RecvDeal_OpusTrans_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION:
Uart_DEV2_RecvDeal_OpusTrans_UnlimitTransmission(getdata, len);
return 0;
break;
//传输定长opus文件数据
case JZ_INSCODE_5AFRAME_OPUS_TRANS_LIMIT_TRANSMISSION:
Uart_DEV2_RecvDeal_OpusTrans_LimitTransmission(getdata, len);
return 0;
break;
//关闭opus传输
case JZ_INSCODE_5AFRAME_OPUS_TRANS_STOP:
Uart_DEV2_RecvDeal_OpusTrans_stop(getdata);
... ... @@ -2291,8 +2446,14 @@ int Uart_DEV2_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le
break;
//传输opus实时喊话数据
case JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION:
Uart_DEV2_RecvDeal_Opus_RealTimeVoice_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION:
Uart_DEV2_RecvDeal_Opus_RealTimeVoice_UnlimitTransmission(getdata, len);
return 0;
break;
//传输定长opus实时喊话数据
case JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_LIMIT_TRANSMISSION:
Uart_DEV2_RecvDeal_Opus_RealTimeVoice_LimitTransmission(getdata, len);
return 0;
break;
... ... @@ -2330,10 +2491,17 @@ int Uart_DEV2_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le
return 0;
break;
//TTS传输中
case JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION:
Uart_DEV2_RecvDeal_TTS_Trans_transmission(getdata, len);
case JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION:
Uart_DEV2_RecvDeal_TTS_Trans_UnlimitTransmission(getdata, len);
return 0;
break;
//定长TTS传输中
case JZ_INSCODE_5AFRAME_TTS_TRANS_LIMIT_TRANSMISSION:
Uart_DEV2_RecvDeal_TTS_Trans_LimitTransmission(getdata, len);
return 0;
break;
//TTS传输关闭
case JZ_INSCODE_5AFRAME_TTS_TRANS_STOP:
Uart_DEV2_RecvDeal_TTS_Trans_stop(getdata);
... ... @@ -2594,11 +2762,11 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV2(unsigned char *getbuf, int len)
{
Uart_DEV2_RecvDeal_RecvDeal(flag, getbuf, len);
//如果不处于5大传输模式
if ((UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION ) //语音传输模式
&& (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION) //音频文件传输模式
&& (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION) //opus传输模式
&& (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION) //opus实时语音传输模式
&& (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION)) //TTS传输模式)
if ((UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION ) //语音传输模式
&& (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION) //音频文件传输模式
&& (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION) //opus传输模式
&& (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION) //opus实时语音传输模式
&& (UART_DEV2_Receive_mode != JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION)) //TTS传输模式)
{
//刷新模式
UART_DEV2_Receive_mode = flag;
... ... @@ -2608,11 +2776,11 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV2(unsigned char *getbuf, int len)
//否则 如果处于传输传输过程 处理模式 正常录入数据
else if (flag == JZ_ERROR_SYSTEM_FRAME_ERROR
&& ((UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION ) //语音传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION) //音频文件传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION) //opus传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION) //opus实时语音传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION))) //TTS传输模式)
&& ((UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION ) //语音传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION) //音频文件传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION) //opus传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION) //opus实时语音传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION))) //TTS传输模式)
{
Uart_DEV2_RecvDeal_RecvDeal(UART_DEV2_Receive_mode, getbuf, len);
}
... ... @@ -2629,7 +2797,7 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV2(unsigned char *getbuf, int len)
* ****************/
int JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(int value)
{
JZSDK_LOG_INFO("串口设备2号,二次修改接收模式%x\n",value);
JZSDK_LOG_INFO("串口设备4g,二次修改接收模式%x\n",value);
UART_DEV2_Receive_mode = value;
return 0;
}
... ... @@ -2641,11 +2809,11 @@ int JZsdk_Uart_RecvDeal_Set_UART_DEV2_ReceiveMode(int value)
*/
static T_JZsdkReturnCode JZsdk_Uart_RecvDeal_UART_DEV2_TransmodeDecide()
{
if ((UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_REALTIMEMP2_TRANSMISSION ) //语音传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_TRANSMISSION) //音频文件传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION) //opus传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_TRANSMISSION) //opus实时语音传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_TTS_TRANS_TRANSMISSION)) //TTS传输模式)
if ((UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_REALTIMEMP2_UNLIMIT_TRANSMISSION ) //mp2语音无限制传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_AUDIOFILE_TRANS_UNLIMIT_TRANSMISSION) //音频文件无限制传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_TRAN_UNLIMIT_TRANSMISSION) //opus无限制传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_OPUS_REALTIMEVOICE_UNLIMIT_TRANSMISSION) //opus实时语音无限制传输模式
|| (UART_DEV2_Receive_mode == JZ_INSCODE_5AFRAME_TTS_TRANS_UNLIMIT_TRANSMISSION)) //TTS无限制传输模式)
{
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
... ...
... ... @@ -8,31 +8,13 @@
#include "Jzsdk_Base/JZsdk_FrameComparsion/JZsdk_FrameComparsion.h"
//发送任务
static int JZsdk_Uart_SendDeal_SendOrder(int UartPort ,char *sendbuf, int len)
static int JZsdk_Uart_SendDeal_SendOreder(int UartPort ,char *sendbuf, int len)
{
JZsdk_Uart_UartSend(UartPort, sendbuf, len);
}
//发送自由帧
int JZsdk_Uart_SendDeal_Send_CustomOrder(int UartPort, char *sendbuf, int len)
{
JZsdk_Uart_UartSend(UartPort, sendbuf, len);
}
//发送连接帧
int JZsdk_Uart_SendDeal_Send_ConnectFrame(int Uartport)
{
char sendbuf[256];
int send_buf_len;
//1、获取帧样板
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_ASKFORCONNECT , sendbuf, &send_buf_len);
//2、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
}
//发送回复连接帧
int JZsdk_Uart_SendDeal_Send_Connect(int Uartport ,int Version_flag)
{
char sendbuf[256];
... ... @@ -45,7 +27,7 @@ int JZsdk_Uart_SendDeal_Send_Connect(int Uartport ,int Version_flag)
sendbuf[9] = Version_flag;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//发送成功帧
... ... @@ -61,7 +43,7 @@ int JZsdk_Uart_SendDeal_Reply_Sucesss(int Uartport ,int FrameSequence)
sendbuf[6] = FrameSequence; //帧序列
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//发送失败帧
... ... @@ -77,7 +59,7 @@ int JZsdk_Uart_SendDeal_Reply_Failure(int Uartport ,int FrameSequence)
sendbuf[6] = FrameSequence; //帧序列
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//发送当前从设备名
... ... @@ -94,7 +76,7 @@ int JZsdk_Uart_SendDeal_Reply_SecondaryDeviceName(int Uartport , int device_name
sendbuf[10] = device_name;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
... ... @@ -111,7 +93,7 @@ int JZsdk_Uart_SendDeal_QuerySecondaryDeviceName(int Uartport ,int FrameSequence
sendbuf[6] = FrameSequence; //帧序列
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//发送当前设备序列号
... ... @@ -138,7 +120,7 @@ int JZsdk_Uart_SendDeal_SerialNumber(int UartPort, int FrameSequence, char *Seri
send_buf_len = 25;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(UartPort ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(UartPort ,sendbuf, send_buf_len);
}
... ... @@ -162,7 +144,7 @@ int JZsdk_Uart_SendDeal_Reply_Musiclist(int Uartport ,char *music_name, int musi
sendbuf[4] = len & 0xff;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, len);
}
//发送歌曲列表开始帧
... ... @@ -179,7 +161,7 @@ int JZsdk_Uart_SendDeal_Reply_Musiclist_start(int Uartport ,int num)
sendbuf[9] = num;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
... ... @@ -197,7 +179,7 @@ int JZsdk_Uart_SendDeal_Reply_Musiclist_end(int Uartport)
//2、写入数据
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//发送播放状态结束帧
... ... @@ -213,7 +195,7 @@ int JZsdk_Uart_SendDeal_Send_PlayStatus_end(int Uartport)
//2、写入数据
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//发送播放状态帧
... ... @@ -246,7 +228,7 @@ int JZsdk_Uart_SendDeal_Send_PlayStatus(int Uartport ,int num)
sendbuf[9] = (char)num;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//回复当前播放的歌曲名字
... ... @@ -270,7 +252,7 @@ int JZsdk_Uart_SendDeal_Reply_MusicName(int Uartport ,char *music_name, int musi
sendbuf[4] = len & 0xff;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, len);
}
//回复当前音量
... ... @@ -287,7 +269,7 @@ int JZsdk_Uart_SendDeal_Reply_Volume(int Uartport ,int num)
sendbuf[9] = (char)num;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
... ... @@ -310,7 +292,7 @@ int JZsdk_Uart_SendDeal_Reply_SoftVersion(int Uartport ,char majorVersion, char
sendbuf[12] = debugVersion;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//发送循环状态
... ... @@ -328,7 +310,7 @@ int JZsdk_Uart_SendDeal_Reply_LoopPlayStatus(int Uartport ,int status)
sendbuf[9] = status;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
... ... @@ -347,7 +329,7 @@ int JZsdk_Uart_SendDeal_Reply_TTS_tone(int Uartport ,int tone)
sendbuf[9] = tone;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//发送语速
... ... @@ -365,7 +347,7 @@ int JZsdk_Uart_SendDeal_Reply_TTS_speed(int Uartport ,int speed)
sendbuf[9] = speed;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
/****************************************************************************************************************************************************
... ... @@ -397,7 +379,7 @@ int JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(int Uartport ,int angle)
sendbuf[11] = (char)(angle & 255);
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//设置当前云台角度
... ... @@ -425,7 +407,7 @@ int JZsdk_Uart_SendDeal_Set_GimbalPitchAngle(int Uartport ,int angle)
sendbuf[11] = (angle & 0xff);
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//查询云台角度
... ... @@ -442,7 +424,7 @@ int JZsdk_Uart_SendDeal_CheckStatus_GimbalAngle(int Uartport ,int FrameSequence)
sendbuf[6] = FrameSequence;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//微调云台pitch
... ... @@ -470,7 +452,7 @@ int JZsdk_Uart_SendDeal_Set_GimbalFineTuningPitch(int Uartport, int PitchFineTun
sendbuf[11] = (PitchFineTuning & 0xff);
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//查询云台角度微调值
... ... @@ -487,7 +469,7 @@ int JZsdk_Uart_SendDeal_CheckStatus_GimbalFineTuningPitch(int Uartport, int Fram
sendbuf[6] = FrameSequence; //帧序列
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//回复云台pitch微调值
... ... @@ -515,7 +497,7 @@ int JZsdk_Uart_SendDeal_Reply_GimbalFineTuningPitch(int Uartport, int FrameSeque
sendbuf[11] = (FineTunigPitch & 0xff);
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//设置云台联动
... ... @@ -533,7 +515,7 @@ int JZsdk_Uart_SendDeal_Set_GimbalLinkageControl(int Uartport,int FrameSequence,
sendbuf[10] = value;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//查询云台联动值
... ... @@ -550,7 +532,7 @@ int JZsdk_Uart_SendDeal_CheckStatus_GimbalLinkage(int Uartport,int FrameSequence
sendbuf[6] = FrameSequence; //帧序列
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//发送云台联动值
... ... @@ -568,7 +550,7 @@ int JZsdk_Uart_SendDeal_GimbalLinkageControl(int Uartport,int FrameSequence,int
sendbuf[10] = value;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//发送云台最大最小值帧
... ... @@ -586,7 +568,7 @@ int JZsdk_Uart_SendDeal_SetGimbalRange(int Uartport,int FrameSequence,int value)
sendbuf[10] = value;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
/****************************************************************************************************************************************************
... ... @@ -610,7 +592,7 @@ int JZsdk_Uart_SendDeal_Set_SearchLightFrequency(int Uartport ,int Frequency)
sendbuf[10] = Frequency;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//设置探照灯控制
... ... @@ -628,7 +610,7 @@ int JZsdk_Uart_SendDeal_SearchLight_Control(int Uartport,int mode)
sendbuf[10] = mode;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//设置探照灯亮度
... ... @@ -647,7 +629,7 @@ int JZsdk_Uart_SendDeal_SearchLight_SetLumen(int Uartport, int LeftLumen, int
sendbuf[10] = RightLumen;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//发送
... ... @@ -664,7 +646,7 @@ int JZsdk_Uart_SendDeal_Set_SearchLight_CheckStatus_Frequency(int Uartport)
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_CHECKSTATUS_SEARCHLIGHT_FREQUENCY, sendbuf, &send_buf_len);
//2、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//查询探照灯亮度
... ... @@ -679,7 +661,7 @@ int JZsdk_Uart_SendDeal_Set_SearchLight_CheckStatus_Lumen(int Uartport)
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_CHECKSTATUS_SEARCHLIGHT_LUMEN, sendbuf, &send_buf_len);
//2、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//查询探照灯模式
... ... @@ -694,7 +676,7 @@ int JZsdk_Uart_SendDeal_Set_SearchLight_CheckStatus_Mode(int Uartport)
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_CHECKSTATUS_SEARCHLIGHT_MODE, sendbuf, &send_buf_len);
//2、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//查询探照灯属性
... ... @@ -709,7 +691,7 @@ int JZsdk_Uart_SendDeal_CheckStatus_LightAttribute(int Uartport)
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_CHECKSTATUS_SEARCHLIGHT_LIGHTATTRIBUTE, sendbuf, &send_buf_len);
//2、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//查询探照灯温度
... ... @@ -724,7 +706,7 @@ int JZsdk_Uart_SendDeal_CheckStatus_SearchLightTemperture(int Uartport)
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_CHECKSTATUS_SEARCHLIGHT_TEMPERATURE, sendbuf, &send_buf_len);
//2、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//开启消息订阅
... ... @@ -742,7 +724,7 @@ int JZsdk_Uart_SendDeal_MessageSubcription_Control(int Uartport, int value)
sendbuf[10] = value;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
/****************************************************************************************************************************************************
... ... @@ -770,7 +752,7 @@ int JZsdk_Uart_SendDeal_Set_WarningLight_Status(int Uartport,int status, int mod
sendbuf[10] = mode;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
/*************
... ... @@ -793,7 +775,7 @@ int JZsdk_Uart_SendDeal_Set_WarningLight_Color(int Uartport,int color1, int colo
sendbuf[10] = color2;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//查询警灯状态
... ... @@ -808,7 +790,7 @@ int JZsdk_Uart_SendDeal_CheckStatus_WarningLightStatus(int Uartport)
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_CHECKSTATUS_WARNINGLIGHT_STATUS, sendbuf, &send_buf_len);
//2、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//查询警灯颜色
... ... @@ -823,7 +805,7 @@ int JZsdk_Uart_SendDeal_CheckStatus_WarningLightColor(int Uartport)
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_CHECKSTATUS_WARNINGLIGHT_COLOR, sendbuf, &send_buf_len);
//2、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
/****************************************************************************************************************************************************
... ... @@ -850,7 +832,7 @@ int JZsdk_Uart_SendDeal_SearchLight_Frequency(int Uartport, int Frequency)
sendbuf[10] = Frequency;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
/*************
... ... @@ -872,7 +854,7 @@ int JZsdk_Uart_SendDeal_SearchLight_Mode(int Uartport, int mode)
sendbuf[10] = mode;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
/*************
... ... @@ -895,7 +877,7 @@ int JZsdk_Uart_SendDeal_SearchLight_Lumen(int Uartport,int LeftLumen, int RightL
sendbuf[10] = RightLumen;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
/*************
... ... @@ -918,7 +900,7 @@ int JZsdk_Uart_SendDeal_SearchLight_Temperature(int Uartport, int LeftTemperatur
sendbuf[10] = RightTemperature;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
... ... @@ -942,7 +924,7 @@ int JZsdk_Uart_SendDeal_WarningLight_Status(int Uartport, int status, int mode)
sendbuf[10] = mode;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len); }
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); }
/*************
*
... ... @@ -964,7 +946,7 @@ int JZsdk_Uart_SendDeal_WarningLight_Color(int Uartport, int color1, int color2)
sendbuf[10] = color2;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
/*************
... ... @@ -986,5 +968,5 @@ int JZsdk_Uart_SendDeal_OutputPowerStatus(int Uartport, int FrameSequence, int s
sendbuf[9] = status;
//3、发送帧
JZsdk_Uart_SendDeal_SendOrder(Uartport ,sendbuf, send_buf_len);
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
\ No newline at end of file
... ...
... ... @@ -22,8 +22,6 @@ extern "C" {
/* Exported types ------------------------------------------------------------*/
int JZsdk_Uart_SendDeal_Send_Connect(int Uartport ,int Version_flag);
int JZsdk_Uart_SendDeal_Send_ConnectFrame(int Uartport);
int JZsdk_Uart_SendDeal_Send_CustomOrder(int UartPort, char *sendbuf, int len);
int JZsdk_Uart_SendDeal_Reply_SecondaryDeviceName(int Uartport , int device_name, int FrameSequence);
int JZsdk_Uart_SendDeal_QuerySecondaryDeviceName(int Uartport ,int FrameSequence);
... ...
... ... @@ -9,6 +9,13 @@
#include <sys/time.h>
#include "JZsdk_Uart_UartDeal.h"
/***********************************
*
*
* 暂时未启用该c文件的多线程串口发送功能
*
*
* ***********************************8*/
// 定义任务队列结构体
... ...
... ... @@ -334,7 +334,7 @@ static int UartDeal_Recv_interface(int Uart_fd, unsigned char *getbuf, int getbu
return 0;
}
// // 是否要打印内容
// 是否要打印内容
// printf("getbuf: %s\n", getbuf);
// for (int i = 0; i < getbufLen; i++)
// {
... ... @@ -431,7 +431,7 @@ static int UartDeal_Recv_interface(int Uart_fd, unsigned char *getbuf, int getbu
// 如果是有帧头的情况跳出的,说明是帧被切了,需要返回帧长度给接收线程
if (FrameFlag != 0)
{
// 1、判断帧的长度会不会不合理,帧的长度最大为文件名帧,其长度为9+2+128
// 1、判断帧的长度会不会不合理,帧的长度最大为文件名帧,其长度为9+2+400
if (FrameLen > (9 + 2 + 128))
{
// 将其排出不返回
... ...
/**
********************************************************************
* @file CameraFeatures.H
* 用于处理h264视频帧
*
*********************************************************************
*/
/* Define to prevent recursive inclusion 避免重定义 -------------------------------------*/
#ifndef CAMERA_FEATURES_H
#define CAMERA_FEATURES_H
/* Includes ------------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* 常亮定义*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_JZsdkReturnCode V4L2_ShootPhotoDeal(char* h264_data, unsigned int data_len);
int FrameDeal_ShootPhoto_trans(int Count);
int V4L2_RecordVedioDeal(char *h264_data, int dataLen);
#endif
\ No newline at end of file
... ...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../CameraParameter.h"
#include "../V4L2/V4L2_Record.h"
#include "JZsdkLib.h"
#include "./CameraFeatures.h"
#include "version_choose.h"
#define DATA_SEND_FROM_VIDEO_STREAM_MAX_LEN 60000
#define VIDEO_FRAME_AUD_LEN 6
#if APP_VERSION == APP_PSDK
#include "Dji_Control/DJI_VideoDeal.h"
#endif
static const uint8_t s_frameAudInfo[VIDEO_FRAME_AUD_LEN] = {0x00, 0x00, 0x00, 0x01, 0x09, 0x10};
extern int Camera_PushVideoInitFlag;
pthread_mutex_t FrameDealMutex;
static void FrameDeal_PsdkPushFrame(char* h264_data, uint32_t data_len, int AudLength)
{
unsigned int FrameBufSize = 0;
FrameBufSize = data_len;
//如果视频为大疆H264型
if (PUSHFRAME_VIDEO_TPYE == VIDEO_TPYE_DJIH264)
{
FrameBufSize += VIDEO_FRAME_AUD_LEN;
memcpy(h264_data + data_len, s_frameAudInfo, VIDEO_FRAME_AUD_LEN);
//printf("大疆264型\n");
}
else
{
//printf("普通h264\n");
}
#if APP_VERSION == APP_PSDK
//放入到对应的传输函数
DJI_VideoDeal_Push_DJIH264Frame(h264_data, FrameBufSize);
#endif
}
//线程方案
static void *JZsdk_CameraFrameDeal_thread(void *args)
{
int FrameLength;
int AudLength ; //帧尾长度
JZSDK_LOG_INFO("JZsdk_CameraFrameDeal_thread创建完毕\n");
while (1)
{
pthread_mutex_lock(&FrameDealMutex);
//如果已经初始化了摄像头及推流部分
if (Camera_PushVideoInitFlag == JZ_FLAGCODE_OFF)
{
continue;
}
//创建一个缓存区,用于存放视频数据
char *FrameDealBuffer;
FrameLength = 0;
//如果要求的推送的视频流是 djih264
if (PUSHFRAME_VIDEO_TPYE == VIDEO_TPYE_DJIH264)
{
AudLength = VIDEO_FRAME_AUD_LEN ;
}
//如果要求的是普通的h264
else if (PUSHFRAME_VIDEO_TPYE == VIDEO_TPYE_H264)
{
AudLength = 0 ;
}
else
{
AudLength = 0 ;
}
//从摄像头录制并取出一帧数据
V4L2_CameraFrameRecord(&FrameDealBuffer, &FrameLength, AudLength);
//拍照处理函数
V4L2_ShootPhotoDeal(FrameDealBuffer, FrameLength);
//录像处理函数
V4L2_RecordVedioDeal(FrameDealBuffer, FrameLength);
//连拍处理函数
//FrameDeal_ShootPhotoBurstDeal(FrameDealBuffer, FrameLength);
//推送一帧
FrameDeal_PsdkPushFrame(FrameDealBuffer, FrameLength, AudLength);
free(FrameDealBuffer);
}
pthread_exit(NULL);
}
int JZsdk_CameraFrameDeal_thread_Init()
{
pthread_mutex_init(&FrameDealMutex, NULL); // 创建互斥锁
pthread_t FrameDeal_thread;
pthread_create(&FrameDeal_thread, NULL, JZsdk_CameraFrameDeal_thread, NULL);
}
int FrameDeal_FrameDealThread_UnlockFun()
{
//解锁帧处理线程
pthread_mutex_unlock(&FrameDealMutex);
return 0;
}
... ...
/**
********************************************************************
* @file FRAMEDEALFUN.H
* 用于处理h264视频帧
*
*********************************************************************
*/
/* Define to prevent recursive inclusion 避免重定义 -------------------------------------*/
#ifndef FRAMEDEALFUN_H
#define FRAMEDEALFUN_H
/* Includes ------------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* 常亮定义*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
#endif // CAMERA_PARAMETER_SETTING_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
... ...
#include <stdio.h>
#include "../CameraParameter.h"
#include "../V4L2/V4L2_Record.h"
#include "JZsdkLib.h"
FILE *FrameDeal_RecordVideo_fp = NULL;
static int FrameDeal_RecordVideo_mode = JZ_FLAGCODE_OFF;
extern int VideoTranscode_Flag ; //视频转码标志位,off为转码完毕,on为转码完成
/*
录像部分
*/
// 录像函数
static void FrameDeal_RecordVideo(char* h264_data, uint32_t data_len)
{
fwrite(h264_data, data_len, 1, FrameDeal_RecordVideo_fp);
//JZSDK_LOG_INFO("写入一帧");
}
//录像模式传递函数
T_JZsdkReturnCode FrameDeal_RecordVideo_trans(int mode)
{
JZSDK_LOG_INFO("录像传递函数被调用");
//如果传来一个开始录像的指令,且当前没有打开录像, 且没在进行转码
if( mode == JZ_FLAGCODE_ON && FrameDeal_RecordVideo_mode == JZ_FLAGCODE_OFF && VideoTranscode_Flag == JZ_FLAGCODE_OFF)
{
FrameDeal_RecordVideo_fp = fopen("/root/sdcard/DCIM/Videos/temp.h264","wb");
if (FrameDeal_RecordVideo_fp == NULL)
{
JZSDK_LOG_ERROR("录像文件打开错误");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
FrameDeal_RecordVideo_mode = JZ_FLAGCODE_ON;
JZSDK_LOG_INFO("录像文件已经打开");
}
else if(mode == JZ_FLAGCODE_OFF && FrameDeal_RecordVideo_mode == JZ_FLAGCODE_ON)
{
//关闭录像的文件
JZSDK_LOG_INFO("录像已保存");
fclose(FrameDeal_RecordVideo_fp);
//转码
//录像转码解锁函数
ffmpeg_H264_tanscodeto(2);
//关闭录像
FrameDeal_RecordVideo_mode = JZ_FLAGCODE_OFF;
}
else
{
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
int V4L2_RecordVedioDeal(char *h264_data, int dataLen)
{
if(FrameDeal_RecordVideo_mode == JZ_FLAGCODE_OFF)
{
return -1;
}
//录像函数
FrameDeal_RecordVideo( h264_data, dataLen);
//JZSDK_LOG_INFO("录入一帧");
}
... ...
#include <stdio.h>
#include "../CameraParameter.h"
#include "../V4L2/V4L2_Record.h"
#include "JZsdkLib.h"
#define FrameDeal_SHOOTPHOTO_CLOSE (0)
#define FrameDeal_SHOOTPHOTO_ON (1)
#define FrameDeal_SHOOTPHOTOBURST_ON (1)
//连拍照片数
static int FrameDeal_ShootPhoto_Count;
static int FrameDeal_ShootPhotoBurst_Count;
static int FrameDeal_ShootPhotoBurst_Count_Save;
static int FrameDeal_ShootPhotoBurst_FrameCount;
static int FrameDeal_ShootPhotoMode = JZ_FLAGCODE_OFF;
static int FrameDeal_ShootPhotoBurst_mode = JZ_FLAGCODE_OFF;
static int FrameDeal_BurstButton = JZ_FLAGCODE_OFF ;
//输出文件
FILE *FrameDeal_ShootPhoto_fp = NULL;
FILE *FrameDeal_ShootPhotoBurst_fp = NULL;
extern int PhotoTranscode_Flag ; //图片转码标志位,off为转码完毕,on为转码完成
/*
单拍部分
*/
// 拍摄模式传递函数
int FrameDeal_ShootPhoto_trans(int Count)
{
//拍摄计数值
FrameDeal_ShootPhoto_Count = Count;
FrameDeal_ShootPhotoMode = JZ_FLAGCODE_ON;
JZSDK_LOG_INFO("拍摄传递函数被调用");
}
//拍摄函数
static T_JZsdkReturnCode FrameDeal_ShootPhoto(char* h264_data, uint32_t data_len)
{
//如果转码未完成
if (PhotoTranscode_Flag == JZ_FLAGCODE_ON)
{
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
char *FrameDeal_ShootPhoto_InPath = "/root/sdcard/DCIM/Photos/temp.h264";
// 照片先用h264流保存
FrameDeal_ShootPhoto_fp = fopen(FrameDeal_ShootPhoto_InPath, "wb");
fwrite(h264_data, data_len, 1, FrameDeal_ShootPhoto_fp);
fclose(FrameDeal_ShootPhoto_fp);
//调用转码线程
ffmpeg_H264_tanscodeto(1);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/*
连拍部分
*/
//连拍模式传递函数
void FrameDeal_ShootPhotoBurst_trans(int Count)
{
FrameDeal_ShootPhotoBurst_mode = FrameDeal_SHOOTPHOTOBURST_ON;
FrameDeal_ShootPhotoBurst_Count = Count;
FrameDeal_ShootPhotoBurst_Count_Save = Count;
char *FrameDeal_ShootPhotoBurst_InPath = "/root/sdcard/DCIM/Photos/temp.h264";
// 照片先用h264流保存
FrameDeal_ShootPhotoBurst_fp = fopen(FrameDeal_ShootPhotoBurst_InPath, "wb");
}
//连拍函数
static void FrameDeal_BurstShootPhoto(char* h264_data, uint32_t data_len)
{
fwrite(h264_data, data_len, 1, FrameDeal_ShootPhotoBurst_fp);
}
//连拍处理函数
static int FrameDeal_ShootPhotoBurstDeal(char* h264_data, uint32_t data_len)
{
if(FrameDeal_ShootPhotoBurst_mode == JZ_FLAGCODE_OFF)
{
return -1;
}
if(h264_data[4] == 0x67 && FrameDeal_ShootPhotoBurst_mode == JZ_FLAGCODE_ON)
{
JZSDK_LOG_INFO("连拍触发");
FrameDeal_BurstButton = JZ_FLAGCODE_ON;
}
if(FrameDeal_BurstButton == JZ_FLAGCODE_ON)
{
//如果开始
//录像函数
FrameDeal_BurstShootPhoto(h264_data ,data_len);
FrameDeal_ShootPhotoBurst_FrameCount++;
if(FrameDeal_ShootPhotoBurst_FrameCount == 3)
{
FrameDeal_ShootPhotoBurst_Count--;
FrameDeal_ShootPhotoBurst_FrameCount = 0;
//3帧1拍
if(FrameDeal_ShootPhotoBurst_Count == 0)
{
//调用转码线程
fclose(FrameDeal_ShootPhotoBurst_fp);
FrameDeal_ShootPhotoBurst_mode = JZ_FLAGCODE_OFF;
FrameDeal_BurstButton = JZ_FLAGCODE_OFF;
JZSDK_LOG_INFO("打开连拍转码");
//ffmpeg_H264_tanscodeto(3, FrameDeal_ShootPhotoBurst_Count_Save);
}
}
}
}
//拍照处理函数
T_JZsdkReturnCode V4L2_ShootPhotoDeal(char* h264_data, unsigned int data_len)
{
T_JZsdkReturnCode ret;
//如果拍照模式未开启
if (FrameDeal_ShootPhotoMode == JZ_FLAGCODE_OFF)
{
return -1;
}
//如果开启
//如果该帧 为 I 帧
if(h264_data[4] == 0x67)
{
JZSDK_LOG_INFO("是I帧 拍照一次");
ret = FrameDeal_ShootPhoto( h264_data, data_len);
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
FrameDeal_ShootPhoto_Count--;
if (FrameDeal_ShootPhoto_Count == 0)
{
FrameDeal_ShootPhotoMode = JZ_FLAGCODE_OFF;
}
}
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
\ No newline at end of file
... ...
/**
********************************************************************
* @file CameraParameter.h
* CameraParameter的头文件
* 用于记录摄像头的参数
*
*********************************************************************
*/
/* Define to prevent recursive inclusion 避免重定义 -------------------------------------*/
#ifndef CAMERA_PARAMETER_H
#define CAMERA_PARAMETER_H
/* Includes ------------------------------------------------------------------*/
#include "JZsdk_Base/JZsdk_Code/JZsdk_Code.h"
#include "version_choose.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* 常亮定义*/
typedef enum {
VIDEO_TPYE_H264 = 0x0000,
VIDEO_TPYE_DJIH264 = 0x0001
} JZ_Video_Type_Code;
#if DEVICE_VERSION == JZ_H150S || DEVICE_VERSION == JZ_H150T
#define CAMERA_DEVICE_NAME "/dev/video0"
#define CAMERA_RECORD_FRAME (25) //每秒帧数 25帧
#define CAMERA_RECORD_HEIGHT (1080)//摄像头录制 帧画面高度720 1080
#define CAMERA_RECORD_WIDTH (1980)//摄像头录制 帧画面宽度1280 1980
#define BRIGHTNESS (80) //亮度,该摄像头亮度范围为 1-255 默认128
#define CONTRAST (155) //对比度,摄像头对比度范围为 1-255 默认128
#define SATURATION (128) //饱和度 摄像头饱和度范围为 1-255 默认128
#define EXPSURE (100) //曝光值 摄像头曝光值范围: 5-2500 默认auto设置
#define PUSHFRAME_VIDEO_TPYE VIDEO_TPYE_DJIH264 //推送帧的视频格式
#else
#define CAMERA_DEVICE_NAME NULL
#define CAMERA_RECORD_FRAME (0) //每秒帧数 25帧
#define CAMERA_RECORD_HEIGHT (0)//摄像头录制 帧画面高度720 1080
#define CAMERA_RECORD_WIDTH (0)//摄像头录制 帧画面宽度1280 1980
#define BRIGHTNESS (0)
#define CONTRAST (0)
#define SATURATION (0)
#define EXPSURE (0)
#define PUSHFRAME_VIDEO_TPYE VIDEO_TPYE_H264 //推送帧的视频格式
#endif
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif
... ...
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <unistd.h>
#include "version_choose.h"
#include "UI_control.h"
#include "BaseConfig.h"
#include "JZsdkLib.h"
#include "./CameraParameter.h"
#include "./V4L2/V4L2_Record.h"
int Camera_PushVideoInitFlag = JZ_FLAGCODE_OFF;
/***********
*
* 检测是否有摄像头
*
* ************/
static T_JZsdkReturnCode Camera_CheckForThePresenceOfCameras()
{
//检测是否存在摄像头
if (CAMERA_DEVICE_NAME == NULL)
{
JZSDK_LOG_ERROR("无摄像头设备号设置");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
if(access(CAMERA_DEVICE_NAME, F_OK ) == 0)
{
JZSDK_LOG_ERROR("摄像头存在");
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else
{
JZSDK_LOG_ERROR("摄像头不存在,关闭推流模块");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
}
/***********
*
* 建立保存文件夹
*
* ************/
static T_JZsdkReturnCode Camera_MediaFolderBuild()
{
char RmCmdStr[256];
snprintf(RmCmdStr, 256,"mkdir /root/sdcard/DCIM/");
if( JZsdk_RunSystemCmd(RmCmdStr) ==-1)
{
JZSDK_LOG_INFO("已经存在DCIM文件夹");
}
snprintf(RmCmdStr, 256,"mkdir /root/sdcard/DCIM/Videos");
if( JZsdk_RunSystemCmd(RmCmdStr) ==-1)
{
JZSDK_LOG_INFO("已经存在Videos文件夹");
}
snprintf(RmCmdStr, 256,"mkdir /root/sdcard/DCIM/Photos");
if( JZsdk_RunSystemCmd(RmCmdStr) ==-1)
{
JZSDK_LOG_INFO("已经存在Photos文件夹");
}
snprintf(RmCmdStr, 256,"rm /root/sdcard/DCIM/Videos/temp.h264");
if( JZsdk_RunSystemCmd(RmCmdStr) ==-1)
{
JZSDK_LOG_INFO("Videos/temp.h264不存在");
}
snprintf(RmCmdStr, 256,"rm /root/sdcard/DCIM/Photos/temp.h264");
if( JZsdk_RunSystemCmd(RmCmdStr) ==-1)
{
JZSDK_LOG_INFO("Photos/temp.h264不存在");
}
}
/***********
*
* 相机初始化
*
* ************/
static T_JZsdkReturnCode JZsdk_CameraInit()
{
T_JZsdkReturnCode ret;
int dev_fd;
//1、摄像头录制初始化
#if DEVICE_VERSION == JZ_H150S || DEVICE_VERSION == JZ_H150T
ret = V4l2_Camarainit(&dev_fd);
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
JZSDK_LOG_ERROR("摄像头录制初始化失败");
return ret;
}
//2、摄像头参数调整
ret = V4L2_Parameter_Setting(dev_fd);
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
JZSDK_LOG_ERROR("摄像头参数调整失败");
return ret;
}
#else
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
#endif
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_JZsdkReturnCode JZsdk_Camera_FrameDealThread_UnlockFun()
{
//解锁一次帧处理函数。以用于处理一帧视频流画面
FrameDeal_FrameDealThread_UnlockFun();
}
/***********
*
* 推流计时线程
*
* ************/
static void *JZsdk_Camera_PushFrame_TimerThread(void *args)
{
while (1)
{
delayMs(1000);
//解锁一次帧处理函数。以用于处理一帧视频流画面
FrameDeal_FrameDealThread_UnlockFun();
}
}
/***********
*
* 推流计时线程初始化
*
* ************/
static int JZsdk_Camera_PushFrame_TimerThread_Init()
{
pthread_t WriteDataTask;
pthread_attr_t task_attribute; //线程属性
pthread_attr_init(&task_attribute); //初始化线程属性
pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程分离属性
int opus_Protection = pthread_create(&WriteDataTask,&task_attribute,JZsdk_Camera_PushFrame_TimerThread,NULL); //线程
if(opus_Protection != 0)
{
JZSDK_LOG_ERROR("创建视频转码线程失败!");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
}
/***********
*
* 相机模块初始化
*
* ************/
T_JZsdkReturnCode JZsdk_CameraMuduleInit()
{
T_JZsdkReturnCode ret;
//1、建立保存文件夹
Camera_MediaFolderBuild();
//2、检测是否有摄像头
ret = Camera_CheckForThePresenceOfCameras();
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE)
{
JZSDK_LOG_ERROR("摄像头不存在,相机模块初始化失败");
return ret;
}
//3、摄像头初始化
ret = JZsdk_CameraInit();
if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE)
{
JZSDK_LOG_ERROR("摄像头参数配置错误,摄像头初始化失败");
return ret;
}
//4、摄像头帧处理线程初始化
ret = JZsdk_CameraFrameDeal_thread_Init();
if (ret<0)
{
JZSDK_LOG_ERROR("4、摄像头帧处理线程初始化线程失败");
return ret;
}
//5、如果是串口模式,则进行推流,推流计时线程初始化
if (APP_VERSION == APP_UART)
{
JZsdk_Camera_PushFrame_TimerThread_Init();
}
//6、转码功能线程初始化
JZSDK_LOG_DEBUG("相机模块初始化完成");
Camera_PushVideoInitFlag = JZ_FLAGCODE_ON;
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
\ No newline at end of file
... ...
/**
********************************************************************
* @file Camera_InAndOut.h
* Camera_InAndOut的头文件
*
*********************************************************************
*/
/* Define to prevent recursive inclusion 避免重定义 -------------------------------------*/
#ifndef CAMERA_INANDOUT_H
#define CAMERA_INANDOUT_H
/* Includes ------------------------------------------------------------------*/
#include "JZsdk_Base/JZsdk_Code/JZsdk_Code.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* 常亮定义*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_JZsdkReturnCode JZsdk_Camera_FrameDealThread_UnlockFun();
T_JZsdkReturnCode JZsdk_CameraMuduleInit();
#ifdef __cplusplus
}
#endif
#endif
... ...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <getopt.h> /* getopt_long() */
#include <fcntl.h> /* low-level i/o */
#include <unistd.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <linux/videodev2.h>
#include "./V4L2_CameraParameterSetting.h"
#include "../CameraParameter.h"
#include "JZsdkLib.h"
T_JZsdkReturnCode V4L2_Parameter_Setting(int cam_fd)
{
struct v4l2_control ctrl;
//设置亮度*
ctrl.id= V4L2_CID_BRIGHTNESS;
ctrl.value = BRIGHTNESS;
if(ioctl(cam_fd,VIDIOC_S_CTRL,&ctrl)==-1)
{
perror("ioctl");
exit(EXIT_FAILURE);
}
//设置对比度
ctrl.id = V4L2_CID_CONTRAST;
ctrl.value= CONTRAST;
if(ioctl(cam_fd,VIDIOC_S_CTRL,&ctrl)==-1)
{
perror("ioctl");
exit(EXIT_FAILURE);
}
sleep(1);
//设置饱和度
ctrl.id = V4L2_CID_SATURATION;
ctrl.value= SATURATION;
if(ioctl(cam_fd,VIDIOC_S_CTRL,&ctrl)==-1)
{
perror("ioctl");
exit(EXIT_FAILURE);
}
/*
//设置色度
ctrl.id = V4L2_CID_HUE;
ctrl.value = 1;
if(ioctl(cam_fd,VIDIOC_S_CTRL,&ctrl)==-1)
{
perror("ioctl");
exit(EXIT_FAILURE);
}
//设置手动白平衡
ctrl.id = V4L2_CID_AUTO_WHITE_BALANCE;
ctrl.value = V4L2_WHITE_BALANCE_MANUAL ;
if(ioctl(cam_fd,VIDIOC_G_CTRL,&ctrl)==-1)
{
perror("ioctl");
exit(EXIT_FAILURE);
}
//设置白平衡色温
ctrl.id = V4L2_CID_WHITE_BALANCE_TEMPERATURE;
ctrl.value = 5100;
if(ioctl(cam_fd,VIDIOC_S_CTRL,&ctrl)==-1)
{
perror("ioctl");
exit(EXIT_FAILURE);
}
//设置锐度
ctrl.id = V4L2_CID_SHARPNESS;
ctrl.value = 4;
if(ioctl(cam_fd,VIDIOC_S_CTRL,&ctrl)==-1)
{
perror("ioctl");
exit(EXIT_FAILURE);
}
//设置背光补偿
ctrl.id = V4L2_CID_BACKLIGHT_COMPENSATION;
ctrl.value = 3;
if(ioctl(cam_fd,VIDIOC_S_CTRL,&ctrl)==-1)
{
perror("ioctl");
exit(EXIT_FAILURE);
}
//设置伽玛值
ctrl.id = V4L2_CID_GAMMA;
ctrl.value = 120;
if(ioctl(cam_fd,VIDIOC_S_CTRL,&ctrl)==-1)
{
perror("ioctl");
exit(EXIT_FAILURE);
}
*/
}
... ...
/**
********************************************************************
* @file V4L2_CameraParameterSetting.h
* 用于转码拍下来的照片以及视频
*
*********************************************************************
*/
/* Define to prevent recursive inclusion 避免重定义 -------------------------------------*/
#ifndef V4L2_CAMERA_PARAMETER_SETTING_H
#define V4L2_CAMERA_PARAMETER_SETTING_H
/* Includes ------------------------------------------------------------------*/
#include "JZsdk_Base/JZsdk_Code/JZsdk_Code.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* 常亮定义*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_JZsdkReturnCode V4L2_Parameter_Setting(int cam_fd);
#ifdef __cplusplus
}
#endif
#endif
\ No newline at end of file
... ...
/* Includes ------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <getopt.h> /* getopt_long() */
#include <fcntl.h> /* low-level i/o */
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <linux/videodev2.h>
#include "../CameraParameter.h"
#include "version_choose.h"
#include "UI_control.h"
#include "BaseConfig.h"
#include "JZsdkLib.h"
/* Private constants ---------------------------------------------------------*/
// 清空
#define CLEAR(x) memset(&(x), 0, sizeof(x))
/* Private types -------------------------------------------------------------*/
unsigned char *returnptr;//保存映射后用户空间的首地址
unsigned int returnsize;
struct buffer
{
char *start;
size_t length;
};
struct v4l2_buffer H3_ReturnBuffer;
// 设备号
static int fd = -1; // DEVICE NUMBER
// 存储队列
static struct buffer *buffers;
static unsigned int n_buffers;
static struct v4l2_buffer buf;
//unsigned char* pucVideBuf[4]; // 视频BUFF空间地址
/* Private functions declaration ---------------------------------------------*/
static int xioctl(int fh, int request, T_JZsdkReturnCode *arg)
{
int r;
do
{
r = ioctl(fh, request, arg);
} while (-1 == r );
return r;
}
static T_JZsdkReturnCode stop_capturing()
{
enum v4l2_buf_type type;
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (-1 == xioctl(fd, VIDIOC_STREAMOFF, &type))
{
JZSDK_LOG_ERROR("VddIDIOC_STREAMOFF");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_JZsdkReturnCode start_capturing()
{
unsigned int i;
enum v4l2_buf_type type;
for (i = 0; i < n_buffers; ++i)
{
//struct v4l2_buffer buf;
CLEAR(buf);
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP; //内存映射
buf.index = i;
//从缓存区中取出数据
if (-1 == xioctl(fd, VIDIOC_QBUF, &buf))
{
JZSDK_LOG_ERROR("VIDIOC_QBUF");
}
}
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (-1 == xioctl(fd, VIDIOC_STREAMON, &type))
{
JZSDK_LOG_ERROR("VIDIOC_STREAMON");
}
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_JZsdkReturnCode uninit_device()
{
unsigned int i;
for (i = 0; i < n_buffers; ++i)
{
if (-1 == munmap(buffers[i].start, buffers[i].length))
{
JZSDK_LOG_ERROR("munmap");
}
}
free(buffers);
}
static T_JZsdkReturnCode init_mmap()
{
//定义了缓存的数量,驱动会据此申请对应数量的视频缓存。多个缓存可以用于建立FIFO,来提高视频采集的效率。
struct v4l2_requestbuffers req;
CLEAR(req);
req.count = 4;
req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
req.memory = V4L2_MEMORY_MMAP;
if (xioctl(fd, VIDIOC_REQBUFS, &req) == -1)
{
JZSDK_LOG_ERROR("VIDIOC_REQBUFS");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
if (req.count < 2)
{
JZSDK_LOG_ERROR("摄像头mmap的缓冲区内存不足");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
//分配req.count个 *Buffer长度的内存
buffers = calloc(req.count, sizeof(*buffers));
if (!buffers)
{
JZSDK_LOG_ERROR("摄像头buffers注册内存失败");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
// 改变buffer数量 以改进视频质量
//映射所有的缓存
for (n_buffers = 0; n_buffers < req.count; ++n_buffers)
{
CLEAR(buf);
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
buf.index = n_buffers;
if (-1 == xioctl(fd, VIDIOC_QUERYBUF, &buf))
{
JZSDK_LOG_ERROR("VIDIOC_QUERYBUF");
}
buffers[n_buffers].length = buf.length;
buffers[n_buffers].start =
mmap(NULL /* start anywhere */,
buf.length,
PROT_READ | PROT_WRITE /* required */,
MAP_SHARED /* recommended */,
fd, buf.m.offset);
if (MAP_FAILED == buffers[n_buffers].start)
{
JZSDK_LOG_ERROR("mmap");
}
}
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
// 初始化 程序
static T_JZsdkReturnCode init_device()
{
struct v4l2_capability cap;
struct v4l2_format fmt;
if (-1 == xioctl(fd, VIDIOC_QUERYCAP, &cap))
{ //测试参数
JZSDK_LOG_ERROR("VIDIOC_QUERYCAP");
}
if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE))
{
JZSDK_LOG_ERROR("no video capture device");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
if (!(cap.capabilities & V4L2_CAP_STREAMING))
{
JZSDK_LOG_ERROR("does not support streaming i/o");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
// 设置摄像头使用格式
memset(&fmt, 0, sizeof(struct v4l2_format));
//描绘帧的格式
// fmt结构体 含有 tpye格式 和 fmt 联合体
// fmt 结构体
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
fmt.fmt.pix.width = CAMERA_RECORD_WIDTH;
fmt.fmt.pix.height = CAMERA_RECORD_HEIGHT;
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_H264;
fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
//写入格式参数
if (-1 == xioctl(fd, VIDIOC_S_FMT, &fmt)) //设置格式
{
JZSDK_LOG_ERROR("VIDIOC_S_FMT");
}
/*
修改: 加入帧数设置
*/
struct v4l2_streamparm streamparm;
streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
streamparm.parm.capture.timeperframe.numerator = 1; //每1秒
streamparm.parm.capture.timeperframe.denominator = CAMERA_RECORD_FRAME; // 帧数
streamparm.parm.capture.capturemode = 0; //低质量图片模式
//写入帧数设置
if (-1 == xioctl(fd, VIDIOC_S_PARM, &streamparm))
{
JZSDK_LOG_ERROR("failed in setting the fps in camera!");
}
printf("camera is getting img-data in %d fps\n", streamparm.parm.capture.timeperframe.denominator);
//初始化映射
T_JZsdkReturnCode ret = init_mmap();
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
return ret;
}
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_JZsdkReturnCode close_device()
{
if (-1 == close(fd))
{
JZSDK_LOG_ERROR("close");
}
fd = -1;
}
static T_JZsdkReturnCode open_device()
{
//加上O_NONBLOCK会出现如下错误
// VIDIOC_DQBUF error 11, Resource temporarily unavailable
//fd = open(CAMERA_DEVICE_NAME, O_RDWR | O_NONBLOCK, 0);
fd = open(CAMERA_DEVICE_NAME, O_RDWR , 0);
if (-1 == fd)
{
JZSDK_LOG_ERROR("打开摄像头设备错误");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_JZsdkReturnCode V4l2_Camarainit(int *dev_fd)
{
T_JZsdkReturnCode ret;
//1、打开摄像头
ret = open_device();
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
JZSDK_LOG_ERROR("打开摄像头失败");
return ret;
}
//初始化程序
ret = init_device();
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
JZSDK_LOG_ERROR("初始化摄像头设备失败");
return ret;
}
//开始抓取
ret = start_capturing();
if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
{
JZSDK_LOG_ERROR("开始抓取失败");
return ret;
}
*dev_fd = fd;
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_JZsdkReturnCode V4L2_CamaraUninit()
{
//停止采集
stop_capturing();
//释放设备
uninit_device();
//关闭设备
close_device();
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/***********
*
* 取出画面数据
*
* ************/
T_JZsdkReturnCode V4L2_CameraFrameRecord(char **RecordReturnBuffer, int *RecordReturnLength, int Audlength)
{
memset(&buf, 0, sizeof(struct v4l2_buffer));
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; //每个结构体都需要设置type为这个参数要记住
buf.memory = V4L2_MEMORY_MMAP;
//取出画面
if (-1 == xioctl(fd, VIDIOC_DQBUF, &buf))
{
JZSDK_LOG_ERROR("VIDIOC_DQBUF");
}
//画面长度
*RecordReturnLength = buf.bytesused;
//画面数组
*RecordReturnBuffer = (unsigned char*)malloc(*RecordReturnLength + Audlength);
if(RecordReturnBuffer == NULL)
{
JZSDK_LOG_ERROR("摄像头的视频回复帧内存注册错误");
}
memcpy(*RecordReturnBuffer, buffers[buf.index].start, *RecordReturnLength);
//放回画面内存
if (-1 == xioctl(fd, VIDIOC_QBUF, &buf))
{
JZSDK_LOG_ERROR("VIDIOC_QBUF");
}
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
... ...
/**
********************************************************************
* @file V4L2_Record.h
* V4L2_Record的头文件
*
*********************************************************************
*/
/* Define to prevent recursive inclusion 避免重定义 -------------------------------------*/
#ifndef V4L2_RECORD_H
#define V4L2_RECORD_H
/* Includes ------------------------------------------------------------------*/
#include "JZsdk_Base/JZsdk_Code/JZsdk_Code.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* 常亮定义*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_JZsdkReturnCode V4l2_Camarainit(int *dev_fd);
T_JZsdkReturnCode V4L2_CamaraUninit();
T_JZsdkReturnCode V4L2_CameraFrameRecord(char **RecordReturnBuffer, int *RecordReturnLength, int Audlength);
#ifdef __cplusplus
}
#endif
#endif
... ...
/* Includes ------------------------------------------------------------------*/
#include <fcntl.h>
#include <stdlib.h>
#include <pthread.h>
#include <stdio.h>
// 自建库
#include "../VideoTranscode.h"
#include "JZsdkLib.h"
/* Private constants ---------------------------------------------------------*/
#define FFMPEG_CMD_BUF_SIZE (256 + 256)
//转码模式
#define H264_TRANSCODETO_JPG (1)
#define H264_TRAMSCODETO_MP4 (2)
#define H264_TRAMSCODETO_JPG_BURST (3)
/* Private types -------------------------------------------------------------*/
static void *ffmpeg_VideoTranscodeTask(void *arg);
static int tanscodemode = 0;
static int GPS_Receive_Date = 0;
static int GPS_Receive_Time = 0;
extern int VideoTranscode_Flag ; //视频转码标志位,off为转码完毕,on为转码完成
extern int PhotoTranscode_Flag ; //图片转码标志位,off为转码完毕,on为转码完成
FILE *NUMBER_SET_fp;
char number_set[6];
//互斥锁
static pthread_mutex_t TranscodeLock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t TransCond = PTHREAD_COND_INITIALIZER;
//转码服务函数
// 服务初始化函数
T_JZsdkReturnCode ffmpeg_VideoTranscode_Sever(void)
{
pthread_t WriteDataTask;
pthread_attr_t task_attribute; //线程属性
pthread_attr_init(&task_attribute); //初始化线程属性
pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程分离属性
int opus_Protection = pthread_create(&WriteDataTask,&task_attribute,ffmpeg_VideoTranscodeTask,NULL); //线程
if(opus_Protection != 0)
{
JZSDK_LOG_ERROR("创建视频转码线程失败!");
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/*
转码函数部分
*/
// 拍照转码函数
static T_JZsdkReturnCode ffmpeg_ShootPhoto_transcode()
{
//打开转码标志位
if (PhotoTranscode_Flag == JZ_FLAGCODE_ON)
{
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
PhotoTranscode_Flag = JZ_FLAGCODE_ON;
//ffmpeg指令
char ffmpegCmdStr[FFMPEG_CMD_BUF_SIZE];
int ret;
//地址拼接
char str1[40] = "/root/sdcard/DCIM/Photos/PSDK_PHOTO";
int str2 ;
char str3[6] = ".jpg";
char *ffmpeg_ShootPhoto_CallBack_InPath = "/root/sdcard/DCIM/Photos/temp.h264";
char ffmpeg_ShootPhoto_CallBack_OutPath[FFMPEG_CMD_BUF_SIZE];
//输出名字修改
NUMBER_SET_fp = fopen("/root/sdcard/DCIM/Photos/pthoto_number.txt","r+");
if(NUMBER_SET_fp == NULL)
{
NUMBER_SET_fp = fopen("/root/sdcard/DCIM/Photos/pthoto_number.txt","w+");
fwrite("00000", 1, 5, NUMBER_SET_fp);
fseek(NUMBER_SET_fp, 0, SEEK_SET);
}
fread(number_set, 1, 5, NUMBER_SET_fp);
str2 = atoi(number_set) + 1;
snprintf(number_set, 6, "%05d", str2);
fseek(NUMBER_SET_fp, 0, SEEK_SET);
fwrite(number_set, 1, 5, NUMBER_SET_fp);
//snprintf(ffmpeg_ShootPhoto_CallBack_OutPath, 256, "%s_%d_%d%s", str1,GPS_Receive_Date,GPS_Receive_Time,str2);
snprintf(ffmpeg_ShootPhoto_CallBack_OutPath, 256, "%s_%s%s", str1, number_set, str3);
fclose(NUMBER_SET_fp);
NUMBER_SET_fp = NULL;
JZSDK_LOG_INFO("ffmpeg_ShootPhoto_CallBack_OutPath:%s",ffmpeg_ShootPhoto_CallBack_OutPath);
//JZSDK_LOG_INFO("%s",ffmpeg_ShootPhoto_CallBack_OutPath);
//将h264照片转换为jpg格式
snprintf(ffmpegCmdStr, FFMPEG_CMD_BUF_SIZE,
"echo \"y\" | ffmpeg -i \"%s\" -y -f image2 -t 0.001 -s 1980*1080 \"%s\" >/dev/null 2>&1",
ffmpeg_ShootPhoto_CallBack_InPath,
ffmpeg_ShootPhoto_CallBack_OutPath);
//JZSDK_LOG_INFO("ffmpegCmdStr:%s",ffmpegCmdStr);
JZSDK_LOG_INFO("录像保存位置:%s",ffmpeg_ShootPhoto_CallBack_OutPath);
JZsdk_RunSystemCmd(ffmpegCmdStr);
PhotoTranscode_Flag = JZ_FLAGCODE_OFF;
}
// 录像转码函数
static void ffmpeg_RecordVideo_transcode()
{
//打开转码标志位
if (VideoTranscode_Flag == JZ_FLAGCODE_ON)
{
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
VideoTranscode_Flag = JZ_FLAGCODE_ON;
//ffmpeg指令
char ffmpegCmdStr[FFMPEG_CMD_BUF_SIZE];
char *ffmpeg_RecordVideo_InPath = "/root/sdcard/DCIM/Videos/temp.h264";
char ffmpeg_RecordVideo_OutPath[FFMPEG_CMD_BUF_SIZE];
//转码
char str1[40] = "/root/sdcard/DCIM/Videos/PSDK_VIDEO";
int str2;
char str3[10] = ".mp4";
//输出名字修改
NUMBER_SET_fp = fopen("/root/sdcard/DCIM/Videos/video_number.txt","r+");
if(NUMBER_SET_fp == NULL)
{
NUMBER_SET_fp = fopen("/root/sdcard/DCIM/Videos/video_number.txt","w+");
fwrite("00000", 1, 5, NUMBER_SET_fp);
fseek(NUMBER_SET_fp, 0, SEEK_SET);
}
fread(number_set, 1, 5, NUMBER_SET_fp);
str2 = atoi(number_set) + 1;
snprintf(number_set, 6, "%05d", str2);
fseek(NUMBER_SET_fp, 0, SEEK_SET);
fwrite(number_set, 1, 5, NUMBER_SET_fp);
//snprintf(ffmpeg_RecordVideo_OutPath, 256, "%s_%d_%d%s", str1,GPS_Receive_Date,GPS_Receive_Time,str2);
snprintf(ffmpeg_RecordVideo_OutPath, 256, "%s_%s%s", str1, number_set, str3);
fclose(NUMBER_SET_fp);
NUMBER_SET_fp = NULL;
//将h264视频转换为mp4格式
snprintf(ffmpegCmdStr, FFMPEG_CMD_BUF_SIZE,
"echo \"y\" | ffmpeg -i \"%s\" -y -vcodec copy \"%s\" >/dev/null 2>&1",
ffmpeg_RecordVideo_InPath,
ffmpeg_RecordVideo_OutPath);
//ffmpeg -f h264 -i xxx.264 -vcodec copy xxx.mp4
//JZSDK_LOG_INFO("ffmpegCmdStr:%s",ffmpegCmdStr);
JZSDK_LOG_INFO("录像保存位置:%s",ffmpeg_RecordVideo_OutPath);
JZsdk_RunSystemCmd(ffmpegCmdStr);
VideoTranscode_Flag = JZ_FLAGCODE_OFF;
}
// 连拍转码函数
static void ffmpeg_ShootPhoroBurst_transcode()
{
//ffmpeg指令
char ffmpegCmdStr[FFMPEG_CMD_BUF_SIZE];
char *ffmpeg_ShootPhoroBurst_InPath = "/root/sdcard/DCIM/Videos/temp.h264";
char ffmpeg_ShootPhoroBurst_OutPath[FFMPEG_CMD_BUF_SIZE];
//转码
char str1[40] = "/root/sdcard/DCIM/Photos/video_";
char str2[10] = ".mp4";
//根据时间写名字
snprintf(ffmpeg_ShootPhoroBurst_OutPath, 256, "%s_%d_%d%s", str1,GPS_Receive_Date,GPS_Receive_Time,str2);
//将h264照片转换为jpg格式
snprintf(ffmpegCmdStr, FFMPEG_CMD_BUF_SIZE,
"echo \"y\" | ffmpeg -i \"%s\" -r 25 -f image2 -t 0.001 -s 1280*720 \"%s\" >/dev/null 2>&1",
ffmpeg_ShootPhoroBurst_InPath,
ffmpeg_ShootPhoroBurst_OutPath);
//ffmpeg -i output.mp4 -r 30 -f image2 foo-%05d.jpeg
JZSDK_LOG_INFO("录像保存位置:%s",ffmpeg_ShootPhoroBurst_OutPath);
JZsdk_RunSystemCmd(ffmpegCmdStr);
}
/*
转码解锁函数
*/
//拍照转码解锁函数
void ffmpeg_H264_tanscodeto(int mode)
{
tanscodemode = mode;
pthread_mutex_unlock(&TranscodeLock);
}
/*
gps时间接受函数
*/
void ffmpeg_tanscode_DateAndTime_Receive(int date,int time)
{
GPS_Receive_Date = date;
GPS_Receive_Time = time;
}
//转码线程
static void *ffmpeg_VideoTranscodeTask(void *arg)
{
while (1) {
pthread_mutex_lock(&TranscodeLock);
JZSDK_LOG_INFO("s_VideoTranscode_Mutex解锁线程");
//如果为拍照转码
if(tanscodemode == H264_TRANSCODETO_JPG)
{
// //ffmpeg_CameraTransLock(true);
ffmpeg_ShootPhoto_transcode();
//ffmpeg_CameraTransLock(false);
}
//如果为录像转码
if(tanscodemode == H264_TRAMSCODETO_MP4)
{
//ffmpeg_CameraTransLock(true);
ffmpeg_RecordVideo_transcode();
//ffmpeg_CameraTransLock(false);
}
// //如果为连拍转码
// if(tanscodemode == H264_TRAMSCODETO_JPG_BURST)
// {
// ffmpeg_ShootPhoroBurst_transcode();
// }
tanscodemode = JZ_FLAGCODE_OFF;
}
}
... ...
/* Includes ------------------------------------------------------------------*/
#include <fcntl.h>
#include <stdlib.h>
// 自建库
#include "JZsdkLib.h"
int VideoTranscode_Flag = JZ_FLAGCODE_OFF; //视频转码标志位,off为转码完毕,on为转码完成
int PhotoTranscode_Flag = JZ_FLAGCODE_ON; //图片转码标志位,off为转码完毕,on为转码完成
\ No newline at end of file
... ...
/**
********************************************************************
* @file VideoTranscode.h
* 用于转码拍下来的照片以及视频
*
*********************************************************************
*/
/* Define to prevent recursive inclusion 避免重定义 -------------------------------------*/
#ifndef VIDEOTRANSCODE_H
#define VIDEOTRANSCODE_H
/* Includes ------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* 常亮定义*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
void ffmpeg_H264_tanscodeto(int mode);
#ifdef __cplusplus
}
#endif
#endif // TEST_PAYLOAD_CAM_EMU_MEDIA_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
... ...
... ... @@ -24,6 +24,11 @@ static void *Gimbal_H3_H10_Motor_control(void *arg);
static int H3_H10_Read_MotorAdjustmentPitch(void);
static void H3_H10_Write_MotorAdjustmentPitch(int MotorAdjustmentPitch);
int Gimbal_H3_H10_CheckStatus_GimbalFineTuning(int *AdjustmentPitch)
{
*AdjustmentPitch = H3_H10_motor_precise_adjustment_pitch;
}
void Gimbal_H3_H10_init_motor(void)
{
H3_H10_motor_precise_adjustment_pitch = H3_H10_Read_MotorAdjustmentPitch();//获取微调角度-读文件获取
... ... @@ -33,45 +38,12 @@ void Gimbal_H3_H10_init_motor(void)
int Gimbal_H3_H10_set_angle(int angle)
{
pthread_t MOTOR_task;
pthread_attr_t task_attribute; //线程属性
pthread_attr_init(&task_attribute); //初始化线程属性
pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程属性
int *arg = (int*) malloc(sizeof(int)); // 分配动态内存
*arg = angle; // 将参数值保存到动态内存中
int angle_ret = pthread_create(&MOTOR_task,&task_attribute,Gimbal_H3_H10_Motor_control,arg); //TTS mobie
if(angle_ret != 0)
{
printf("创建motor线程失败!\n");
return -1;
}
else
{
printf("创建motor线程成功\n");
}
return 0;
}
//控制电机线程
static void *Gimbal_H3_H10_Motor_control(void *arg)
{
//传入的角度 -900~0
int angle = *(int*)arg;
printf("H3_H10_angle:%d\n",angle);
angle = angle + H3_H10_motor_precise_adjustment_pitch;
//每43.5对饮20度
int num = 200 -angle*195/900;
pwmWrite(MOTOR,num);
free(arg); // 在线程函数中释放动态内存
}
//微调向上
... ...
... ... @@ -24,6 +24,7 @@ extern "C" {
/* Exported functions --------------------------------------------------------*/
int Gimbal_H3_H10_set_angle(int angle);
void Gimbal_H3_H10_init_motor(void);
int Gimbal_H3_H10_CheckStatus_GimbalFineTuning(int *AdjustmentPitch);
... ...
... ... @@ -41,33 +41,6 @@ T_JZsdkReturnCode Gimbal_H3_H150ST_init_motor()
//设置角度
int H3_H150ST_Gimbal_SetAngle(int angle)
{
pthread_t MOTOR_task;
pthread_attr_t task_attribute; //线程属性
pthread_attr_init(&task_attribute); //初始化线程属性
pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程属性
int *arg = (int*) malloc(sizeof(int)); // 分配动态内存
*arg = angle; // 将参数值保存到动态内存中
int angle_ret = pthread_create(&MOTOR_task,&task_attribute, H3_H150ST_Motor_control,arg); //TTS mobie
if(angle_ret != 0)
{
printf("创建motor线程失败!\n");
return -1;
}
return 0;
}
//发送电机pwm值 线程
static void *H3_H150ST_Motor_control(void *arg)
{
//传入的角度 -900~0
int angle = *(int*)arg;
//调整云台微调值
angle = angle + H3_H150ST_motor_precise_adjustment_pitch;
//调整为PWM值 1000~2000
int angle_PWM = 0;
... ... @@ -86,10 +59,10 @@ static void *H3_H150ST_Motor_control(void *arg)
send_angle[1]=(char )(angle_PWM);
send_angle[2]=(char )(angle_PWM>>8);
Gimbal_H3_H150ST_UartDeal_UartSend(send_angle, 4);
free(arg); // 在线程函数中释放动态内存
}
//H150ST云台范围
T_JZsdkReturnCode H3_H150ST_SetGimbalRange(int Range)
{
... ...
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include "version_choose.h"
#include "Gimbal_H3/Gimbal_H3.h"
... ... @@ -32,12 +33,17 @@ static int Gimbal_RealPitchAngle = 0;
static int Gimbal_LinkageNum;
static int Gimbal_SendAngleTask_Init();
/*
* Gimbal模块初始化
*/
int Gimbal_Init()
{
//发送角度线程初始化
Gimbal_SendAngleTask_Init();
if (DEVICE_VERSION == JZ_H150S || DEVICE_VERSION == JZ_H150T)
{
Gimbal_H3_H150ST_init_motor();
... ... @@ -88,13 +94,6 @@ T_JZsdkReturnCode Gimbal_Set_PitchAngle(int angle)
return JZ_ERRORCODE_GIMBAL_INVALID_PITCH;
}
//2、发送到H3控制云台函数
H3_H150ST_Gimbal_SetAngle(angle);
//3、记录全球云台值
Gimbal_PitchAngle = angle;
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else if (DEVICE_VERSION == JZ_H10)
{
... ... @@ -106,13 +105,6 @@ T_JZsdkReturnCode Gimbal_Set_PitchAngle(int angle)
return JZ_ERRORCODE_GIMBAL_INVALID_PITCH;
}
//2、发送到H3_H10控制云台函数
Gimbal_H3_H10_set_angle(angle);
//3、记录全球云台值
Gimbal_PitchAngle = angle;
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else if (DEVICE_VERSION == JZ_H10T)
{
... ... @@ -123,13 +115,6 @@ T_JZsdkReturnCode Gimbal_Set_PitchAngle(int angle)
return JZ_ERRORCODE_GIMBAL_INVALID_PITCH;
}
//2、发送到V3S_H10T控制云台函数
Gimbal_V3S_H10T_set_angle(angle);
//3、记录全球云台值
Gimbal_PitchAngle = angle;
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else if (DEVICE_VERSION == JZ_U3)
{
... ... @@ -140,13 +125,6 @@ T_JZsdkReturnCode Gimbal_Set_PitchAngle(int angle)
return JZ_ERRORCODE_GIMBAL_INVALID_PITCH;
}
//2、发送到V3S_U3控制云台函数
Gimbal_V3S_U3_set_angle(angle);
//3、记录全球云台值
Gimbal_PitchAngle = angle;
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else if (DEVICE_VERSION == TF_A1)
{
... ... @@ -157,33 +135,6 @@ T_JZsdkReturnCode Gimbal_Set_PitchAngle(int angle)
return JZ_ERRORCODE_GIMBAL_INVALID_PITCH;
}
//2、记录全局云台值
Gimbal_PitchAngle = angle;
//3、叠加飞机角度和微调角度
Gimbal_RealPitchAngle = angle - Gimbal_UavSelfPitch + Get_V3S_TFA1_motor_precise_adjustment_pitch();
//5、修正angle值
if (Gimbal_RealPitchAngle < -900)
{
angle = -900;
}
else if (Gimbal_RealPitchAngle > 0)
{
angle = 0;
}
else
{
angle = Gimbal_RealPitchAngle;
}
//6、发送到V3S_TFA1控制云台函数
Gimbal_V3S_TFA1_set_angle(angle);
//7、发送角度到飞机
Gimbal_ReplyPitchToUAV(Gimbal_PitchAngle);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else if (DEVICE_VERSION == JZ_H1T)
{
... ... @@ -194,16 +145,16 @@ T_JZsdkReturnCode Gimbal_Set_PitchAngle(int angle)
return JZ_ERRORCODE_GIMBAL_INVALID_PITCH;
}
//2、发送到V3S_U3控制云台函数
Gimbal_V3S_H1T_set_PitchAngle(angle);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else
{
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
Gimbal_PitchAngle = angle;
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
//设置云台航向角度
... ... @@ -494,23 +445,20 @@ T_JZsdkReturnCode Gimbal_Get_PitchFineTuning()
T_JZsdkReturnCode Gimbal_Obtain_Gimbal_Pitch(int Pitch)
{
//目前只有A1修改了真实角度值
if (DEVICE_VERSION == TF_A1)
//目前 U3和 H1T会接受到云台返回值
if (DEVICE_VERSION == JZ_U3)
{
//如果接受到的实际角度 - 飞机角度 + 微调角度 > 900 就不处理,避免角度左脚踩右脚上天
if ( (Pitch - Gimbal_UavSelfPitch + Get_V3S_TFA1_motor_precise_adjustment_pitch()) >900)
{
//Gimbal_PitchAngle不变
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else
{
Gimbal_PitchAngle = (Pitch + Gimbal_UavSelfPitch - Get_V3S_TFA1_motor_precise_adjustment_pitch());
}
//不处理,避免出现什么问题
}
else if (DEVICE_VERSION == JZ_H1T)
{
Gimbal_PitchAngle = Pitch;
}
else
{
//不处理,避免出现什么问题
}
}
/**************************************************************
... ... @@ -530,9 +478,6 @@ T_JZsdkReturnCode Gimbal_PitchSelfangleMode(int Pitch)
Gimbal_UavSelfPitch = Pitch;
//设置云台角度
Gimbal_Set_PitchAngle(Gimbal_PitchAngle);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
... ... @@ -541,7 +486,7 @@ T_JZsdkReturnCode Gimbal_PitchSelfangleMode(int Pitch)
T_JZsdkReturnCode Gimbal_PitchScaleMode(int value)
{
int angle;
if (DEVICE_VERSION == TF_A1)
if (DEVICE_VERSION == TF_A1 || DEVICE_VERSION == JZ_U3 || DEVICE_VERSION == JZ_H150S || DEVICE_VERSION == JZ_H150T)
{
//0~100 转化为 -900~0
angle = value*9 -900;
... ... @@ -561,7 +506,9 @@ T_JZsdkReturnCode Gimbal_PitchRotationMode(int value)
{
int angle;
if (DEVICE_VERSION == TF_A1)
//JZSDK_LOG_DEBUG("拨轮控制");
if (DEVICE_VERSION == TF_A1 || DEVICE_VERSION == JZ_H150S || DEVICE_VERSION == JZ_H150T )
{
angle = Gimbal_PitchAngle + value;
if (angle > 0)
... ... @@ -594,7 +541,7 @@ T_JZsdkReturnCode Gimbal_ReplyPitchToUAV(int angle)
{
int value;
if (DEVICE_VERSION == TF_A1)
if (DEVICE_VERSION == TF_A1 || DEVICE_VERSION == JZ_H150S || DEVICE_VERSION == JZ_H150T )
{
//-900~0 转回 0~100
value = (angle+ 900)/9;
... ... @@ -608,4 +555,204 @@ T_JZsdkReturnCode Gimbal_ReplyPitchToUAV(int angle)
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
//设置云台俯仰角度
static T_JZsdkReturnCode Gimbal_Set_RealPitchAngle(int angle)
{
printf("设置真实俯仰角度\n");
if (DEVICE_VERSION == JZ_H150S || DEVICE_VERSION == JZ_H150T)
{
//获取飞机微调角度
int AdjustmentPitch;
Gimbal_H3_H150ST_CheckStatus_GimbalFineTuning(&AdjustmentPitch);
//叠加飞机角度和微调角度
Gimbal_RealPitchAngle = angle - Gimbal_UavSelfPitch + AdjustmentPitch;
//修正angle值
if (Gimbal_RealPitchAngle < -900)
{
angle = -900;
}
else if (Gimbal_RealPitchAngle > 0)
{
angle = 0;
}
else
{
angle = Gimbal_RealPitchAngle;
}
//发送到云台函数
H3_H150ST_Gimbal_SetAngle(angle);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else if (DEVICE_VERSION == JZ_H10)
{
//获取飞机微调角度
int AdjustmentPitch;
Gimbal_H3_H10_CheckStatus_GimbalFineTuning(&AdjustmentPitch);
//叠加飞机角度和微调角度
Gimbal_RealPitchAngle = angle - Gimbal_UavSelfPitch + AdjustmentPitch;
//修正angle值
if (Gimbal_RealPitchAngle < -600)
{
angle = -600;
}
else if (Gimbal_RealPitchAngle > 0)
{
angle = 0;
}
else
{
angle = Gimbal_RealPitchAngle;
}
//发送到云台函数
Gimbal_H3_H10_set_angle(angle);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else if (DEVICE_VERSION == JZ_H10T)
{
//获取飞机微调角度
int AdjustmentPitch;
Gimbal_V3S_H10T_CheckStatus_GimbalFineTuning(&AdjustmentPitch);
//叠加飞机角度和微调角度
Gimbal_RealPitchAngle = angle - Gimbal_UavSelfPitch + AdjustmentPitch;
//修正angle值
if (Gimbal_RealPitchAngle < -600)
{
angle = -600;
}
else if (Gimbal_RealPitchAngle > 0)
{
angle = 0;
}
else
{
angle = Gimbal_RealPitchAngle;
}
//发送到云台函数
Gimbal_V3S_H10T_set_angle(angle);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else if (DEVICE_VERSION == JZ_U3)
{
//获取飞机微调角度
int AdjustmentPitch;
Gimbal_V3S_U3_CheckStatus_GimbalFineTuning(&AdjustmentPitch);
//叠加飞机角度和微调角度
Gimbal_RealPitchAngle = angle - Gimbal_UavSelfPitch + AdjustmentPitch;
//修正angle值
if (Gimbal_RealPitchAngle < -900)
{
angle = -900;
}
else if (Gimbal_RealPitchAngle > 0)
{
angle = 0;
}
else
{
angle = Gimbal_RealPitchAngle;
}
//发送到控制云台函数
Gimbal_V3S_U3_set_angle(angle);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else if (DEVICE_VERSION == TF_A1)
{
//叠加飞机角度和微调角度
Gimbal_RealPitchAngle = angle - Gimbal_UavSelfPitch + Get_V3S_TFA1_motor_precise_adjustment_pitch();
//修正angle值
if (Gimbal_RealPitchAngle < -900)
{
angle = -900;
}
else if (Gimbal_RealPitchAngle > 0)
{
angle = 0;
}
else
{
angle = Gimbal_RealPitchAngle;
}
//发送到V3S_TFA1控制云台函数
Gimbal_V3S_TFA1_set_angle(angle);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
else if (DEVICE_VERSION == JZ_H1T)
{
}
}
/**************************
*
*
* 云台角度发送线程
*
*
* ***************************/
static void *Gimbal_SendAngleTask(void *arg)
{
int angle;
int UAV_self_angle;
while (1)
{
if (Gimbal_PitchAngle != angle || Gimbal_UavSelfPitch != UAV_self_angle)
{
angle = Gimbal_PitchAngle;
UAV_self_angle = Gimbal_UavSelfPitch;
Gimbal_Set_RealPitchAngle(angle);
}
delayMs(1);
}
}
static int Gimbal_SendAngleTask_Init()
{
pthread_t WriteDataTask;
pthread_attr_t task_attribute; //线程属性
pthread_attr_init(&task_attribute); //初始化线程属性
pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程分离属性
int opus_Protection = pthread_create(&WriteDataTask,&task_attribute,Gimbal_SendAngleTask,NULL); //线程
if(opus_Protection != 0)
{
JZSDK_LOG_ERROR("创建控件写入线程失败!");
return -1;
}
}
\ No newline at end of file
... ...
... ... @@ -25,6 +25,11 @@ static void *Gimbal_V3S_H10T_Motor_control(void *arg);
static int V3S_H10T_Read_MotorAdjustmentPitch(void);
static void V3S_H10T_Write_MotorAdjustmentPitch(int MotorAdjustmentPitch);
int Gimbal_V3S_H10T_CheckStatus_GimbalFineTuning(int *AdjustmentPitch)
{
*AdjustmentPitch = V3S_H10T_motor_precise_adjustment_pitch;
}
void Gimbal_V3S_H10T_init_motor(void)
{
V3S_H10T_motor_precise_adjustment_pitch = V3S_H10T_Read_MotorAdjustmentPitch();//获取微调角度-读文件获取
... ... @@ -34,35 +39,7 @@ void Gimbal_V3S_H10T_init_motor(void)
int Gimbal_V3S_H10T_set_angle(int angle)
{
pthread_t MOTOR_task;
pthread_attr_t task_attribute; //线程属性
pthread_attr_init(&task_attribute); //初始化线程属性
pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程属性
int *arg = (int*) malloc(sizeof(int)); // 分配动态内存
*arg = angle; // 将参数值保存到动态内存中
int angle_ret = pthread_create(&MOTOR_task,&task_attribute,Gimbal_V3S_H10T_Motor_control,arg); //TTS mobie
if(angle_ret != 0)
{
printf("创建motor线程失败!\n");
return -1;
}
else
{
printf("创建motor线程成功\n");
}
return 0;
}
//控制电机线程
static void *Gimbal_V3S_H10T_Motor_control(void *arg)
{
//传入的角度 -600~0
int angle = *(int*)arg;
int PWM_num = 0;
printf("V3S_H10T_angle:%d\n",angle);
... ... @@ -94,10 +71,9 @@ static void *Gimbal_V3S_H10T_Motor_control(void *arg)
}
Ircut_PWM_control(PWM_num);
free(arg); // 在线程函数中释放动态内存
}
//微调向上
void V3S_H10T_gimbal_up(void)
{
... ...
... ... @@ -24,6 +24,7 @@ extern "C" {
/* Exported functions --------------------------------------------------------*/
int Gimbal_V3S_H10T_set_angle(int angle);
void Gimbal_V3S_H10T_init_motor(void);
int Gimbal_V3S_H10T_CheckStatus_GimbalFineTuning(int *AdjustmentPitch);
... ...
... ... @@ -21,7 +21,6 @@
static int V3S_TFA1_motor_precise_adjustment_pitch =0;//默认微调值为0
static void *Gimbal_V3S_TFA1_Motor_control(void *arg);
static int V3S_TFA1_Read_MotorAdjustmentPitch(void);
static void V3S_TFA1_Write_MotorAdjustmentPitch(int MotorAdjustmentPitch);
... ... @@ -55,62 +54,9 @@ static int Gimbal_TFA1_sendAngle(int angle)
int Gimbal_V3S_TFA1_set_angle(int angle)
{
Gimbal_TFA1_sendAngle(angle);
// pthread_t MOTOR_task;
// pthread_attr_t task_attribute; //线程属性
// pthread_attr_init(&task_attribute); //初始化线程属性
// pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程属性
// int *arg = (int*) malloc(sizeof(int)); // 分配动态内存
// *arg = angle; // 将参数值保存到动态内存中
// int angle_ret = pthread_create(&MOTOR_task,&task_attribute,Gimbal_V3S_TFA1_Motor_control,arg); //TTS mobie
// if(angle_ret != 0)
// {
// printf("创建motor线程失败!\n");
// return -1;
// }
// else
// {
// printf("创建motor线程成功\n");
// }
// return 0;
}
//控制电机线程
static void *Gimbal_V3S_TFA1_Motor_control(void *arg)
{
//传入的角度 -900~0
int angle = *(int*)arg;
//微调角度值 移动到上一步
//angle = angle + V3S_TFA1_motor_precise_adjustment_pitch;
printf("V3S_TFA1_RealAngle:%d\n",angle);
if(angle >= 0 )
{
angle = 0;
}
else if(angle <= -900)
{
angle = -900;
}
else if( (angle > -900) && (angle < 0) )
{
//angle不变
}
//发送角度给串口2
JZsdk_Uart_Send_SetGimbalPitch(UART_DEV_2, angle);
free(arg); // 在线程函数中释放动态内存
}
//云台微调
T_JZsdkReturnCode Gimbal_V3S_TFA1_set_PitchFineTuning(int Pitch)
{
... ...
... ... @@ -34,38 +34,7 @@ void Gimbal_V3S_U3_init_motor(void)
int Gimbal_V3S_U3_set_angle(int angle)
{
pthread_t MOTOR_task;
pthread_attr_t task_attribute; //线程属性
pthread_attr_init(&task_attribute); //初始化线程属性
pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程属性
int *arg = (int*) malloc(sizeof(int)); // 分配动态内存
*arg = angle; // 将参数值保存到动态内存中
int angle_ret = pthread_create(&MOTOR_task,&task_attribute,Gimbal_V3S_U3_Motor_control,arg); //TTS mobie
if(angle_ret != 0)
{
printf("创建motor线程失败!\n");
return -1;
}
else
{
printf("创建motor线程成功\n");
}
return 0;
}
//控制电机线程
static void *Gimbal_V3S_U3_Motor_control(void *arg)
{
//传入的角度 -900~0
int angle = *(int*)arg;
//微调角度值
angle = angle + V3S_U3_motor_precise_adjustment_pitch;
printf("V3S_U3_angle:%d\n",angle);
if(angle >= 0 )
... ... @@ -84,8 +53,6 @@ static void *Gimbal_V3S_U3_Motor_control(void *arg)
//发送角度给串口2
JZsdk_Uart_Send_SetGimbalPitch(UART_DEV_2, angle);
free(arg); // 在线程函数中释放动态内存
}
//云台微调
... ...
... ... @@ -11,8 +11,13 @@
static int SearchLight_Frequency; //探照灯频率
static int SearchLight_Mode; //探照灯模式
static int SearchLight_LeftLumen; //探照灯左灯亮度
static int SearchLight_RightLumen; //探照灯右灯亮度
static int SearchLight_LeftLumen; //探照灯设置左灯亮度
static int SearchLight_RightLumen; //探照灯设置右灯亮度
static int SearchLight_RealLeftLumen; //探照灯实际左灯亮度
static int SearchLight_RealRightLumen; //探照灯实际右灯亮度
static int SearchLight_LeftTemperature; //探照灯左边温度
static int SearchLight_RightTemperature; //探照灯右边温度
... ... @@ -119,8 +124,30 @@ T_JZsdkReturnCode Lighting_Set_SearchLightLumen(int LeftLumen, int RightLumen)
{
printf("设置%x探照灯灯光亮度\n",DEVICE_VERSION);
if (LeftLumen >= 100)
{
LeftLumen = 100;
}
else if (LeftLumen <= 0)
{
LeftLumen = 0;
}
if (RightLumen >= 100)
{
RightLumen = 100;
}
else if (RightLumen <= 0)
{
RightLumen = 0;
}
if (DEVICE_VERSION == JZ_U3)
{
SearchLight_RightLumen = RightLumen;
SearchLight_LeftLumen = LeftLumen;
return SearchLight_V3S_U3_Set_SearchLightLumen(LeftLumen, RightLumen);
}
else if (DEVICE_VERSION == JZ_H1T)
... ... @@ -129,6 +156,8 @@ T_JZsdkReturnCode Lighting_Set_SearchLightLumen(int LeftLumen, int RightLumen)
}
else if (DEVICE_VERSION == TF_A1)
{
SearchLight_RightLumen = RightLumen;
SearchLight_LeftLumen = LeftLumen;
return SearchLight_V3S_TFA1_Set_SearchLightLumen(LeftLumen, RightLumen);
}
... ... @@ -140,13 +169,24 @@ T_JZsdkReturnCode Lighting_Obtain_SearchLightLumen(int LeftLumen, int RightLumen
{
printf("接收到%x探照灯灯光亮度 左灯%d 右灯%d\n",DEVICE_VERSION, LeftLumen, RightLumen);
SearchLight_RightLumen = RightLumen;
SearchLight_LeftLumen = LeftLumen;
//如果是主喊话器副灯的单一设备
if (DEVICE_VERSION == TF_A1 || DEBUG_VERSION == JZ_U3)
{
SearchLight_RealRightLumen = RightLumen;
SearchLight_RealLeftLumen = LeftLumen;
}
else
{
SearchLight_RightLumen = RightLumen;
SearchLight_LeftLumen = LeftLumen;
}
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
//获取探照灯的灯光亮度
//获取探照灯设置的灯光亮度
T_JZsdkReturnCode Lighting_Get_SearchLightLumen(int *LeftLumen, int *RightLumen)
{
*LeftLumen = SearchLight_LeftLumen;
... ... @@ -212,53 +252,6 @@ T_JZsdkReturnCode Lighting_CheckStatus_SearchLightFrequency()
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
/********************************************************************************************************************************
*
* 探照灯 温度相关
*
********************************************************************************************************************************/
static int Light_Luminance_StepBack_Calculation(int temper, int liumin)
{
//以下为假设值 未经实测
//以70度 为过热标准 91 为顶峰
//70度~ 73 度时 每次降低2亮度
//74~78时 每次降低3
//79~84时 每次降低5
//85~ 91时 每次降低8
//大于91时 每次降低12
//不过超过80后 灯那边会被强制关掉
int StepBackValue = 0;
if ( (temper >= 70 ) && (temper <= 73) )
{
StepBackValue = 1;
}
else if ( (temper >= 74 ) && (temper <= 78) )
{
StepBackValue = 2;
}
else if ( (temper >= 79 ) && (temper <= 84) )
{
StepBackValue = 4;
}
else if ( (temper >= 85 ) && (temper <= 91))
{
StepBackValue = 6;
}
else if ( (temper > 91 ))
{
StepBackValue = 8;
}
else
{
StepBackValue = 0;
}
return (liumin - StepBackValue);
}
//收到并修改探照灯的温度(中继修改)
T_JZsdkReturnCode Lighting_Obtain_SearchLightTemperature(int LeftTemperature, int RightTemperature)
{
... ... @@ -277,18 +270,14 @@ T_JZsdkReturnCode Lighting_Obtain_SearchLightTemperature(int LeftTemperature, in
//如果是JZ u3
if (DEVICE_VERSION == JZ_U3)
{
if (Max_tmeperature >= 70)
//温控开始
TempLumen = JZsdk_SearchLightTemControl_Input(Max_tmeperature, Max_Liuminance);
if (TempLumen != Max_Liuminance)
{
//温控开始
Max_Liuminance = Light_Luminance_StepBack_Calculation(Max_tmeperature, Max_Liuminance);
//重设亮度
Lighting_Set_SearchLightLumen(Max_Liuminance, Max_Liuminance);
UIcontrol_Set_SearchLightLumen(NO_SPECIFIED, 0, TempLumen, TempLumen);
}
}
if (DEVICE_VERSION == TF_A1)
{
... ... @@ -298,13 +287,10 @@ T_JZsdkReturnCode Lighting_Obtain_SearchLightTemperature(int LeftTemperature, in
if (TempLumen != Max_Liuminance)
{
//重设亮度
//Lighting_Set_SearchLightLumen(TempLumen, TempLumen);
UIcontrol_Set_SearchLightLumen(NO_SPECIFIED, 0, TempLumen, TempLumen);
}
}
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
... ... @@ -454,4 +440,14 @@ T_JZsdkReturnCode Lighting_CheckStatus_WarningLightColor(int *ValueColor1, int *
Lighting_Get_WarningLight_Status(ValueColor1, ValueColor2);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/*********
*
*刷新亮度函数
*
**********/
T_JZsdkReturnCode JZsdk_SearchLight_FlushLumen(int InputLumen)
{
JZsdk_SearchLightTemControl_FlushLumen(InputLumen);
}
\ No newline at end of file
... ...
... ... @@ -53,6 +53,8 @@ T_JZsdkReturnCode Lighting_Obtain_WarningLight_Color(int color1, int color2);
T_JZsdkReturnCode Lighting_Get_WarningLight_Color(int *color1, int *color2);
T_JZsdkReturnCode Lighting_CheckStatus_WarningLightColor(int *ValueColor1, int *ValueColor2);
T_JZsdkReturnCode JZsdk_SearchLight_FlushLumen(int InputLumen);
#ifdef __cplusplus
}
#endif
... ...
... ... @@ -5,11 +5,13 @@
typedef enum {
DEFAULT_STATUS = 0x0000, //默认状态
LUMEN_UP = 0x0001, //温度提高
LUMEN_DOWN =0x0002, //温度降低
LUMEN_UP = 0x0001, //亮度提高
LUMEN_DOWN =0x0002, //亮度降低
} JZ_TemControl_Code;
// typedef enum {
// JZ_T30 = 0x0000,
// JZ_T60 = 0x0001,
... ... @@ -20,6 +22,7 @@ typedef enum {
// } JZ_DeviceModel_Code;
static int InitialLumen = 0; //最初亮度
static int InitialFlag = 0; //最初亮度变化flag
/***
... ... @@ -38,7 +41,11 @@ int JZsdk_SearchLightSetInitialLumen(int value)
InitialLumen = 0;
}
InitialLumen = value;
InitialFlag = DEFAULT_STATUS;
printf("刷新亮度初值%d\n",InitialLumen);
}
/***
... ... @@ -191,14 +198,24 @@ int JZsdk_SearchLightTemControl(float InputTemp, int InputLumen, int *OutputLume
if (ControlFlag == LUMEN_DOWN)
{
*OutputLumen = InputLumen - 1;
//由于温度需要下降,说明初值亮度还是太高了
//将初值亮度降低2点
InitialLumen = InitialLumen-2;
//如果在亮度回升期间,需要降低亮度
if (InitialFlag == LUMEN_UP)
{
//由于温度需要下降,说明初值亮度还是太高了
//将初值亮度降低1点
InitialLumen = InitialLumen-1;
printf("触发降低初值%d\n",InitialLumen);
InitialFlag = LUMEN_DOWN;
}
}
else if (ControlFlag == LUMEN_UP)
{
*OutputLumen = InputLumen + 1;
//如果亮度回升了
InitialFlag = LUMEN_UP;
}
else
{
... ... @@ -210,3 +227,20 @@ int JZsdk_SearchLightTemControl(float InputTemp, int InputLumen, int *OutputLume
return 0;
}
/***
*
* 用于判断是否超出最大温度范围10度
* 用于超出温度时的直接关灯
* 超过最大范围10度后 返回1
* 不超返回0
* ****/
int JZsdk_SearchLightTemControl_WhetherExceedsMaxRange(int InputTemp)
{
int LimitTemp = (JZsdk_SearchLightGetLimitTemp(DEVICE_VERSION) + 10);
if (InputTemp > LimitTemp)
{
return 1;
}
return 0;
}
\ No newline at end of file
... ...
... ... @@ -15,6 +15,7 @@
int JZsdk_SearchLightSetInitialLumen(int value);
int JZsdk_SearchLightTemControl(float InputTemp, int InputLumen, int *OutputLumen, int *OutputDelay);
int JZsdk_SearchLightTemControl_WhetherExceedsMaxRange(int InputTemp);
#endif
... ...
... ... @@ -17,16 +17,34 @@ static int g_InputTemp = 0;
static int g_InputLumen = 0;
static int g_OutputLumen = 0;
static int g_OutputLumen_FinishFlag = 0;
//1、输入函数
T_JZsdkReturnCode JZsdk_SearchLightTemControl_Input(int InputTemp, int InputLumen)
{
//1、判断是否超出温控范围了
int ret = JZsdk_SearchLightTemControl_WhetherExceedsMaxRange(InputTemp);
if (ret == 1) //超出最大温度10度
{
//返回亮度0
return 0;
}
//输入参数
g_InputTemp = InputTemp;
g_InputLumen = InputLumen;
delayMs(1);
return g_OutputLumen;
delayMs(2);
//如果触发过温控,则返回温控后的值
if (g_OutputLumen_FinishFlag == JZ_FLAGCODE_ON)
{
g_OutputLumen_FinishFlag = JZ_FLAGCODE_OFF;
return g_OutputLumen;
}
return g_InputLumen;
}
//2、刷新亮度函数
... ... @@ -44,6 +62,7 @@ static void *TempControl_Task(void *arg)
while (1)
{
JZsdk_SearchLightTemControl( (float)g_InputTemp, g_InputLumen, &g_OutputLumen, &DelayTime);
g_OutputLumen_FinishFlag = JZ_FLAGCODE_ON;
if (DelayTime > 0)
{
... ...
... ... @@ -20,10 +20,14 @@ T_JZsdkReturnCode SearchLight_V3S_TFA1_SearchLightControl(int mode)
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_JZsdkReturnCode SearchLight_V3S_TFA1_Set_SearchLightLumen(int LeftLumen, int RightLumen)
{
//向u3的单片机发送探照灯控制帧
//向tfa1的单片机发送探照灯控制帧
JZsdk_Uart_Send_SearchLight_SetLumen(UART_DEV_2, LeftLumen, RightLumen);
//向tfa1的单片机发送查询亮度帧
//JZsdk_Uart_Send_SearchLight_CheckStatus_Lumen(UART_DEV_2);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
\ No newline at end of file
... ...
... ... @@ -13,8 +13,12 @@
#include "opus/Megaphone_Opus.h"
#include "UI_control.h"
#include "JZsdkLib.h"
#include "ircut.h"
#include "version_choose.h"
/****************************************************************************************************************************************************
*
* 接收外部接口部分
... ... @@ -52,9 +56,21 @@ int Megaphone_Init()
else if (APP_VERSION == APP_UART)
{
//播放喊话器启动中
Megaphone_TTS_Play(strlen("喊话器直连模式启动中"),"喊话器直连模式启动中", 0);
if (SPECIAL_VERSION == SPECIAL_DAOTONG)
{
//设置语音为英文
Megaphone_TTS_SetTone(0x11);
//播放喊话器启动中
Megaphone_TTS_Play(strlen("The direct connection mode of the speaker is being activated"),"The direct connection mode of the speaker is being activated", 0);
}
else
{
//播放喊话器启动中
Megaphone_TTS_Play(strlen("喊话器直连模式启动中"),"喊话器直连模式启动中", 0);
}
}
#elif FIRMWARE_ORIGIN == OVERSEAS_VERSION //海外版才有其他国家的语音
... ... @@ -219,14 +235,17 @@ T_JZsdkReturnCode Megaphone_audio_PlayPause()
//2、向音频库发送暂停音乐帧
Music_SendFrame_PauseMusic();
// while (Megaphone_get_play_status() == 0x10)
// {
// delayMs(1);
// }
//3、关闭TTS播放 理论上这里没有TTS需要关闭,但是以防万一还是加上
TTS_ttsPlayStop();
//4、关闭opus播放
Opus_OpusPlayStop();
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/*********
... ... @@ -242,6 +261,11 @@ T_JZsdkReturnCode Megaphone_audio_PlayStop()
//2、向音频库发送暂停音乐帧
Music_SendFrame_PauseMusic();
// while (Megaphone_get_play_status() == 0x10)
// {
// printf("循环暂停\n");
// delayMs(1);
// }
//3、关闭TTS播放
TTS_ttsPlayStop();
... ... @@ -680,8 +704,6 @@ T_JZsdkReturnCode Megaphone_RealTimeVoice_Trans(char *data, int length)
**********/
T_JZsdkReturnCode Megaphone_RealTimeVoice_Close()
{
//1、关闭解码器
Opus_RealTimeVoice_Close();
... ...
... ... @@ -584,6 +584,7 @@ void returnframe(char* data, int datasize)//回调函数,监听播放状态
//回复关闭状态
Megaphone_Reply_PlayStatus_end();
}
}
else
... ...
... ... @@ -123,7 +123,7 @@ static int Music_RealTimeMP2_PlayData(unsigned char *data,int len)
{
unsigned char playFile[len + 9 + 2];
//printf("播放开始\n");
printf("播放开始\n");
//清空
... ... @@ -146,7 +146,7 @@ static int Music_RealTimeMP2_PlayData(unsigned char *data,int len)
Music_SendFrame_FramePlay(playFile,len);
//printf("播放结束\n");
printf("播放结束\n");
return 0;
}
... ... @@ -170,13 +170,13 @@ static void *Music_RealTimeMP2_LoopPlay(void *arg)
}
}
printf("开始播放函数\n");
printf("开始播放函数\n");
while(Music_RealTimeMP2__PlayData_LoopReadFlag != JZ_FLAGCODE_OFF)
{
if(Music_RealTimeMP2_PlayData_LoopHead!=Music_RealTimeMP2_PlayData_LoopEnd)
{
//printf("播放线程执行中\n");
printf("播放线程执行中\n");
ret = Music_RealTimeMP2_PlayData(Music_RealTimeMP2_PlayData_Loop[Music_RealTimeMP2_PlayData_LoopHead],128);
Music_RealTimeMP2_PlayData_LoopHead++;
... ... @@ -263,7 +263,7 @@ static void *Music_RealTimeMP2_WriteData_Task(void *arg)
if(Music_RealTimeMP2_WriteData_LoopHead!=Music_RealTimeMP2_WriteData_LoopEnd)
{
//printf("缓冲线程写入中\n");
printf("缓冲线程写入中\n");
//将输入缓冲池的数据放入播放缓冲池
Music_RealTimeMP2_Put_WriteData_In_PlayLoop();
... ... @@ -321,7 +321,7 @@ static int Music_RealTimeMP2_WriteDataToLoop(unsigned char *buf,int length)
//写入处理
//① 、检查池子当前组内有无剩余数据,如果池子当前组有剩 上次写入的语音数据, 接着往里面写入
if ( (Music_RealTimeMP2_WriteData_ResidueLenth > 0) && (ReadTimeMP2_StatusFlag == JZ_FLAGCODE_ON)) //如果残留物有长度
if (Music_RealTimeMP2_WriteData_ResidueLenth > 0) //如果残留物有长度
{
if (Music_RealTimeMP2_WriteData_ResidueLenth + length < 128)
... ... @@ -364,9 +364,9 @@ static int Music_RealTimeMP2_WriteDataToLoop(unsigned char *buf,int length)
//②、从新的组处理数据W
//②、从新的组处理数据
//待处理数据超过128长度时
while( (length - temp_lenth) >= 128 && (ReadTimeMP2_StatusFlag == JZ_FLAGCODE_ON) )
while( (length - temp_lenth) >= 128)
{
// 在写入解码前加锁
pthread_mutex_lock(&RealTimeMP2_WriteDataLock);
... ... @@ -395,7 +395,7 @@ static int Music_RealTimeMP2_WriteDataToLoop(unsigned char *buf,int length)
}
//③、如果长度还有剩,把数据存到池子内的新组,并记录残留物长度
if( (length - temp_lenth) > 0 && (ReadTimeMP2_StatusFlag == JZ_FLAGCODE_ON) )
if( (length - temp_lenth) > 0)
{
for ( ; temp_lenth < length ; Music_RealTimeMP2_WriteData_ResidueLenth++)
{
... ...
... ... @@ -46,8 +46,8 @@ static int Opus_RealTimeVoice_WriteData_ResidueLenth; // 写入缓存池池子
static int Opus_RealTimeVoice_WriteDataFlag=0;//读取标志位0为停止,1为开始
static int Opus_RealTimeVoice_WriteDataStopFlag = 0;
pthread_mutex_t WriteDataLock = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t WriteCond = PTHREAD_COND_INITIALIZER;
static pthread_mutex_t WriteDataLock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t WriteCond = PTHREAD_COND_INITIALIZER;
int WriteDataFlag = 0;
static void Opus_RealTimeVoice_WriteDataHeadReset();
... ... @@ -331,8 +331,13 @@ int Opus_RealTimeVoice_WriteDataToLoop(unsigned char *buf,int length)
JZSDK_LOG_ERROR("输入进缓冲池的数据长度有误:%d",length);
return -1;
}
if (ReadTimeVoice_StatusFlag != JZ_FLAGCODE_ON)
{
JZSDK_LOG_ERROR("实时喊话未开启");
return -1;
}
//写入处理
//① 、检查池子当前组内有无剩余数据,如果池子当前组有剩 上次写入的语音数据, 接着往里面写入
if (Opus_RealTimeVoice_WriteData_ResidueLenth > 0) //如果残留物有长度
... ...
... ... @@ -211,7 +211,7 @@ static void *PlayFixedFile_task(void *arg)
timeNum = 0;
//播放结束延迟
while ( (timeNum <=2500) && (Opus_play_Flag == 1))
while ( (timeNum <=3000) && (Opus_play_Flag == 1))
{
delayMs(10);
timeNum +=10;
... ... @@ -225,7 +225,7 @@ static void *PlayFixedFile_task(void *arg)
timeNum = 0;
//播放结束延迟
while ((RecordVoiceOpusLoopPlayMode == 1) && (timeNum <=2500) && (Opus_play_Flag == 1))
while ((RecordVoiceOpusLoopPlayMode == 1) && (timeNum <=3000) && (Opus_play_Flag == 1))
{
delayMs(10);
timeNum +=10;
... ...
... ... @@ -1005,7 +1005,7 @@ T_JZsdkReturnCode UIcontrol_Set_SearchLightLumen(int DeviceName, int WeatherFlus
if (WeatherFlush == 1)
{
JZsdk_SearchLightTemControl_FlushLumen(MAX(value1,value2));
JZsdk_SearchLight_FlushLumen(MAX(value1,value2));
}
delayMs(10);
... ...
#1、输入设备名字,程序模式,硬件号,版本号
payload_name="JZ_H150T"
payload_name="JZ_H1E"
payload_mode="APP_UART" # APP_PSDK 或者 APP_UART
payload_platform="PLATFORM_H3"
payload_version="V00.00.01.02"
payload_platform="PLATFORM_V3S"
payload_version="V00.00.01.03"
payload_origin="DOMESTIC_VERSION" # 国内版DOMESTIC_VERSION 海外版OVERSEAS_VERSION
#2、根据负载选择滤波方式,目前仅h10使用带阻滤波
#high_pass_filtering
... ...
... ... @@ -204,11 +204,29 @@ int Main_WorkModeSet(int mode)
else if (APP_VERSION == APP_UART)
{
//播报喊话器准备就绪
delayMs(3500);
if (SPECIAL_VERSION == SPECIAL_DAOTONG)
{
//设置语音为英文
Megaphone_TTS_SetTone(0x11);
//播放喊话器启动中
Megaphone_TTS_Play(strlen("喊话器直连模式准备就绪"), "喊话器直连模式准备就绪", 0);
//播放喊话器启动中
Megaphone_TTS_Play(strlen("Speaker Direct Mode Ready"),"Speaker Direct Mode Ready", 0);
delayMs(1000);
//设置语音为中文
Megaphone_TTS_SetTone(0x01);
}
else
{
//播报喊话器准备就绪
delayMs(3500);
//播放喊话器启动中
Megaphone_TTS_Play(strlen("喊话器直连模式准备就绪"), "喊话器直连模式准备就绪", 0);
}
}
... ...
... ... @@ -22,7 +22,7 @@ int main()
//前者可用于 uart连接对外接口 或者是 通过uart控制的psdk
//后者则是用于直接镶套在psdk程序里面
printf("JZ串口程序 Version%x.%x.%x.%x\n",MAJOR_VERSION, MINOR_VERSION, MODIFY_VERSION, DEBUG_VERSION);
JZSDK_LOG_DEBUG("%x,UartVersion%x.%x.%x.%x\n",DEVICE_VERSION,MAJOR_VERSION, MINOR_VERSION, MODIFY_VERSION, DEBUG_VERSION);
JZsdk_LibInit();
if (APP_VERSION == APP_UART)
... ...
... ... @@ -7,7 +7,7 @@
#define VERSION_CHOOSE_H
//1~10行 除了D可以修改版本选择 禁止动任何东西
#define DEVICE_VERSION JZ_H150T
#define DEVICE_VERSION JZ_H150S
//禁止修改行 选择是串口程序 还是 psdk程序
#define APP_VERSION APP_UART
... ... @@ -19,7 +19,7 @@
#define MAJOR_VERSION 0x00
#define MINOR_VERSION 0x00
#define MODIFY_VERSION 0x01
#define DEBUG_VERSION 0x02
#define DEBUG_VERSION 0x03
//禁止修改行 滤波方式
#define FILTERING_TYPE HIGH_PASS_FILTERING
... ... @@ -27,6 +27,13 @@
//禁止修改行固件属地 目前 国内版/海外版
#define FIRMWARE_ORIGIN DOMESTIC_VERSION
//指定特殊固件
#define SPECIAL_VERSION SPECIAL_DAOTONG
//特殊版本号
#define SPECIAL_NORMAL 0x01
#define SPECIAL_DAOTONG 0x02
//软件模式
#define APP_PSDK 0x01 //psdk设备
#define APP_UART 0x02 //串口设备
... ...
... ... @@ -28,20 +28,20 @@ The CXX compiler identification is GNU, found in "/mnt/hgfs/share/展架程序/b
Detecting C compiler ABI info compiled with the following output:
Change Dir: /mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_5f42a/fast && make: Warning: File 'Makefile' has modification time 7.1 s in the future
/usr/bin/make -f CMakeFiles/cmTC_5f42a.dir/build.make CMakeFiles/cmTC_5f42a.dir/build
Run Build Command(s):/usr/bin/make -f Makefile cmTC_9575b/fast && make: Warning: File 'Makefile' has modification time 0.079 s in the future
/usr/bin/make -f CMakeFiles/cmTC_9575b.dir/build.make CMakeFiles/cmTC_9575b.dir/build
make[1]: Entering directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp'
make[1]: Warning: File 'CMakeFiles/cmTC_5f42a.dir/flags.make' has modification time 7.1 s in the future
Building C object CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -o CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c
make[1]: Warning: File 'CMakeFiles/cmTC_9575b.dir/flags.make' has modification time 0.075 s in the future
Building C object CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -o CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c
Using built-in specs.
COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc
Target: arm-cortexa9-linux-gnueabihf
Configured with: /work/toolchain/build/src/gcc-4.9.3/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortexa9-linux-gnueabihf --prefix=/opt/FriendlyARM/toolchain/4.9.3 --with-sysroot=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-languages=c,c++ --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3 --with-float=hard --with-pkgversion=ctng-1.21.0-229g-FA --with-bugurl=http://www.friendlyarm.com/ --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpfr=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpc=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-isl=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-cloog=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-libelf=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gold --disable-multilib --with-local-prefix=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-long-long
Thread model: posix
gcc version 4.9.3 (ctng-1.21.0-229g-FA)
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1 -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_REENTRANT /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o -std=gnu99 -version -o /tmp/ccMabtGh.s
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1 -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_REENTRANT /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o -std=gnu99 -version -o /tmp/cc3aHeBE.s
GNU C (ctng-1.21.0-229g-FA) version 4.9.3 (arm-cortexa9-linux-gnueabihf)
compiled by GNU C version 4.8.4, GMP version 6.0.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
... ... @@ -60,15 +60,15 @@ GNU C (ctng-1.21.0-229g-FA) version 4.9.3 (arm-cortexa9-linux-gnueabihf)
compiled by GNU C version 4.8.4, GMP version 6.0.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: eeb0d0cd8c4112e84e5c64edda5289df
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o /tmp/ccMabtGh.s
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o /tmp/cc3aHeBE.s
GNU assembler version 2.25.1 (arm-cortexa9-linux-gnueabihf) using BFD version (ctng-1.21.0-229g-FA) 2.25.1
COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/
LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
Linking C executable cmTC_5f42a
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5f42a.dir/link.txt --verbose=1
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -rdynamic CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o -o cmTC_5f42a
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
Linking C executable cmTC_9575b
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9575b.dir/link.txt --verbose=1
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -rdynamic CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o -o cmTC_9575b
Using built-in specs.
COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper
... ... @@ -78,8 +78,8 @@ Thread model: posix
gcc version 4.9.3 (ctng-1.21.0-229g-FA)
COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/
LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-rdynamic' '-o' 'cmTC_5f42a' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/ccl77azl.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_5f42a /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib -lm -ldl -lstdc++ CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-rdynamic' '-o' 'cmTC_9575b' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/ccYDc8uH.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_9575b /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib -lm -ldl -lstdc++ CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp'
make: warning: Clock skew detected. Your build may be incomplete.
... ... @@ -105,20 +105,20 @@ Parsed C implicit link information from above output:
link line regex: [^( *|.*[/\])(arm-cortexa9-linux-gnueabihf-ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: /mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp]
ignore line: []
ignore line: [Run Build Command(s):/usr/bin/make -f Makefile cmTC_5f42a/fast && make: Warning: File 'Makefile' has modification time 7.1 s in the future]
ignore line: [/usr/bin/make -f CMakeFiles/cmTC_5f42a.dir/build.make CMakeFiles/cmTC_5f42a.dir/build]
ignore line: [Run Build Command(s):/usr/bin/make -f Makefile cmTC_9575b/fast && make: Warning: File 'Makefile' has modification time 0.079 s in the future]
ignore line: [/usr/bin/make -f CMakeFiles/cmTC_9575b.dir/build.make CMakeFiles/cmTC_9575b.dir/build]
ignore line: [make[1]: Entering directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp']
ignore line: [make[1]: Warning: File 'CMakeFiles/cmTC_5f42a.dir/flags.make' has modification time 7.1 s in the future]
ignore line: [Building C object CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -o CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c]
ignore line: [make[1]: Warning: File 'CMakeFiles/cmTC_9575b.dir/flags.make' has modification time 0.075 s in the future]
ignore line: [Building C object CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -o CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc]
ignore line: [Target: arm-cortexa9-linux-gnueabihf]
ignore line: [Configured with: /work/toolchain/build/src/gcc-4.9.3/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortexa9-linux-gnueabihf --prefix=/opt/FriendlyARM/toolchain/4.9.3 --with-sysroot=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-languages=c c++ --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3 --with-float=hard --with-pkgversion=ctng-1.21.0-229g-FA --with-bugurl=http://www.friendlyarm.com/ --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpfr=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpc=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-isl=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-cloog=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-libelf=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl -Bstatic -lstdc++ -Bdynamic -lm' --enable-threads=posix --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gold --disable-multilib --with-local-prefix=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-long-long]
ignore line: [Thread model: posix]
ignore line: [gcc version 4.9.3 (ctng-1.21.0-229g-FA) ]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1 -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_REENTRANT /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o -std=gnu99 -version -o /tmp/ccMabtGh.s]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1 -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_REENTRANT /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o -std=gnu99 -version -o /tmp/cc3aHeBE.s]
ignore line: [GNU C (ctng-1.21.0-229g-FA) version 4.9.3 (arm-cortexa9-linux-gnueabihf)]
ignore line: [ compiled by GNU C version 4.8.4 GMP version 6.0.0 MPFR version 3.1.3 MPC version 1.0.3]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
... ... @@ -137,15 +137,15 @@ Parsed C implicit link information from above output:
ignore line: [ compiled by GNU C version 4.8.4 GMP version 6.0.0 MPFR version 3.1.3 MPC version 1.0.3]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [Compiler executable checksum: eeb0d0cd8c4112e84e5c64edda5289df]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o /tmp/ccMabtGh.s]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o /tmp/cc3aHeBE.s]
ignore line: [GNU assembler version 2.25.1 (arm-cortexa9-linux-gnueabihf) using BFD version (ctng-1.21.0-229g-FA) 2.25.1]
ignore line: [COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/]
ignore line: [LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [Linking C executable cmTC_5f42a]
ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5f42a.dir/link.txt --verbose=1]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -rdynamic CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o -o cmTC_5f42a ]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [Linking C executable cmTC_9575b]
ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9575b.dir/link.txt --verbose=1]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -rdynamic CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o -o cmTC_9575b ]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc]
ignore line: [COLLECT_LTO_WRAPPER=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper]
... ... @@ -155,13 +155,13 @@ Parsed C implicit link information from above output:
ignore line: [gcc version 4.9.3 (ctng-1.21.0-229g-FA) ]
ignore line: [COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/]
ignore line: [LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-rdynamic' '-o' 'cmTC_5f42a' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
link line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/ccl77azl.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_5f42a /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib -lm -ldl -lstdc++ CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-rdynamic' '-o' 'cmTC_9575b' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
link line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/ccYDc8uH.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_9575b /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib -lm -ldl -lstdc++ CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o]
arg [/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2] ==> ignore
arg [-plugin] ==> ignore
arg [/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so] ==> ignore
arg [-plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper] ==> ignore
arg [-plugin-opt=-fresolution=/tmp/ccl77azl.res] ==> ignore
arg [-plugin-opt=-fresolution=/tmp/ccYDc8uH.res] ==> ignore
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
arg [-plugin-opt=-pass-through=-lpthread] ==> ignore
... ... @@ -179,7 +179,7 @@ Parsed C implicit link information from above output:
arg [-m] ==> ignore
arg [armelf_linux_eabi] ==> ignore
arg [-o] ==> ignore
arg [cmTC_5f42a] ==> ignore
arg [cmTC_9575b] ==> ignore
arg [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o] ==> obj [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o]
arg [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o] ==> obj [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o]
arg [/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o] ==> obj [/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o]
... ... @@ -191,7 +191,7 @@ Parsed C implicit link information from above output:
arg [-lm] ==> lib [m]
arg [-ldl] ==> lib [dl]
arg [-lstdc++] ==> lib [stdc++]
arg [CMakeFiles/cmTC_5f42a.dir/CMakeCCompilerABI.c.o] ==> ignore
arg [CMakeFiles/cmTC_9575b.dir/CMakeCCompilerABI.c.o] ==> ignore
arg [-lgcc] ==> lib [gcc]
arg [--as-needed] ==> ignore
arg [-lgcc_s] ==> lib [gcc_s]
... ... @@ -223,20 +223,18 @@ Parsed C implicit link information from above output:
Detecting CXX compiler ABI info compiled with the following output:
Change Dir: /mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_9bf83/fast && make: Warning: File 'Makefile' has modification time 6.9 s in the future
/usr/bin/make -f CMakeFiles/cmTC_9bf83.dir/build.make CMakeFiles/cmTC_9bf83.dir/build
Run Build Command(s):/usr/bin/make -f Makefile cmTC_e89fc/fast && /usr/bin/make -f CMakeFiles/cmTC_e89fc.dir/build.make CMakeFiles/cmTC_e89fc.dir/build
make[1]: Entering directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp'
make[1]: Warning: File 'CMakeFiles/cmTC_9bf83.dir/flags.make' has modification time 6.9 s in the future
Building CXX object CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -o CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp
Building CXX object CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -o CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp
Using built-in specs.
COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++
Target: arm-cortexa9-linux-gnueabihf
Configured with: /work/toolchain/build/src/gcc-4.9.3/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortexa9-linux-gnueabihf --prefix=/opt/FriendlyARM/toolchain/4.9.3 --with-sysroot=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-languages=c,c++ --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3 --with-float=hard --with-pkgversion=ctng-1.21.0-229g-FA --with-bugurl=http://www.friendlyarm.com/ --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpfr=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpc=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-isl=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-cloog=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-libelf=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gold --disable-multilib --with-local-prefix=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-long-long
Thread model: posix
gcc version 4.9.3 (ctng-1.21.0-229g-FA)
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1plus -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_GNU_SOURCE /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o -version -o /tmp/ccCe9Fbm.s
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1plus -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_GNU_SOURCE /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o -version -o /tmp/ccHxxMqH.s
GNU C++ (ctng-1.21.0-229g-FA) version 4.9.3 (arm-cortexa9-linux-gnueabihf)
compiled by GNU C version 4.8.4, GMP version 6.0.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
... ... @@ -261,15 +259,15 @@ GNU C++ (ctng-1.21.0-229g-FA) version 4.9.3 (arm-cortexa9-linux-gnueabihf)
compiled by GNU C version 4.8.4, GMP version 6.0.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 3ff7ac3bbb22638e38898d02aefebadb
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccCe9Fbm.s
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccHxxMqH.s
GNU assembler version 2.25.1 (arm-cortexa9-linux-gnueabihf) using BFD version (ctng-1.21.0-229g-FA) 2.25.1
COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/
LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
Linking CXX executable cmTC_9bf83
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9bf83.dir/link.txt --verbose=1
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -rdynamic CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_9bf83
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
Linking CXX executable cmTC_e89fc
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e89fc.dir/link.txt --verbose=1
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -rdynamic CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_e89fc
Using built-in specs.
COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++
COLLECT_LTO_WRAPPER=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper
... ... @@ -279,11 +277,9 @@ Thread model: posix
gcc version 4.9.3 (ctng-1.21.0-229g-FA)
COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/
LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_9bf83' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/ccnVmSVo.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_9bf83 /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o
make[1]: warning: Clock skew detected. Your build may be incomplete.
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_e89fc' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/cc7vzHrK.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_e89fc /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o
make[1]: Leaving directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp'
make: warning: Clock skew detected. Your build may be incomplete.
... ... @@ -312,20 +308,18 @@ Parsed CXX implicit link information from above output:
link line regex: [^( *|.*[/\])(arm-cortexa9-linux-gnueabihf-ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: /mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp]
ignore line: []
ignore line: [Run Build Command(s):/usr/bin/make -f Makefile cmTC_9bf83/fast && make: Warning: File 'Makefile' has modification time 6.9 s in the future]
ignore line: [/usr/bin/make -f CMakeFiles/cmTC_9bf83.dir/build.make CMakeFiles/cmTC_9bf83.dir/build]
ignore line: [Run Build Command(s):/usr/bin/make -f Makefile cmTC_e89fc/fast && /usr/bin/make -f CMakeFiles/cmTC_e89fc.dir/build.make CMakeFiles/cmTC_e89fc.dir/build]
ignore line: [make[1]: Entering directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp']
ignore line: [make[1]: Warning: File 'CMakeFiles/cmTC_9bf83.dir/flags.make' has modification time 6.9 s in the future]
ignore line: [Building CXX object CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -o CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp]
ignore line: [Building CXX object CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -o CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++]
ignore line: [Target: arm-cortexa9-linux-gnueabihf]
ignore line: [Configured with: /work/toolchain/build/src/gcc-4.9.3/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortexa9-linux-gnueabihf --prefix=/opt/FriendlyARM/toolchain/4.9.3 --with-sysroot=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-languages=c c++ --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3 --with-float=hard --with-pkgversion=ctng-1.21.0-229g-FA --with-bugurl=http://www.friendlyarm.com/ --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpfr=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpc=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-isl=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-cloog=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-libelf=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl -Bstatic -lstdc++ -Bdynamic -lm' --enable-threads=posix --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gold --disable-multilib --with-local-prefix=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-long-long]
ignore line: [Thread model: posix]
ignore line: [gcc version 4.9.3 (ctng-1.21.0-229g-FA) ]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1plus -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_GNU_SOURCE /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o -version -o /tmp/ccCe9Fbm.s]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1plus -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_GNU_SOURCE /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o -version -o /tmp/ccHxxMqH.s]
ignore line: [GNU C++ (ctng-1.21.0-229g-FA) version 4.9.3 (arm-cortexa9-linux-gnueabihf)]
ignore line: [ compiled by GNU C version 4.8.4 GMP version 6.0.0 MPFR version 3.1.3 MPC version 1.0.3]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
... ... @@ -350,15 +344,15 @@ Parsed CXX implicit link information from above output:
ignore line: [ compiled by GNU C version 4.8.4 GMP version 6.0.0 MPFR version 3.1.3 MPC version 1.0.3]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [Compiler executable checksum: 3ff7ac3bbb22638e38898d02aefebadb]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccCe9Fbm.s]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccHxxMqH.s]
ignore line: [GNU assembler version 2.25.1 (arm-cortexa9-linux-gnueabihf) using BFD version (ctng-1.21.0-229g-FA) 2.25.1]
ignore line: [COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/]
ignore line: [LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [Linking CXX executable cmTC_9bf83]
ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9bf83.dir/link.txt --verbose=1]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -rdynamic CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_9bf83 ]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [Linking CXX executable cmTC_e89fc]
ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e89fc.dir/link.txt --verbose=1]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -rdynamic CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_e89fc ]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++]
ignore line: [COLLECT_LTO_WRAPPER=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper]
... ... @@ -368,13 +362,13 @@ Parsed CXX implicit link information from above output:
ignore line: [gcc version 4.9.3 (ctng-1.21.0-229g-FA) ]
ignore line: [COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/]
ignore line: [LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_9bf83' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
link line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/ccnVmSVo.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_9bf83 /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_e89fc' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
link line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/cc7vzHrK.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_e89fc /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o]
arg [/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2] ==> ignore
arg [-plugin] ==> ignore
arg [/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so] ==> ignore
arg [-plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper] ==> ignore
arg [-plugin-opt=-fresolution=/tmp/ccnVmSVo.res] ==> ignore
arg [-plugin-opt=-fresolution=/tmp/cc7vzHrK.res] ==> ignore
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
arg [-plugin-opt=-pass-through=-lc] ==> ignore
... ... @@ -391,7 +385,7 @@ Parsed CXX implicit link information from above output:
arg [-m] ==> ignore
arg [armelf_linux_eabi] ==> ignore
arg [-o] ==> ignore
arg [cmTC_9bf83] ==> ignore
arg [cmTC_e89fc] ==> ignore
arg [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o] ==> obj [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o]
arg [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o] ==> obj [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o]
arg [/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o] ==> obj [/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o]
... ... @@ -400,7 +394,7 @@ Parsed CXX implicit link information from above output:
arg [-L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib] ==> dir [/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib]
arg [-L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib] ==> dir [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib]
arg [-L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib] ==> dir [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib]
arg [CMakeFiles/cmTC_9bf83.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
arg [CMakeFiles/cmTC_e89fc.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
arg [-lstdc++] ==> lib [stdc++]
arg [-lm] ==> lib [m]
arg [-lgcc_s] ==> lib [gcc_s]
... ... @@ -431,15 +425,15 @@ Parsed CXX implicit link information from above output:
Detecting CXX [-std=c++14] compiler features compiled with the following output:
Change Dir: /mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_75e7f/fast && make: Warning: File 'Makefile' has modification time 6.7 s in the future
/usr/bin/make -f CMakeFiles/cmTC_75e7f.dir/build.make CMakeFiles/cmTC_75e7f.dir/build
Run Build Command(s):/usr/bin/make -f Makefile cmTC_3a26b/fast && make: Warning: File 'Makefile' has modification time 0.66 s in the future
/usr/bin/make -f CMakeFiles/cmTC_3a26b.dir/build.make CMakeFiles/cmTC_3a26b.dir/build
make[1]: Entering directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp'
make[1]: Warning: File 'CMakeFiles/cmTC_75e7f.dir/flags.make' has modification time 6.7 s in the future
Building CXX object CMakeFiles/cmTC_75e7f.dir/feature_tests.cxx.o
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -std=c++14 -o CMakeFiles/cmTC_75e7f.dir/feature_tests.cxx.o -c /mnt/hgfs/share/展架程序/build/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTC_75e7f
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_75e7f.dir/link.txt --verbose=1
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -rdynamic CMakeFiles/cmTC_75e7f.dir/feature_tests.cxx.o -o cmTC_75e7f
make[1]: Warning: File 'CMakeFiles/cmTC_3a26b.dir/flags.make' has modification time 0.65 s in the future
Building CXX object CMakeFiles/cmTC_3a26b.dir/feature_tests.cxx.o
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -std=c++14 -o CMakeFiles/cmTC_3a26b.dir/feature_tests.cxx.o -c /mnt/hgfs/share/展架程序/build/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTC_3a26b
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3a26b.dir/link.txt --verbose=1
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -rdynamic CMakeFiles/cmTC_3a26b.dir/feature_tests.cxx.o -o cmTC_3a26b
make[1]: 警告:检测到时钟错误。您的创建可能是不完整的。
make[1]: Leaving directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp'
make: 警告:检测到时钟错误。您的创建可能是不完整的。
... ...
... ... @@ -35,6 +35,10 @@ CMakeFiles/JZ_UART_APP.dir/Module/Gimbal/Gimbal_InAndOut.c.o: \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/bits/pthreadtypes.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/alloca.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/bits/stdlib-float.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/pthread.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/sched.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/bits/sched.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/bits/setjmp.h \
/mnt/hgfs/share/展架程序/./application/version_choose.h \
/mnt/hgfs/share/展架程序/Module/Gimbal/Gimbal_H3/Gimbal_H3.h \
/mnt/hgfs/share/展架程序/Module/Gimbal/Gimbal_H3/Gimbal_H3_H150ST/Gimbal_H3_H150ST.h \
... ...
... ... @@ -40,4 +40,15 @@ CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Megaphone_InputAndOutput.c.o: \
/mnt/hgfs/share/展架程序/Module/Megaphone/opus/RecordVoice/Megaphone_RecordVoice.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/opus/RealTimeVoice/Megaphone_RealTimeVoice.h \
/mnt/hgfs/share/展架程序/./Module/UI_control/UI_control.h \
/mnt/hgfs/share/展架程序/./Module/Ircut/ircut.h
/mnt/hgfs/share/展架程序/./JZsdk/JZsdkLib.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdkBase.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Logger/JZsdk_Logger.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Osal/JZsdk_FileSystm.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Osal/../JZsdk_Code/JZsdk_Code.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Delay/JZsdk_Delay.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_FLagCode.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_CommonFuntion/JZsdkCommonFuntion.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_CommonFuntion/JZsdk_string/JZsdk_string.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_Code.h \
/mnt/hgfs/share/展架程序/./Module/Ircut/ircut.h \
/mnt/hgfs/share/展架程序/./application/version_choose.h
... ...
不能预览此文件类型
#!/bin/bash
#1、输入分支名,账号,密码,描述信息
branch_name="dev_00.00.01.02"
branch_name="dev_00.00.01.03"
Account="PanHaoBin"
PassWord="ookk3866"
Message="00 00 01 02更新"
... ...