正在显示
16 个修改的文件
包含
1069 行增加
和
681 行删除
@@ -13,6 +13,9 @@ | @@ -13,6 +13,9 @@ | ||
13 | "tts_sample.h": "c", | 13 | "tts_sample.h": "c", |
14 | "cn_tts.h": "c", | 14 | "cn_tts.h": "c", |
15 | "intl_tts.h": "c", | 15 | "intl_tts.h": "c", |
16 | - "megaphone_music.h": "c" | 16 | + "megaphone_music.h": "c", |
17 | + "gimbal_h3_h10.h": "c", | ||
18 | + "gimbal_h3_h150st.h": "c", | ||
19 | + "uartconnection.h": "c" | ||
17 | } | 20 | } |
18 | } | 21 | } |
@@ -24,7 +24,7 @@ project(JZ_UART_APP) | @@ -24,7 +24,7 @@ project(JZ_UART_APP) | ||
24 | set(filtering_type high_pass_filtering) | 24 | set(filtering_type high_pass_filtering) |
25 | 25 | ||
26 | # 海外版本 27行不能改动 | 26 | # 海外版本 27行不能改动 |
27 | -set(firewarm_origin OVERSEAS_VERSION) | 27 | +set(firewarm_origin DOMESTIC_VERSION) |
28 | 28 | ||
29 | 29 | ||
30 | # 指定源文件 | 30 | # 指定源文件 |
@@ -67,10 +67,10 @@ include_directories(./Module/UI_control) | @@ -67,10 +67,10 @@ include_directories(./Module/UI_control) | ||
67 | 67 | ||
68 | # 库文件路径 | 68 | # 库文件路径 |
69 | if(${filtering_type} STREQUAL "directed_stopband_filtering") | 69 | if(${filtering_type} STREQUAL "directed_stopband_filtering") |
70 | - message("Using library for directed stopband filtering") | 70 | + message("\n滤波库:高通滤波\n") |
71 | target_link_libraries(${PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/ModuleLib/music/directed_stopband_filtering/libAudioPlayer.so) | 71 | target_link_libraries(${PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/ModuleLib/music/directed_stopband_filtering/libAudioPlayer.so) |
72 | elseif(${filtering_type} STREQUAL "high_pass_filtering") | 72 | elseif(${filtering_type} STREQUAL "high_pass_filtering") |
73 | - message("Using library for high pass filtering") | 73 | + message("\n滤波库:带阻滤波\n") |
74 | target_link_libraries(${PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/ModuleLib/music/high_pass_filtering/libAudioPlayer.so) | 74 | target_link_libraries(${PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/ModuleLib/music/high_pass_filtering/libAudioPlayer.so) |
75 | else() | 75 | else() |
76 | message(FATAL_ERROR "Invalid filtering type") | 76 | message(FATAL_ERROR "Invalid filtering type") |
@@ -52,9 +52,9 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len) | @@ -52,9 +52,9 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len) | ||
52 | 52 | ||
53 | case JZ_INSCODE_5AFRAME_GIMBAL_PITCH_FINETUNING_CONTROL: | 53 | case JZ_INSCODE_5AFRAME_GIMBAL_PITCH_FINETUNING_CONTROL: |
54 | { | 54 | { |
55 | - char sendbuf[13] = {0x5A ,0x5A ,0x77 ,0x00 ,0x0D ,0x00 ,0x00 ,0x64 ,0x52 ,0x00 ,0x00 ,0x00 ,0x23}; | ||
56 | - memcpy(str, sendbuf, 13); | ||
57 | - *str_len = 13; | 55 | + char sendbuf[14] = {0x5A ,0x5A ,0x77 ,0x00 ,0x0E ,0x00 ,0x00 ,0x64 ,0x52 ,0x00 ,0x00 ,0x00 ,0x00 ,0x23}; |
56 | + memcpy(str, sendbuf, 14); | ||
57 | + *str_len = 14; | ||
58 | } | 58 | } |
59 | break; | 59 | break; |
60 | 60 | ||
@@ -166,30 +166,7 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len) | @@ -166,30 +166,7 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len) | ||
166 | } | 166 | } |
167 | break; | 167 | break; |
168 | 168 | ||
169 | - case JZ_INSCODE_5BFRAME_MUSICLIST_START: | ||
170 | - { | ||
171 | - char sendbuf[12] = { 0x5b, 0x5b, 0x77, 0x00, 0x0c, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x23}; | ||
172 | - memcpy(str, sendbuf, 12); | ||
173 | - *str_len = 12; | ||
174 | - } | ||
175 | - break; | ||
176 | 169 | ||
177 | - case JZ_INSCODE_5BFRAME_MUSICLIST_TRANS: | ||
178 | - { | ||
179 | - char sendbuf[12] = {0x5B, 0x5B, 0x77, 0x00, 0x0c, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00, 0x23}; | ||
180 | - memcpy(str, sendbuf, 12); | ||
181 | - *str_len = 12; | ||
182 | - } | ||
183 | - break; | ||
184 | - | ||
185 | - case JZ_INSCODE_5BFRAME_MUSICLIST_STOP: | ||
186 | - { | ||
187 | - char sendbuf[12] = { 0x5b, 0x5b, 0x77, 0x00, 0x0c, 0x00, 0x00, 0x58, 0xff, 0x00, 0x00, 0x23}; | ||
188 | - memcpy(str, sendbuf, 12); | ||
189 | - *str_len = 12; | ||
190 | - } | ||
191 | - break; | ||
192 | - | ||
193 | case JZ_INSCODE_5BFRAME_AUDIO_PLAYSTATUS_END: | 170 | case JZ_INSCODE_5BFRAME_AUDIO_PLAYSTATUS_END: |
194 | { | 171 | { |
195 | char sendbuf[12] = { 0x5b, 0x5b, 0x77, 0x00, 0x0c, 0x00, 0x00, 0x53, 0xff, 0x00, 0x00, 0x23}; | 172 | char sendbuf[12] = { 0x5b, 0x5b, 0x77, 0x00, 0x0c, 0x00, 0x00, 0x53, 0xff, 0x00, 0x00, 0x23}; |
@@ -256,6 +233,38 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len) | @@ -256,6 +233,38 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len) | ||
256 | } | 233 | } |
257 | break; | 234 | break; |
258 | 235 | ||
236 | + case JZ_INSCODE_5BFRAME_MUSICLIST_START: | ||
237 | + { | ||
238 | + char sendbuf[12] = { 0x5b, 0x5b, 0x77, 0x00, 0x0c, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x23}; | ||
239 | + memcpy(str, sendbuf, 12); | ||
240 | + *str_len = 12; | ||
241 | + } | ||
242 | + break; | ||
243 | + | ||
244 | + case JZ_INSCODE_5BFRAME_MUSICLIST_TRANS: | ||
245 | + { | ||
246 | + char sendbuf[12] = {0x5B, 0x5B, 0x77, 0x00, 0x0c, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00, 0x23}; | ||
247 | + memcpy(str, sendbuf, 12); | ||
248 | + *str_len = 12; | ||
249 | + } | ||
250 | + break; | ||
251 | + | ||
252 | + case JZ_INSCODE_5BFRAME_MUSICLIST_STOP: | ||
253 | + { | ||
254 | + char sendbuf[12] = { 0x5b, 0x5b, 0x77, 0x00, 0x0c, 0x00, 0x00, 0x58, 0xff, 0x00, 0x00, 0x23}; | ||
255 | + memcpy(str, sendbuf, 12); | ||
256 | + *str_len = 12; | ||
257 | + } | ||
258 | + break; | ||
259 | + | ||
260 | + case JZ_INSCODE_5BFRAME_CHECKSTATUS_OUTPUTPOWER: | ||
261 | + { | ||
262 | + char sendbuf[12] = { 0x5b, 0x5b, 0x77, 0x00, 0x0C, 0x00, 0x00, 0x5A, 0x02, 0x00, 0x00, 0x23}; | ||
263 | + memcpy(str, sendbuf, 12); | ||
264 | + *str_len = 12; | ||
265 | + } | ||
266 | + break; | ||
267 | + | ||
259 | case JZ_INSCODE_5BFRAME_CHECKSTATUS_SEARCHLIGHT_FREQUENCY: | 268 | case JZ_INSCODE_5BFRAME_CHECKSTATUS_SEARCHLIGHT_FREQUENCY: |
260 | { | 269 | { |
261 | char sendbuf[13] = { 0x5b, 0x5b, 0x77, 0x00, 0x0D, 0x00, 0x00, 0x61, 0x51, 0x00, 0x00, 0x00, 0x23}; | 270 | char sendbuf[13] = { 0x5b, 0x5b, 0x77, 0x00, 0x0D, 0x00, 0x00, 0x61, 0x51, 0x00, 0x00, 0x00, 0x23}; |
@@ -290,9 +299,9 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len) | @@ -290,9 +299,9 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len) | ||
290 | 299 | ||
291 | case JZ_INSCODE_5BFRAME_GIMBAL_PITCH_FINETUNING: | 300 | case JZ_INSCODE_5BFRAME_GIMBAL_PITCH_FINETUNING: |
292 | { | 301 | { |
293 | - char sendbuf[13] = { 0x5b, 0x5b, 0x77, 0x00, 0x0D, 0x00, 0x00, 0x64, 0x52, 0x00, 0x00, 0x00, 0x23}; | ||
294 | - memcpy(str, sendbuf, 13); | ||
295 | - *str_len = 13; | 302 | + char sendbuf[14] = { 0x5b, 0x5b, 0x77, 0x00, 0x0e, 0x00, 0x00, 0x64, 0x52, 0x00, 0x00, 0x00, 0x00, 0x23}; |
303 | + memcpy(str, sendbuf, 14); | ||
304 | + *str_len = 14; | ||
296 | } | 305 | } |
297 | break; | 306 | break; |
298 | 307 | ||
@@ -330,17 +339,28 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len) | @@ -330,17 +339,28 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len) | ||
330 | 339 | ||
331 | case JZ_INSCODE_5BFRAME_CHECKSTATUS_SERIALNUMBER: | 340 | case JZ_INSCODE_5BFRAME_CHECKSTATUS_SERIALNUMBER: |
332 | { | 341 | { |
333 | - char sendbuf[13] = { 0x5b, 0x5b, 0x77, 0x00, 0x0D, 0x00, 0x00, 0x69, 0x54, 0x00, 0x00, 0x00, 0x23}; | 342 | + char sendbuf[13] = { 0x5b, 0x5b, 0x77, 0x00, 0x0D, 0x00, 0x00, 0x6F, 0x57, 0x00, 0x00, 0x00, 0x23}; |
334 | memcpy(str, sendbuf, 13); | 343 | memcpy(str, sendbuf, 13); |
335 | *str_len = 13; | 344 | *str_len = 13; |
336 | } | 345 | } |
337 | - break; | 346 | + break; |
347 | + | ||
348 | + | ||
338 | 349 | ||
339 | /******************************************************************************************************************************************************** | 350 | /******************************************************************************************************************************************************** |
340 | * | 351 | * |
341 | * 6A帧 | 352 | * 6A帧 |
342 | * | 353 | * |
343 | ********************************************************************************************************************************************************/ | 354 | ********************************************************************************************************************************************************/ |
355 | + | ||
356 | + case JZ_INSCODE_6AFRAME_SET_GIMBAL_MAXMIN_RANGE: | ||
357 | + { | ||
358 | + char sendbuf[13] = {0x6A ,0x6A ,0x77 ,0x00 ,0x0D ,0x00 ,0x00 ,0x69 ,0x52 ,0x00 ,0x00 ,0x00 ,0x23}; | ||
359 | + memcpy(str, sendbuf, 13); | ||
360 | + *str_len = 13; | ||
361 | + } | ||
362 | + break; | ||
363 | + | ||
344 | case JZ_INSCODE_6AFRAME_GIMBAL_LINKAGE_CONTROL: | 364 | case JZ_INSCODE_6AFRAME_GIMBAL_LINKAGE_CONTROL: |
345 | { | 365 | { |
346 | char sendbuf[13] = {0x6A ,0x6A ,0x77 ,0x00 ,0x0D ,0x00 ,0x00 ,0x69 ,0x56 ,0x00 ,0x00 ,0x00 ,0x23}; | 366 | char sendbuf[13] = {0x6A ,0x6A ,0x77 ,0x00 ,0x0D ,0x00 ,0x00 ,0x69 ,0x56 ,0x00 ,0x00 ,0x00 ,0x23}; |
@@ -364,6 +384,7 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len) | @@ -364,6 +384,7 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len) | ||
364 | *str_len = 13; | 384 | *str_len = 13; |
365 | } | 385 | } |
366 | break; | 386 | break; |
387 | + | ||
367 | 388 | ||
368 | /******************************************************************************************************************************************************** | 389 | /******************************************************************************************************************************************************** |
369 | * | 390 | * |
@@ -47,13 +47,13 @@ void JZsdk_UserLogOutput(E_JZsdkConsoleLogLevel level, const char *fmt, ...); | @@ -47,13 +47,13 @@ void JZsdk_UserLogOutput(E_JZsdkConsoleLogLevel level, const char *fmt, ...); | ||
47 | T_JZsdkReturnCode JZsdk_LoggerInit(); | 47 | T_JZsdkReturnCode JZsdk_LoggerInit(); |
48 | 48 | ||
49 | /* Exported constants --------------------------------------------------------*/ | 49 | /* Exported constants --------------------------------------------------------*/ |
50 | -#define USER_LOG_DEBUG(fmt, ...) \ | 50 | +#define JZSDK_LOG_DEBUG(fmt, ...) \ |
51 | JZsdk_UserLogOutput(JZSDK_LOGGER_CONSOLE_LOG_LEVEL_DEBUG, "[%s:%d) " fmt, __FUNCTION__, __LINE__ , ##__VA_ARGS__) | 51 | JZsdk_UserLogOutput(JZSDK_LOGGER_CONSOLE_LOG_LEVEL_DEBUG, "[%s:%d) " fmt, __FUNCTION__, __LINE__ , ##__VA_ARGS__) |
52 | -#define USER_LOG_INFO(fmt, ...) \ | 52 | +#define JZSDK_LOG_INFO(fmt, ...) \ |
53 | JZsdk_UserLogOutput(JZSDK_LOGGER_CONSOLE_LOG_LEVEL_INFO, "[%s:%d) " fmt, __FUNCTION__, __LINE__ , ##__VA_ARGS__) | 53 | JZsdk_UserLogOutput(JZSDK_LOGGER_CONSOLE_LOG_LEVEL_INFO, "[%s:%d) " fmt, __FUNCTION__, __LINE__ , ##__VA_ARGS__) |
54 | -#define USER_LOG_WARN(fmt, ...) \ | 54 | +#define JZSDK_LOG_WARN(fmt, ...) \ |
55 | JZsdk_UserLogOutput(JZSDK_LOGGER_CONSOLE_LOG_LEVEL_WARN, "[%s:%d) " fmt, __FUNCTION__, __LINE__ , ##__VA_ARGS__) | 55 | JZsdk_UserLogOutput(JZSDK_LOGGER_CONSOLE_LOG_LEVEL_WARN, "[%s:%d) " fmt, __FUNCTION__, __LINE__ , ##__VA_ARGS__) |
56 | -#define USER_LOG_ERROR(fmt, ...) \ | 56 | +#define JZSDK_LOG_ERROR(fmt, ...) \ |
57 | JZsdk_UserLogOutput(JZSDK_LOGGER_CONSOLE_LOG_LEVEL_ERROR, "[%s:%d) " fmt, __FUNCTION__, __LINE__ , ##__VA_ARGS__) | 57 | JZsdk_UserLogOutput(JZSDK_LOGGER_CONSOLE_LOG_LEVEL_ERROR, "[%s:%d) " fmt, __FUNCTION__, __LINE__ , ##__VA_ARGS__) |
58 | 58 | ||
59 | 59 |
@@ -2,6 +2,9 @@ | @@ -2,6 +2,9 @@ | ||
2 | #include "JZsdk_FileSystm.h" | 2 | #include "JZsdk_FileSystm.h" |
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | #include <stdbool.h> | 4 | #include <stdbool.h> |
5 | +#include <string.h> | ||
6 | + | ||
7 | + | ||
5 | /* | 8 | /* |
6 | * 用于运行指令 | 9 | * 用于运行指令 |
7 | * | 10 | * |
@@ -55,4 +58,45 @@ int JZsdk_RunSystemCmd(char *systemCmd) | @@ -55,4 +58,45 @@ int JZsdk_RunSystemCmd(char *systemCmd) | ||
55 | int JZsdk_Socket() | 58 | int JZsdk_Socket() |
56 | { | 59 | { |
57 | 60 | ||
58 | -} | ||
61 | +} | ||
62 | + | ||
63 | +//获取设备序列号 | ||
64 | +T_JZsdkReturnCode GetSerialNumber(char *SerialNumber) | ||
65 | +{ | ||
66 | + FILE *num_file; | ||
67 | + char num_char[15]; | ||
68 | + | ||
69 | + num_file = fopen("/root/num", "rb+"); | ||
70 | + if (num_file == NULL) | ||
71 | + { | ||
72 | + num_file = fopen("/root/num", "wb+"); | ||
73 | + if (num_file == NULL) | ||
74 | + { | ||
75 | + return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; | ||
76 | + } | ||
77 | + } | ||
78 | + else | ||
79 | + { | ||
80 | + int ret = fseek(num_file, 0, SEEK_SET); | ||
81 | + if (ret != 0) { | ||
82 | + printf("Seek log count file error, ret: %d.\r\n", ret); | ||
83 | + } | ||
84 | + | ||
85 | + ret = fread((char *) &num_char,14, sizeof(char), num_file); | ||
86 | + if (ret != sizeof(char)) { | ||
87 | + printf("Read num file error.\r\n"); | ||
88 | + } | ||
89 | + else{ | ||
90 | + printf("Read num file=%s\n",&num_char); | ||
91 | + } | ||
92 | + } | ||
93 | + fclose(num_file); | ||
94 | + | ||
95 | + if (SerialNumber != NULL) | ||
96 | + { | ||
97 | + memcpy(SerialNumber, num_char, 14); | ||
98 | + return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS; | ||
99 | + } | ||
100 | + | ||
101 | + return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; | ||
102 | +} |
@@ -11,6 +11,7 @@ | @@ -11,6 +11,7 @@ | ||
11 | #define JZSDK_FILESYSTEM_H | 11 | #define JZSDK_FILESYSTEM_H |
12 | 12 | ||
13 | /* Includes ------------------------------------------------------------------*/ | 13 | /* Includes ------------------------------------------------------------------*/ |
14 | +#include "../JZsdk_Code/JZsdk_Code.h" | ||
14 | 15 | ||
15 | #ifdef __cplusplus | 16 | #ifdef __cplusplus |
16 | extern "C" { | 17 | extern "C" { |
@@ -26,6 +27,7 @@ extern "C" { | @@ -26,6 +27,7 @@ extern "C" { | ||
26 | /* Exported functions --------------------------------------------------------*/ | 27 | /* Exported functions --------------------------------------------------------*/ |
27 | int JZsdk_RunSystemCmd(char *systemCmd); | 28 | int JZsdk_RunSystemCmd(char *systemCmd); |
28 | //FILE* JZsdk_RunSystemCmd_ReturnFilePointer(char *systemCmd); | 29 | //FILE* JZsdk_RunSystemCmd_ReturnFilePointer(char *systemCmd); |
30 | +T_JZsdkReturnCode GetSerialNumber(char *SerialNumber); | ||
29 | 31 | ||
30 | #ifdef __cplusplus | 32 | #ifdef __cplusplus |
31 | } | 33 | } |
@@ -246,6 +246,16 @@ int JZsdk_Uart_Send_GimbalLinkageControl(int Uartport,int FrameSequence, int val | @@ -246,6 +246,16 @@ int JZsdk_Uart_Send_GimbalLinkageControl(int Uartport,int FrameSequence, int val | ||
246 | JZsdk_Uart_SendDeal_GimbalLinkageControl(Uartport,FrameSequence,value); | 246 | JZsdk_Uart_SendDeal_GimbalLinkageControl(Uartport,FrameSequence,value); |
247 | } | 247 | } |
248 | 248 | ||
249 | +/************* | ||
250 | + * | ||
251 | + * 设置云台最大最小值 | ||
252 | + * | ||
253 | + * **************/ | ||
254 | +int JZsdk_Uart_Send_SetGimbalRange(int Uartport,int FrameSequence, int value) | ||
255 | +{ | ||
256 | + JZsdk_Uart_SendDeal_SetGimbalRange(Uartport,FrameSequence,value); | ||
257 | +} | ||
258 | + | ||
249 | /******************************************************************************************************************************* | 259 | /******************************************************************************************************************************* |
250 | * | 260 | * |
251 | * 探照灯部分 | 261 | * 探照灯部分 |
@@ -412,6 +422,17 @@ int JZsdk_Uart_Send_SearchLight_Temperature(int Uartport,int LeftTemperature, in | @@ -412,6 +422,17 @@ int JZsdk_Uart_Send_SearchLight_Temperature(int Uartport,int LeftTemperature, in | ||
412 | JZsdk_Uart_SendDeal_SearchLight_Temperature(Uartport, LeftTemperature, RightTemperature); | 422 | JZsdk_Uart_SendDeal_SearchLight_Temperature(Uartport, LeftTemperature, RightTemperature); |
413 | } | 423 | } |
414 | 424 | ||
425 | + | ||
426 | +/************* | ||
427 | + * | ||
428 | + * 发送对外供电电源的状态 | ||
429 | + * | ||
430 | + * **************/ | ||
431 | +int JZsdk_Uart_Send_OutputPowerStatus(int Uartport, int FrameSequence, int status) | ||
432 | +{ | ||
433 | + JZsdk_Uart_SendDeal_OutputPowerStatus(Uartport, FrameSequence, status); | ||
434 | +} | ||
435 | + | ||
415 | /******************************************************************************************************************************* | 436 | /******************************************************************************************************************************* |
416 | * | 437 | * |
417 | * 警灯部分 | 438 | * 警灯部分 |
@@ -44,6 +44,7 @@ int JZsdk_Uart_Send_Set_GimbalLinkageControl(int Uartport,int FrameSequence, int | @@ -44,6 +44,7 @@ int JZsdk_Uart_Send_Set_GimbalLinkageControl(int Uartport,int FrameSequence, int | ||
44 | int JZsdk_Uart_Send_CheckStatus_GimbalLinkage(int Uartport,int FrameSequence); | 44 | int JZsdk_Uart_Send_CheckStatus_GimbalLinkage(int Uartport,int FrameSequence); |
45 | int JZsdk_Uart_Send_GimbalLinkageControl(int Uartport,int FrameSequence, int value); | 45 | int JZsdk_Uart_Send_GimbalLinkageControl(int Uartport,int FrameSequence, int value); |
46 | int JZsdk_Uart_Send_CheckStatus_GimbalAngle(int Uartport ,int FrameSequence); | 46 | int JZsdk_Uart_Send_CheckStatus_GimbalAngle(int Uartport ,int FrameSequence); |
47 | +int JZsdk_Uart_Send_SetGimbalRange(int Uartport,int FrameSequence, int value); | ||
47 | 48 | ||
48 | int JZsdk_Uart_Send_SearchLight_SetFrequency(int Uartport,int Frequency); | 49 | int JZsdk_Uart_Send_SearchLight_SetFrequency(int Uartport,int Frequency); |
49 | int JZsdk_Uart_Send_SearchLight_Control(int Uartport,int mode); | 50 | int JZsdk_Uart_Send_SearchLight_Control(int Uartport,int mode); |
@@ -72,6 +73,7 @@ int JZsdk_Uart_Send_CheckStatus_WarningLightStatus(int Uartport); | @@ -72,6 +73,7 @@ int JZsdk_Uart_Send_CheckStatus_WarningLightStatus(int Uartport); | ||
72 | int JZsdk_Uart_Send_CheckStatus_WarningLightColor(int Uartport); | 73 | int JZsdk_Uart_Send_CheckStatus_WarningLightColor(int Uartport); |
73 | 74 | ||
74 | 75 | ||
76 | +int JZsdk_Uart_Send_OutputPowerStatus(int Uartport, int FrameSequence, int status); | ||
75 | 77 | ||
76 | 78 | ||
77 | #ifdef __cplusplus | 79 | #ifdef __cplusplus |
@@ -13,14 +13,14 @@ | @@ -13,14 +13,14 @@ | ||
13 | #include "JZsdk_Uart_Send/JZsdk_Uart_Send.h" | 13 | #include "JZsdk_Uart_Send/JZsdk_Uart_Send.h" |
14 | 14 | ||
15 | #include "UI_control.h" | 15 | #include "UI_control.h" |
16 | +#include "JZsdkLib.h" | ||
16 | 17 | ||
17 | -static int SecondaryDeviceName = 0x00; //从设备名,用于多设备相连时通知控制端 从机设备名 | ||
18 | - | 18 | +static int SecondaryDeviceName = 0x00; // 从设备名,用于多设备相连时通知控制端 从机设备名 |
19 | 19 | ||
20 | /****** | 20 | /****** |
21 | - * | 21 | + * |
22 | * 开关功放 | 22 | * 开关功放 |
23 | - * | 23 | + * |
24 | * *******/ | 24 | * *******/ |
25 | int JZsdk_Uart_Set_Amplifier(int status) | 25 | int JZsdk_Uart_Set_Amplifier(int status) |
26 | { | 26 | { |
@@ -28,151 +28,147 @@ int JZsdk_Uart_Set_Amplifier(int status) | @@ -28,151 +28,147 @@ int JZsdk_Uart_Set_Amplifier(int status) | ||
28 | } | 28 | } |
29 | 29 | ||
30 | /****** | 30 | /****** |
31 | - * | 31 | + * |
32 | * 调节音量 | 32 | * 调节音量 |
33 | - * | 33 | + * |
34 | * *******/ | 34 | * *******/ |
35 | T_JZsdkReturnCode JZsdk_Uart_Set_Volume(int DeviceName, int value) | 35 | T_JZsdkReturnCode JZsdk_Uart_Set_Volume(int DeviceName, int value) |
36 | { | 36 | { |
37 | return UIcontrol_SetVolume(DeviceName, value); | 37 | return UIcontrol_SetVolume(DeviceName, value); |
38 | } | 38 | } |
39 | 39 | ||
40 | - | ||
41 | /********* | 40 | /********* |
42 | - * | 41 | + * |
43 | * 1、TTS播放 | 42 | * 1、TTS播放 |
44 | - * | 43 | + * |
45 | * *********/ | 44 | * *********/ |
46 | -T_JZsdkReturnCode JZsdk_Uart_TTS_Play(int DeviceName, char *data ,int len) | 45 | +T_JZsdkReturnCode JZsdk_Uart_TTS_Play(int DeviceName, char *data, int len) |
47 | { | 46 | { |
48 | - return UIcontrol_TTS_Play(DeviceName, data, len); | 47 | + return UIcontrol_TTS_Play(DeviceName, data, len); |
49 | } | 48 | } |
50 | 49 | ||
51 | /********* | 50 | /********* |
52 | - * | 51 | + * |
53 | * 2、TTS设置音色 | 52 | * 2、TTS设置音色 |
54 | - * | 53 | + * |
55 | * *********/ | 54 | * *********/ |
56 | T_JZsdkReturnCode JZsdk_Uart_TTS_SetTone(int DeviceName, int tone) | 55 | T_JZsdkReturnCode JZsdk_Uart_TTS_SetTone(int DeviceName, int tone) |
57 | { | 56 | { |
58 | - return UIcontrol_Set_TTS_tone(DeviceName, tone); | 57 | + return UIcontrol_Set_TTS_tone(DeviceName, tone); |
59 | } | 58 | } |
60 | 59 | ||
61 | /********* | 60 | /********* |
62 | - * | 61 | + * |
63 | * 3、TTS设置语速 | 62 | * 3、TTS设置语速 |
64 | - * | 63 | + * |
65 | * *********/ | 64 | * *********/ |
66 | T_JZsdkReturnCode JZsdk_Uart_TTS_SetSpeed(int DeviceName, int speed) | 65 | T_JZsdkReturnCode JZsdk_Uart_TTS_SetSpeed(int DeviceName, int speed) |
67 | { | 66 | { |
68 | - return UIcontrol_Set_TTS_speed(DeviceName, speed); | 67 | + return UIcontrol_Set_TTS_speed(DeviceName, speed); |
69 | } | 68 | } |
70 | 69 | ||
71 | - | ||
72 | /********* | 70 | /********* |
73 | - * | 71 | + * |
74 | * 刷新歌曲列表 | 72 | * 刷新歌曲列表 |
75 | - * | ||
76 | - * | ||
77 | -**********/ | 73 | + * |
74 | + * | ||
75 | + **********/ | ||
78 | int JZsdk_Uart_Flush_MusicList() | 76 | int JZsdk_Uart_Flush_MusicList() |
79 | { | 77 | { |
80 | Megaphone_Flush_MusicList(); | 78 | Megaphone_Flush_MusicList(); |
81 | } | 79 | } |
82 | /********* | 80 | /********* |
83 | - * | 81 | + * |
84 | * 获取音乐总数 | 82 | * 获取音乐总数 |
85 | - * | ||
86 | - * | ||
87 | -**********/ | 83 | + * |
84 | + * | ||
85 | + **********/ | ||
88 | int JZsdk_Uart_get_music_list_sum() | 86 | int JZsdk_Uart_get_music_list_sum() |
89 | { | 87 | { |
90 | - return Megaphone_get_music_list_sum(); | 88 | + return Megaphone_get_music_list_sum(); |
91 | } | 89 | } |
92 | /********* | 90 | /********* |
93 | - * | 91 | + * |
94 | * 获取音乐名 | 92 | * 获取音乐名 |
95 | - * | ||
96 | - * | ||
97 | -**********/ | 93 | + * |
94 | + * | ||
95 | + **********/ | ||
98 | int JZsdk_Uart_get_music_list_name(int num, char *music_name, int *music_name_length) | 96 | int JZsdk_Uart_get_music_list_name(int num, char *music_name, int *music_name_length) |
99 | { | 97 | { |
100 | return Megaphone_get_music_list_name(num, music_name, music_name_length); | 98 | return Megaphone_get_music_list_name(num, music_name, music_name_length); |
101 | } | 99 | } |
102 | 100 | ||
103 | - | ||
104 | /********* | 101 | /********* |
105 | - * | 102 | + * |
106 | * 查询音量 | 103 | * 查询音量 |
107 | - * | ||
108 | - * | ||
109 | -**********/ | 104 | + * |
105 | + * | ||
106 | + **********/ | ||
110 | int JZsdk_Uart_CheckStatus_volume() | 107 | int JZsdk_Uart_CheckStatus_volume() |
111 | { | 108 | { |
112 | return Megaphone_get_music_volume(); | 109 | return Megaphone_get_music_volume(); |
113 | } | 110 | } |
114 | /********* | 111 | /********* |
115 | - * | 112 | + * |
116 | * 查询播放状态 | 113 | * 查询播放状态 |
117 | - * | ||
118 | - * | ||
119 | -**********/ | 114 | + * |
115 | + * | ||
116 | + **********/ | ||
120 | int JZsdk_Uart_CheckStatus_play() | 117 | int JZsdk_Uart_CheckStatus_play() |
121 | { | 118 | { |
122 | return Megaphone_get_play_status(); | 119 | return Megaphone_get_play_status(); |
123 | } | 120 | } |
124 | /********* | 121 | /********* |
125 | - * | 122 | + * |
126 | * 查询云台角度 | 123 | * 查询云台角度 |
127 | - * | ||
128 | - * | ||
129 | -**********/ | ||
130 | -int JZsdk_Uart_CheckStatus_gimbal(int *PitchAngle, int *YawAngle) | 124 | + * |
125 | + * | ||
126 | + **********/ | ||
127 | +int JZsdk_Uart_CheckStatus_gimbal(int *PitchAngle, int *YawAngle) | ||
131 | { | 128 | { |
132 | UIcontrol_CheckStatus_GimbalAngle(PitchAngle, YawAngle); | 129 | UIcontrol_CheckStatus_GimbalAngle(PitchAngle, YawAngle); |
133 | } | 130 | } |
134 | /********* | 131 | /********* |
135 | - * | 132 | + * |
136 | * 查询云台微调值 | 133 | * 查询云台微调值 |
137 | - * | ||
138 | - * | ||
139 | -**********/ | 134 | + * |
135 | + * | ||
136 | + **********/ | ||
140 | T_JZsdkReturnCode JZsdk_Uart_CheckStatus_GimbalFineTuning(int DeviceName, int FrameSequence) | 137 | T_JZsdkReturnCode JZsdk_Uart_CheckStatus_GimbalFineTuning(int DeviceName, int FrameSequence) |
141 | { | 138 | { |
142 | - //查询云台微调 | 139 | + // 查询云台微调 |
143 | printf("查询云台微调值\n"); | 140 | printf("查询云台微调值\n"); |
144 | 141 | ||
145 | - //1、查询本地云台微调 | 142 | + // 1、查询本地云台微调 |
146 | int FineTunigPitch, FineTunigYaw; | 143 | int FineTunigPitch, FineTunigYaw; |
147 | int ret = UIcontrol_CheckStatus_GimbalPitchFineTuning(&FineTunigPitch, &FineTunigYaw); | 144 | int ret = UIcontrol_CheckStatus_GimbalPitchFineTuning(&FineTunigPitch, &FineTunigYaw); |
148 | if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 145 | if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
149 | { | 146 | { |
150 | - //回复操作失败 | ||
151 | - JZsdk_Uart_SendDeal_Reply_Failure(DeviceName, FrameSequence); | 147 | + // 回复操作失败 |
148 | + JZsdk_Uart_SendDeal_Reply_Failure(DeviceName, FrameSequence); | ||
152 | return ret; | 149 | return ret; |
153 | } | 150 | } |
154 | - | ||
155 | - //2、发送本地云台微调 | 151 | + |
152 | + // 2、发送本地云台微调 | ||
156 | JZsdk_Uart_SendDeal_Reply_GimbalFineTuningPitch(DeviceName, FrameSequence, FineTunigPitch); | 153 | JZsdk_Uart_SendDeal_Reply_GimbalFineTuningPitch(DeviceName, FrameSequence, FineTunigPitch); |
157 | } | 154 | } |
158 | 155 | ||
159 | - | ||
160 | /********* | 156 | /********* |
161 | - * | 157 | + * |
162 | * 查询播放文件名 | 158 | * 查询播放文件名 |
163 | - * | ||
164 | - * | ||
165 | -**********/ | 159 | + * |
160 | + * | ||
161 | + **********/ | ||
166 | int JZsdk_Uart_CheckStatus_PlayFileName(char *music_name, int *music_name_len) | 162 | int JZsdk_Uart_CheckStatus_PlayFileName(char *music_name, int *music_name_len) |
167 | { | 163 | { |
168 | Megaphone_get_play_FileName(music_name, music_name_len); | 164 | Megaphone_get_play_FileName(music_name, music_name_len); |
169 | } | 165 | } |
170 | /********* | 166 | /********* |
171 | - * | 167 | + * |
172 | * 查询软件版本号 | 168 | * 查询软件版本号 |
173 | - * | ||
174 | - * | ||
175 | -**********/ | 169 | + * |
170 | + * | ||
171 | + **********/ | ||
176 | int JZsdk_Uart_CheckStatus_SoftwareVersion(char *majorVersion, char *minorVersion, char *modifyVersion, char *debugVersion) | 172 | int JZsdk_Uart_CheckStatus_SoftwareVersion(char *majorVersion, char *minorVersion, char *modifyVersion, char *debugVersion) |
177 | { | 173 | { |
178 | *majorVersion = MAJOR_VERSION; | 174 | *majorVersion = MAJOR_VERSION; |
@@ -181,47 +177,44 @@ int JZsdk_Uart_CheckStatus_SoftwareVersion(char *majorVersion, char *minorVersio | @@ -181,47 +177,44 @@ int JZsdk_Uart_CheckStatus_SoftwareVersion(char *majorVersion, char *minorVersio | ||
181 | *debugVersion = DEBUG_VERSION; | 177 | *debugVersion = DEBUG_VERSION; |
182 | } | 178 | } |
183 | /********* | 179 | /********* |
184 | - * | 180 | + * |
185 | * 查询是否打开循环 | 181 | * 查询是否打开循环 |
186 | - * | ||
187 | - * | ||
188 | -**********/ | 182 | + * |
183 | + * | ||
184 | + **********/ | ||
189 | int JZsdk_Uart_CheckStatus_LoopPlay() | 185 | int JZsdk_Uart_CheckStatus_LoopPlay() |
190 | { | 186 | { |
191 | 187 | ||
192 | return Megaphone_Get_LoopPlay(); | 188 | return Megaphone_Get_LoopPlay(); |
193 | - | ||
194 | } | 189 | } |
195 | /********* | 190 | /********* |
196 | - * | 191 | + * |
197 | * 查询音色 | 192 | * 查询音色 |
198 | - * | ||
199 | - * | ||
200 | -**********/ | 193 | + * |
194 | + * | ||
195 | + **********/ | ||
201 | int JZsdk_Uart_CheckStatus_TTS_tone() | 196 | int JZsdk_Uart_CheckStatus_TTS_tone() |
202 | { | 197 | { |
203 | 198 | ||
204 | return Megaphone_Get_TTS_tone(); | 199 | return Megaphone_Get_TTS_tone(); |
205 | - | ||
206 | } | 200 | } |
207 | /********* | 201 | /********* |
208 | - * | 202 | + * |
209 | * 查询语速 | 203 | * 查询语速 |
210 | - * | ||
211 | - * | ||
212 | -**********/ | 204 | + * |
205 | + * | ||
206 | + **********/ | ||
213 | int JZsdk_Uart_CheckStatus_TTS_speed() | 207 | int JZsdk_Uart_CheckStatus_TTS_speed() |
214 | { | 208 | { |
215 | 209 | ||
216 | return Megaphone_Get_TTS_speed(); | 210 | return Megaphone_Get_TTS_speed(); |
217 | - | ||
218 | } | 211 | } |
219 | 212 | ||
220 | /*** | 213 | /*** |
221 | - * | ||
222 | - * | 214 | + * |
215 | + * | ||
223 | * 播放歌曲 | 216 | * 播放歌曲 |
224 | - * | 217 | + * |
225 | * ***/ | 218 | * ***/ |
226 | T_JZsdkReturnCode JZsdk_Uart_PlayMusic(int DeviceName, char *music_name, int datasize) | 219 | T_JZsdkReturnCode JZsdk_Uart_PlayMusic(int DeviceName, char *music_name, int datasize) |
227 | { | 220 | { |
@@ -229,145 +222,141 @@ T_JZsdkReturnCode JZsdk_Uart_PlayMusic(int DeviceName, char *music_name, int dat | @@ -229,145 +222,141 @@ T_JZsdkReturnCode JZsdk_Uart_PlayMusic(int DeviceName, char *music_name, int dat | ||
229 | } | 222 | } |
230 | 223 | ||
231 | /********* | 224 | /********* |
232 | - * | 225 | + * |
233 | * 音频继续播放 | 226 | * 音频继续播放 |
234 | - * | ||
235 | - * | ||
236 | -**********/ | 227 | + * |
228 | + * | ||
229 | + **********/ | ||
237 | T_JZsdkReturnCode JZsdk_Uart_audio_PlayContinue(int DeviceName) | 230 | T_JZsdkReturnCode JZsdk_Uart_audio_PlayContinue(int DeviceName) |
238 | { | 231 | { |
239 | return UIcontrol_ContinuePlayAudio(DeviceName); | 232 | return UIcontrol_ContinuePlayAudio(DeviceName); |
240 | } | 233 | } |
241 | /********* | 234 | /********* |
242 | - * | 235 | + * |
243 | * 音频暂停播放 | 236 | * 音频暂停播放 |
244 | - * | ||
245 | - * | ||
246 | -**********/ | 237 | + * |
238 | + * | ||
239 | + **********/ | ||
247 | T_JZsdkReturnCode JZsdk_Uart_audio_PlayPause(int DeviceName) | 240 | T_JZsdkReturnCode JZsdk_Uart_audio_PlayPause(int DeviceName) |
248 | { | 241 | { |
249 | return UIcontrol_PausePlayAudio(DeviceName); | 242 | return UIcontrol_PausePlayAudio(DeviceName); |
250 | } | 243 | } |
251 | /********* | 244 | /********* |
252 | - * | 245 | + * |
253 | * 音频停止播放 | 246 | * 音频停止播放 |
254 | - * | ||
255 | - * | ||
256 | -**********/ | 247 | + * |
248 | + * | ||
249 | + **********/ | ||
257 | T_JZsdkReturnCode JZsdk_Uart_audio_PlayStop(int DeviceName) | 250 | T_JZsdkReturnCode JZsdk_Uart_audio_PlayStop(int DeviceName) |
258 | { | 251 | { |
259 | return UIcontrol_StopPlayAudio(DeviceName); | 252 | return UIcontrol_StopPlayAudio(DeviceName); |
260 | } | 253 | } |
261 | 254 | ||
262 | /********* | 255 | /********* |
263 | - * | 256 | + * |
264 | * 音频上一曲 | 257 | * 音频上一曲 |
265 | - * | ||
266 | - * | ||
267 | -**********/ | 258 | + * |
259 | + * | ||
260 | + **********/ | ||
268 | T_JZsdkReturnCode JZsdk_Uart_audio_LastSong(int DeviceName) | 261 | T_JZsdkReturnCode JZsdk_Uart_audio_LastSong(int DeviceName) |
269 | { | 262 | { |
270 | return UIcontrol_LastSong(DeviceName); | 263 | return UIcontrol_LastSong(DeviceName); |
271 | } | 264 | } |
272 | 265 | ||
273 | /********* | 266 | /********* |
274 | - * | 267 | + * |
275 | * 音频下一曲 | 268 | * 音频下一曲 |
276 | - * | ||
277 | - * | ||
278 | -**********/ | 269 | + * |
270 | + * | ||
271 | + **********/ | ||
279 | T_JZsdkReturnCode JZsdk_Uart_audio_NextSong(int DeviceName) | 272 | T_JZsdkReturnCode JZsdk_Uart_audio_NextSong(int DeviceName) |
280 | { | 273 | { |
281 | return UIcontrol_NextSong(DeviceName); | 274 | return UIcontrol_NextSong(DeviceName); |
282 | } | 275 | } |
283 | 276 | ||
284 | /********* | 277 | /********* |
285 | - * | 278 | + * |
286 | * 12、循环播放 | 279 | * 12、循环播放 |
287 | - * | ||
288 | - * | ||
289 | -**********/ | 280 | + * |
281 | + * | ||
282 | + **********/ | ||
290 | T_JZsdkReturnCode JZsdk_Uart_audio_PlayLoop(int DeviceName, int mode) | 283 | T_JZsdkReturnCode JZsdk_Uart_audio_PlayLoop(int DeviceName, int mode) |
291 | { | 284 | { |
292 | return UIcontrol_Set_AudioPlayLoop(DeviceName, mode); | 285 | return UIcontrol_Set_AudioPlayLoop(DeviceName, mode); |
293 | } | 286 | } |
294 | 287 | ||
295 | /**************************************************************************************************************************************************** | 288 | /**************************************************************************************************************************************************** |
296 | -* | ||
297 | -* 录音opus 接口部分 | ||
298 | -* | ||
299 | -****************************************************************************************************************************************************/ | 289 | + * |
290 | + * 录音opus 接口部分 | ||
291 | + * | ||
292 | + ****************************************************************************************************************************************************/ | ||
300 | 293 | ||
301 | /********* | 294 | /********* |
302 | - * | 295 | + * |
303 | * 播放固定位置的opus音频 | 296 | * 播放固定位置的opus音频 |
304 | - * | ||
305 | - * | ||
306 | -**********/ | 297 | + * |
298 | + * | ||
299 | + **********/ | ||
307 | T_JZsdkReturnCode JZsdk_Uart_Opus_PlayFixedFile(int DeviceName) | 300 | T_JZsdkReturnCode JZsdk_Uart_Opus_PlayFixedFile(int DeviceName) |
308 | { | 301 | { |
309 | return UIcontrol_Opus_PlayFixedFile(DeviceName); | 302 | return UIcontrol_Opus_PlayFixedFile(DeviceName); |
310 | } | 303 | } |
311 | 304 | ||
312 | - | ||
313 | /* | 305 | /* |
314 | -* | ||
315 | -* 存储opus文件开始 | ||
316 | -* | ||
317 | -*/ | 306 | + * |
307 | + * 存储opus文件开始 | ||
308 | + * | ||
309 | + */ | ||
318 | int JZsdk_Uart_SaveOpusStart(int decode_rate) | 310 | int JZsdk_Uart_SaveOpusStart(int decode_rate) |
319 | { | 311 | { |
320 | Megaphone_SaveOpusStart(decode_rate); | 312 | Megaphone_SaveOpusStart(decode_rate); |
321 | } | 313 | } |
322 | 314 | ||
323 | /* | 315 | /* |
324 | -* | ||
325 | -* 存储opus文件中 | ||
326 | -* | ||
327 | -*/ | 316 | + * |
317 | + * 存储opus文件中 | ||
318 | + * | ||
319 | + */ | ||
328 | int JZsdk_Uart_SaveOpusTrans(char *SaveData, int size) | 320 | int JZsdk_Uart_SaveOpusTrans(char *SaveData, int size) |
329 | { | 321 | { |
330 | Megaphone_SaveOpusTrans(SaveData, size); | 322 | Megaphone_SaveOpusTrans(SaveData, size); |
331 | } | 323 | } |
332 | 324 | ||
333 | /* | 325 | /* |
334 | -* | ||
335 | -* 存储opus文件结束 | ||
336 | -* | ||
337 | -*/ | 326 | + * |
327 | + * 存储opus文件结束 | ||
328 | + * | ||
329 | + */ | ||
338 | int JZsdk_Uart_SaveOpusStop() | 330 | int JZsdk_Uart_SaveOpusStop() |
339 | { | 331 | { |
340 | Megaphone_SaveOpusStop(); | 332 | Megaphone_SaveOpusStop(); |
341 | } | 333 | } |
342 | 334 | ||
343 | - | ||
344 | /**************************************************************************************************************************************************** | 335 | /**************************************************************************************************************************************************** |
345 | -* | ||
346 | -* 实时喊话opus 接口部分 | ||
347 | -* | ||
348 | -****************************************************************************************************************************************************/ | 336 | + * |
337 | + * 实时喊话opus 接口部分 | ||
338 | + * | ||
339 | + ****************************************************************************************************************************************************/ | ||
349 | int JZsdk_Uart_RealTimeVoiceStart(int decode_rate) | 340 | int JZsdk_Uart_RealTimeVoiceStart(int decode_rate) |
350 | { | 341 | { |
351 | Megaphone_RealTimeVoice_Start(decode_rate); | 342 | Megaphone_RealTimeVoice_Start(decode_rate); |
352 | } | 343 | } |
353 | 344 | ||
354 | - | ||
355 | int JZsdk_Uart_RealTimeVoiceTrans(char *data, int length) | 345 | int JZsdk_Uart_RealTimeVoiceTrans(char *data, int length) |
356 | { | 346 | { |
357 | Megaphone_RealTimeVoice_Trans(data, length); | 347 | Megaphone_RealTimeVoice_Trans(data, length); |
358 | } | 348 | } |
359 | 349 | ||
360 | - | ||
361 | int JZsdk_Uart_RealTimeVoiceClose() | 350 | int JZsdk_Uart_RealTimeVoiceClose() |
362 | { | 351 | { |
363 | Megaphone_RealTimeVoice_Close(); | 352 | Megaphone_RealTimeVoice_Close(); |
364 | } | 353 | } |
365 | 354 | ||
366 | /**************************************************************************************************************************************************** | 355 | /**************************************************************************************************************************************************** |
367 | -* | ||
368 | -* 实时MP2 接口部分 | ||
369 | -* | ||
370 | -****************************************************************************************************************************************************/ | 356 | + * |
357 | + * 实时MP2 接口部分 | ||
358 | + * | ||
359 | + ****************************************************************************************************************************************************/ | ||
371 | T_JZsdkReturnCode JZsdk_Uart_RealTimeMP2_start(int decode_rate) | 360 | T_JZsdkReturnCode JZsdk_Uart_RealTimeMP2_start(int decode_rate) |
372 | { | 361 | { |
373 | return Megaphone_RealTimeMP2_start(); | 362 | return Megaphone_RealTimeMP2_start(); |
@@ -378,134 +367,126 @@ T_JZsdkReturnCode JZsdk_Uart_RealTimeMP2_Trans(unsigned char *data, int length) | @@ -378,134 +367,126 @@ T_JZsdkReturnCode JZsdk_Uart_RealTimeMP2_Trans(unsigned char *data, int length) | ||
378 | return Megaphone_RealTimeMP2_trans(data, length); | 367 | return Megaphone_RealTimeMP2_trans(data, length); |
379 | } | 368 | } |
380 | 369 | ||
381 | - | ||
382 | T_JZsdkReturnCode JZsdk_Uart_RealTimeMP2_Close() | 370 | T_JZsdkReturnCode JZsdk_Uart_RealTimeMP2_Close() |
383 | { | 371 | { |
384 | Megaphone_RealTimeMP2_stop(); | 372 | Megaphone_RealTimeMP2_stop(); |
385 | } | 373 | } |
386 | 374 | ||
387 | - | ||
388 | - | ||
389 | - | ||
390 | - | ||
391 | - | ||
392 | /**************************************************************************************************************************************************** | 375 | /**************************************************************************************************************************************************** |
393 | -* | ||
394 | -* 云台部分 | ||
395 | -* | ||
396 | -****************************************************************************************************************************************************/ | 376 | + * |
377 | + * 云台部分 | ||
378 | + * | ||
379 | + ****************************************************************************************************************************************************/ | ||
397 | 380 | ||
398 | /********* | 381 | /********* |
399 | - * | 382 | + * |
400 | * 云台俯仰控制 | 383 | * 云台俯仰控制 |
401 | - * | ||
402 | - * | ||
403 | -**********/ | 384 | + * |
385 | + * | ||
386 | + **********/ | ||
404 | T_JZsdkReturnCode JZsdk_Uart_Gimbal_PitchControl(int DeviceName, int Gimbal_angle) | 387 | T_JZsdkReturnCode JZsdk_Uart_Gimbal_PitchControl(int DeviceName, int Gimbal_angle) |
405 | -{ | 388 | +{ |
406 | return UIcontrol_Set_GimbalPitchAngle(DeviceName, Gimbal_angle); | 389 | return UIcontrol_Set_GimbalPitchAngle(DeviceName, Gimbal_angle); |
407 | } | 390 | } |
408 | 391 | ||
409 | /********* | 392 | /********* |
410 | - * | 393 | + * |
411 | * 云台俯仰微调角度 | 394 | * 云台俯仰微调角度 |
412 | - * | ||
413 | - * | ||
414 | -**********/ | ||
415 | -T_JZsdkReturnCode JZsdk_Uart_Gimbal_PitchFineTuningControl(int DeviceName, int FrameSequence,int Gimbal_angle) | ||
416 | -{ | 395 | + * |
396 | + * | ||
397 | + **********/ | ||
398 | +T_JZsdkReturnCode JZsdk_Uart_Gimbal_PitchFineTuningControl(int DeviceName, int FrameSequence, int Gimbal_angle) | ||
399 | +{ | ||
417 | T_JZsdkReturnCode ret = UIcontrol_Set_GimbalPitchFineTuning(DeviceName, Gimbal_angle); | 400 | T_JZsdkReturnCode ret = UIcontrol_Set_GimbalPitchFineTuning(DeviceName, Gimbal_angle); |
418 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 401 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
419 | { | 402 | { |
420 | - //回复操作成功 | ||
421 | - JZsdk_Uart_SendDeal_Reply_Sucesss(DeviceName, FrameSequence); | 403 | + // 回复操作成功 |
404 | + JZsdk_Uart_SendDeal_Reply_Sucesss(DeviceName, FrameSequence); | ||
422 | } | 405 | } |
423 | else | 406 | else |
424 | { | 407 | { |
425 | - //回复操作失败 | ||
426 | - JZsdk_Uart_SendDeal_Reply_Failure(DeviceName, FrameSequence); | 408 | + // 回复操作失败 |
409 | + JZsdk_Uart_SendDeal_Reply_Failure(DeviceName, FrameSequence); | ||
427 | } | 410 | } |
428 | } | 411 | } |
429 | 412 | ||
430 | - | ||
431 | /**************************************************************************************************************************************************** | 413 | /**************************************************************************************************************************************************** |
432 | -* | ||
433 | -* 探照灯部分 | ||
434 | -* | ||
435 | -****************************************************************************************************************************************************/ | 414 | + * |
415 | + * 探照灯部分 | ||
416 | + * | ||
417 | + ****************************************************************************************************************************************************/ | ||
436 | /********* | 418 | /********* |
437 | - * | 419 | + * |
438 | * 探照灯爆闪频率控制 | 420 | * 探照灯爆闪频率控制 |
439 | - * | ||
440 | - * | ||
441 | -**********/ | 421 | + * |
422 | + * | ||
423 | + **********/ | ||
442 | T_JZsdkReturnCode JZsdk_Uart_Lighting_SetSearchLightFrequency(int DeviceName, int Frequency) | 424 | T_JZsdkReturnCode JZsdk_Uart_Lighting_SetSearchLightFrequency(int DeviceName, int Frequency) |
443 | -{ | 425 | +{ |
444 | return UIcontrol_Set_SearchLightFrequency(DeviceName, Frequency); | 426 | return UIcontrol_Set_SearchLightFrequency(DeviceName, Frequency); |
445 | } | 427 | } |
446 | 428 | ||
447 | /********* | 429 | /********* |
448 | - * | 430 | + * |
449 | * 灯光模式控制 | 431 | * 灯光模式控制 |
450 | - * | ||
451 | -**********/ | 432 | + * |
433 | + **********/ | ||
452 | T_JZsdkReturnCode JZsdk_Uart_SearchLight_Control(int DeviceName, int mode) | 434 | T_JZsdkReturnCode JZsdk_Uart_SearchLight_Control(int DeviceName, int mode) |
453 | { | 435 | { |
454 | - return UIcontrol_SearchLightControl(DeviceName, mode); | 436 | + return UIcontrol_SearchLightControl(DeviceName, mode); |
455 | } | 437 | } |
456 | 438 | ||
457 | /********* | 439 | /********* |
458 | - * | 440 | + * |
459 | * 灯光亮度 | 441 | * 灯光亮度 |
460 | - * | ||
461 | -**********/ | 442 | + * |
443 | + **********/ | ||
462 | T_JZsdkReturnCode JZsdk_Uart_SearchLight_Lumen(int DeviceName, int LeftLumen, int RightLumen) | 444 | T_JZsdkReturnCode JZsdk_Uart_SearchLight_Lumen(int DeviceName, int LeftLumen, int RightLumen) |
463 | { | 445 | { |
464 | - return UIcontrol_Set_SearchLightLumen(DeviceName, LeftLumen, RightLumen); | 446 | + return UIcontrol_Set_SearchLightLumen(DeviceName, LeftLumen, RightLumen); |
465 | } | 447 | } |
466 | 448 | ||
467 | /********* | 449 | /********* |
468 | - * | 450 | + * |
469 | * 灯光属性查询 | 451 | * 灯光属性查询 |
470 | - * | ||
471 | -**********/ | 452 | + * |
453 | + **********/ | ||
472 | T_JZsdkReturnCode JZsdk_Uart_CheckStatus_SearchLightLightAttribute(int DeviceName, int FrameSequence) | 454 | T_JZsdkReturnCode JZsdk_Uart_CheckStatus_SearchLightLightAttribute(int DeviceName, int FrameSequence) |
473 | { | 455 | { |
474 | - //1、查询灯光属性 | 456 | + // 1、查询灯光属性 |
475 | int Light_Frequency; | 457 | int Light_Frequency; |
476 | int Light_Mode; | 458 | int Light_Mode; |
477 | int Light_LeftLumen; | 459 | int Light_LeftLumen; |
478 | int Light_RightLumen; | 460 | int Light_RightLumen; |
479 | T_JZsdkReturnCode ret = UIcontrol_CheckStatus_SearchLightLightAttribute(&Light_Frequency, &Light_Mode, &Light_LeftLumen, &Light_RightLumen); | 461 | T_JZsdkReturnCode ret = UIcontrol_CheckStatus_SearchLightLightAttribute(&Light_Frequency, &Light_Mode, &Light_LeftLumen, &Light_RightLumen); |
480 | 462 | ||
481 | - //2、回复灯光属性 | 463 | + // 2、回复灯光属性 |
482 | JZsdk_Uart_SendDeal_SearchLight_Frequency(DeviceName, Light_Frequency); | 464 | JZsdk_Uart_SendDeal_SearchLight_Frequency(DeviceName, Light_Frequency); |
483 | JZsdk_Uart_SendDeal_SearchLight_Mode(DeviceName, Light_Mode); | 465 | JZsdk_Uart_SendDeal_SearchLight_Mode(DeviceName, Light_Mode); |
484 | - JZsdk_Uart_SendDeal_SearchLight_Lumen(DeviceName,Light_LeftLumen, Light_RightLumen); | 466 | + JZsdk_Uart_SendDeal_SearchLight_Lumen(DeviceName, Light_LeftLumen, Light_RightLumen); |
485 | } | 467 | } |
486 | 468 | ||
487 | /********* | 469 | /********* |
488 | - * | 470 | + * |
489 | * 灯光温度查询 | 471 | * 灯光温度查询 |
490 | - * | ||
491 | -**********/ | 472 | + * |
473 | + **********/ | ||
492 | T_JZsdkReturnCode JZsdk_Uart_CheckStatus_SearchLightTemperture(int DeviceName, int FrameSequence) | 474 | T_JZsdkReturnCode JZsdk_Uart_CheckStatus_SearchLightTemperture(int DeviceName, int FrameSequence) |
493 | { | 475 | { |
494 | - //1、查询灯光温度 | 476 | + // 1、查询灯光温度 |
495 | int Light_LeftTemperature; | 477 | int Light_LeftTemperature; |
496 | int Light_RightTemperature; | 478 | int Light_RightTemperature; |
497 | T_JZsdkReturnCode ret = UIcontrol_CheckStatus_SearchLightTemperture(&Light_LeftTemperature, &Light_RightTemperature); | 479 | T_JZsdkReturnCode ret = UIcontrol_CheckStatus_SearchLightTemperture(&Light_LeftTemperature, &Light_RightTemperature); |
498 | 480 | ||
499 | - //2、回复灯光温度 | 481 | + // 2、回复灯光温度 |
500 | JZsdk_Uart_SendDeal_SearchLight_Temperature(DeviceName, Light_LeftTemperature, Light_RightTemperature); | 482 | JZsdk_Uart_SendDeal_SearchLight_Temperature(DeviceName, Light_LeftTemperature, Light_RightTemperature); |
501 | - | ||
502 | } | 483 | } |
503 | 484 | ||
504 | /********* | 485 | /********* |
505 | - * | 486 | + * |
506 | * 灯光消息订阅控制 | 487 | * 灯光消息订阅控制 |
507 | - * | ||
508 | -**********/ | 488 | + * |
489 | + **********/ | ||
509 | T_JZsdkReturnCode JZsdk_Uart_SearchLight_SubscriptionControl(int DeviceName, int value) | 490 | T_JZsdkReturnCode JZsdk_Uart_SearchLight_SubscriptionControl(int DeviceName, int value) |
510 | { | 491 | { |
511 | if (DeviceName == UART_DEV_2) | 492 | if (DeviceName == UART_DEV_2) |
@@ -516,160 +497,224 @@ T_JZsdkReturnCode JZsdk_Uart_SearchLight_SubscriptionControl(int DeviceName, int | @@ -516,160 +497,224 @@ T_JZsdkReturnCode JZsdk_Uart_SearchLight_SubscriptionControl(int DeviceName, int | ||
516 | { | 497 | { |
517 | JZsdk_Uart_SendDeal_MessageSubcription_Control(UART_DEV_2, value); | 498 | JZsdk_Uart_SendDeal_MessageSubcription_Control(UART_DEV_2, value); |
518 | } | 499 | } |
519 | - | 500 | + |
520 | return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS; | 501 | return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS; |
521 | } | 502 | } |
522 | 503 | ||
523 | /********* | 504 | /********* |
524 | - * | 505 | + * |
525 | * 警灯模式控制 | 506 | * 警灯模式控制 |
526 | - * | ||
527 | -**********/ | 507 | + * |
508 | + **********/ | ||
528 | T_JZsdkReturnCode JZsdk_Uart_WarningLight_ModeControl(int DeviceName, int status, int mode) | 509 | T_JZsdkReturnCode JZsdk_Uart_WarningLight_ModeControl(int DeviceName, int status, int mode) |
529 | { | 510 | { |
530 | return UIcontrol_Set_WarningLight_ModeControl(DeviceName, status, mode); | 511 | return UIcontrol_Set_WarningLight_ModeControl(DeviceName, status, mode); |
531 | } | 512 | } |
532 | 513 | ||
533 | /********* | 514 | /********* |
534 | - * | 515 | + * |
535 | * 警灯颜色控制 | 516 | * 警灯颜色控制 |
536 | - * | ||
537 | -**********/ | 517 | + * |
518 | + **********/ | ||
538 | T_JZsdkReturnCode JZsdk_Uart_WarningLight_SetColor(int DeviceName, int color1, int color2) | 519 | T_JZsdkReturnCode JZsdk_Uart_WarningLight_SetColor(int DeviceName, int color1, int color2) |
539 | { | 520 | { |
540 | return UIcontrol_Set_WarningLight_Color(DeviceName, color1, color2); | 521 | return UIcontrol_Set_WarningLight_Color(DeviceName, color1, color2); |
541 | } | 522 | } |
542 | 523 | ||
543 | /********* | 524 | /********* |
544 | - * | 525 | + * |
545 | * 警灯状态查询 | 526 | * 警灯状态查询 |
546 | - * | ||
547 | -**********/ | 527 | + * |
528 | + **********/ | ||
548 | T_JZsdkReturnCode JZsdk_Uart_CheckStatus_WarningLightStatus(int DeviceName, int FrameSequence) | 529 | T_JZsdkReturnCode JZsdk_Uart_CheckStatus_WarningLightStatus(int DeviceName, int FrameSequence) |
549 | { | 530 | { |
550 | - //1、查询警灯状态查询 | 531 | + // 1、查询警灯状态查询 |
551 | int status; | 532 | int status; |
552 | int Mode; | 533 | int Mode; |
553 | T_JZsdkReturnCode ret = UIcontrol_CheckStatus_WarningLightStatus(&status, &Mode); | 534 | T_JZsdkReturnCode ret = UIcontrol_CheckStatus_WarningLightStatus(&status, &Mode); |
554 | 535 | ||
555 | - //2、回复警灯状态查询 | 536 | + // 2、回复警灯状态查询 |
556 | JZsdk_Uart_SendDeal_WarningLight_Status(DeviceName, status, Mode); | 537 | JZsdk_Uart_SendDeal_WarningLight_Status(DeviceName, status, Mode); |
557 | - | ||
558 | } | 538 | } |
559 | 539 | ||
560 | /********* | 540 | /********* |
561 | - * | 541 | + * |
562 | * 警灯颜色查询 | 542 | * 警灯颜色查询 |
563 | - * | ||
564 | -**********/ | 543 | + * |
544 | + **********/ | ||
565 | T_JZsdkReturnCode JZsdk_Uart_CheckStatus_WarningLightColor(int DeviceName, int FrameSequence) | 545 | T_JZsdkReturnCode JZsdk_Uart_CheckStatus_WarningLightColor(int DeviceName, int FrameSequence) |
566 | { | 546 | { |
567 | - //1、查询灯光温度 | 547 | + // 1、查询灯光温度 |
568 | int color1; | 548 | int color1; |
569 | int color2; | 549 | int color2; |
570 | 550 | ||
571 | T_JZsdkReturnCode ret = UIcontrol_CheckStatus_WarningLightColor(&color1, &color2); | 551 | T_JZsdkReturnCode ret = UIcontrol_CheckStatus_WarningLightColor(&color1, &color2); |
572 | 552 | ||
573 | - //2、回复警灯颜色 | 553 | + // 2、回复警灯颜色 |
574 | JZsdk_Uart_SendDeal_WarningLight_Color(DeviceName, color1, color2); | 554 | JZsdk_Uart_SendDeal_WarningLight_Color(DeviceName, color1, color2); |
575 | - | ||
576 | } | 555 | } |
577 | 556 | ||
578 | /* | 557 | /* |
579 | -* | ||
580 | -* 获取本地主设备名 | ||
581 | -* | ||
582 | -*/ | 558 | + * |
559 | + * 获取本地主设备名 | ||
560 | + * | ||
561 | + */ | ||
583 | int JZsdk_Uart_GetVersionReplay() | 562 | int JZsdk_Uart_GetVersionReplay() |
584 | { | 563 | { |
585 | switch (DEVICE_VERSION) | 564 | switch (DEVICE_VERSION) |
586 | { | 565 | { |
587 | - case JZ_H1E: | ||
588 | - return 0x11; | ||
589 | - break; | ||
590 | - | ||
591 | - case JZ_H150S: | ||
592 | - return 0x13; | ||
593 | - break; | ||
594 | - | ||
595 | - case JZ_H150T: | ||
596 | - return 0x15; | ||
597 | - break; | ||
598 | - | ||
599 | - case JZ_H10: | ||
600 | - return 0x12; | ||
601 | - break; | ||
602 | - case JZ_H10T: | ||
603 | - return 0x14; | ||
604 | - break; | ||
605 | - | ||
606 | - case JZ_H1T: | ||
607 | - return 0x16; | ||
608 | - break; | ||
609 | - | ||
610 | - case JZ_U3: | ||
611 | - return 0x17; | ||
612 | - break; | ||
613 | - | ||
614 | - default: | ||
615 | - return 0x00; | ||
616 | - break; | 566 | + case JZ_H1E: |
567 | + return 0x11; | ||
568 | + break; | ||
569 | + | ||
570 | + case JZ_H150S: | ||
571 | + return 0x13; | ||
572 | + break; | ||
573 | + | ||
574 | + case JZ_H150T: | ||
575 | + return 0x15; | ||
576 | + break; | ||
577 | + | ||
578 | + case JZ_H10: | ||
579 | + return 0x12; | ||
580 | + break; | ||
581 | + case JZ_H10T: | ||
582 | + return 0x14; | ||
583 | + break; | ||
584 | + | ||
585 | + case JZ_H1T: | ||
586 | + return 0x16; | ||
587 | + break; | ||
588 | + | ||
589 | + case JZ_U3: | ||
590 | + return 0x17; | ||
591 | + break; | ||
592 | + | ||
593 | + default: | ||
594 | + return 0x00; | ||
595 | + break; | ||
617 | }; | 596 | }; |
618 | - | ||
619 | } | 597 | } |
620 | 598 | ||
621 | - | ||
622 | /* | 599 | /* |
623 | -* | ||
624 | -* 设置工作模式 | ||
625 | -* | ||
626 | -*/ | 600 | + * |
601 | + * 设置工作模式 | ||
602 | + * | ||
603 | + */ | ||
627 | int JZsdk_Uart_SetMainWorkMode(int mode) | 604 | int JZsdk_Uart_SetMainWorkMode(int mode) |
628 | { | 605 | { |
629 | Main_WorkModeSet(mode); | 606 | Main_WorkModeSet(mode); |
630 | } | 607 | } |
631 | 608 | ||
609 | +/* | ||
610 | + * | ||
611 | + * 查询序列号 | ||
612 | + * | ||
613 | + */ | ||
614 | +T_JZsdkReturnCode JZsdk_Uart_CheckStatus_SerialNumber(int UartPort, int FrameSequence) | ||
615 | +{ | ||
616 | + // 1、获取序列号 | ||
617 | + char SerialNum[14]; | ||
618 | + T_JZsdkReturnCode ret = GetSerialNumber(SerialNum); | ||
619 | + if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | ||
620 | + { | ||
621 | + JZSDK_LOG_ERROR("获取序列号失败"); | ||
622 | + | ||
623 | + JZsdk_Uart_SendDeal_Reply_Failure(UartPort, FrameSequence); | ||
624 | + | ||
625 | + return ret; | ||
626 | + } | ||
627 | + | ||
628 | + // 2、发送序列号 | ||
629 | + JZsdk_Uart_SendDeal_SerialNumber(UartPort, FrameSequence, SerialNum); | ||
630 | + return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS; | ||
631 | +} | ||
632 | + | ||
632 | /**************************************************************************************************************************************************** | 633 | /**************************************************************************************************************************************************** |
633 | -* | ||
634 | -* AudioFile 接口部分 | ||
635 | -* | ||
636 | -****************************************************************************************************************************************************/ | 634 | + * |
635 | + * AudioFile 接口部分 | ||
636 | + * | ||
637 | + ****************************************************************************************************************************************************/ | ||
637 | /* | 638 | /* |
638 | 1、开始传输的音频文件保存 | 639 | 1、开始传输的音频文件保存 |
639 | 2、存储音频文件中 | 640 | 2、存储音频文件中 |
640 | 3、存储音频文件结束 | 641 | 3、存储音频文件结束 |
641 | */ | 642 | */ |
642 | /********* | 643 | /********* |
643 | - * | 644 | + * |
644 | * 1、开始传输的音频文件保存 | 645 | * 1、开始传输的音频文件保存 |
645 | - * | ||
646 | - * | ||
647 | -**********/ | 646 | + * |
647 | + * | ||
648 | + **********/ | ||
648 | T_JZsdkReturnCode JZsdk_Uart_SaveAudioFileStart(char *FileName) | 649 | T_JZsdkReturnCode JZsdk_Uart_SaveAudioFileStart(char *FileName) |
649 | { | 650 | { |
650 | return Megaphone_SaveAudioFileStart(FileName); | 651 | return Megaphone_SaveAudioFileStart(FileName); |
651 | } | 652 | } |
652 | 653 | ||
653 | /* | 654 | /* |
654 | -* | ||
655 | -* 2、存储音频文件中 | ||
656 | -* | ||
657 | -*/ | 655 | + * |
656 | + * 2、存储音频文件中 | ||
657 | + * | ||
658 | + */ | ||
658 | int JZsdk_Uart_SaveAudioFileTrans(char *SaveData, int size) | 659 | int JZsdk_Uart_SaveAudioFileTrans(char *SaveData, int size) |
659 | { | 660 | { |
660 | Megaphone_SaveAudioFileTrans(SaveData, size); | 661 | Megaphone_SaveAudioFileTrans(SaveData, size); |
661 | } | 662 | } |
662 | 663 | ||
663 | /* | 664 | /* |
664 | -* | ||
665 | -* 3、存储音频文件结束 | ||
666 | -* | ||
667 | -*/ | 665 | + * |
666 | + * 3、存储音频文件结束 | ||
667 | + * | ||
668 | + */ | ||
668 | int JZsdk_Uart_SaveAudioFileStop() | 669 | int JZsdk_Uart_SaveAudioFileStop() |
669 | { | 670 | { |
670 | Megaphone_SaveAudioFileStop(); | 671 | Megaphone_SaveAudioFileStop(); |
671 | } | 672 | } |
672 | 673 | ||
674 | +/**************************************************************************************************************************************************** | ||
675 | + * | ||
676 | + * 对外供电部分 | ||
677 | + * | ||
678 | + ****************************************************************************************************************************************************/ | ||
679 | +/********* | ||
680 | + * | ||
681 | + * 对外供电开关 | ||
682 | + * | ||
683 | + **********/ | ||
684 | +T_JZsdkReturnCode JZsdk_Uart_OutPutPower_Control(int DeviceName, int FrameSequence, int Value) | ||
685 | +{ | ||
686 | + //1、设置本地的值 | ||
687 | + T_JZsdkReturnCode ret = UIcontrol_Set_OutPutPower_Control(DeviceName, Value); | ||
688 | + if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | ||
689 | + { | ||
690 | + JZsdk_Uart_SendDeal_Reply_Failure(DeviceName, FrameSequence); | ||
691 | + } | ||
692 | + | ||
693 | + //2、回复操作成功 | ||
694 | + JZsdk_Uart_SendDeal_Reply_Sucesss(DeviceName, FrameSequence); | ||
695 | +} | ||
696 | + | ||
697 | +/********* | ||
698 | + * | ||
699 | + * 对外电源查询 | ||
700 | + * | ||
701 | + **********/ | ||
702 | +T_JZsdkReturnCode JZsdk_Uart_Checkstatus_OutPutPower(int DeviceName, int FrameSequence) | ||
703 | +{ | ||
704 | + int OutPutPowerValue = JZ_FLAGCODE_OFF; | ||
705 | + | ||
706 | + //1、获取电源值 | ||
707 | + T_JZsdkReturnCode ret = UIcontrol_CheckStatus_OutPutPowerValue(&OutPutPowerValue); | ||
708 | + if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | ||
709 | + { | ||
710 | + JZsdk_Uart_SendDeal_Reply_Failure(DeviceName, FrameSequence); | ||
711 | + } | ||
712 | + | ||
713 | + //2、发送电源值 | ||
714 | + JZsdk_Uart_SendDeal_OutputPowerStatus(DeviceName, FrameSequence, OutPutPowerValue); | ||
715 | +} | ||
716 | + | ||
717 | + | ||
673 | /******************************************************************************************************** | 718 | /******************************************************************************************************** |
674 | ********* ********| | 719 | ********* ********| |
675 | ********* ********| | 720 | ********* ********| |
@@ -685,128 +730,124 @@ int JZsdk_Uart_SaveAudioFileStop() | @@ -685,128 +730,124 @@ int JZsdk_Uart_SaveAudioFileStop() | ||
685 | *********************************************************************************************************/ | 730 | *********************************************************************************************************/ |
686 | 731 | ||
687 | /******************************************************************************************************************************* | 732 | /******************************************************************************************************************************* |
688 | - * | 733 | + * |
689 | * 灯光部分 | 734 | * 灯光部分 |
690 | - * | 735 | + * |
691 | * *****************************************************************************************************************************/ | 736 | * *****************************************************************************************************************************/ |
692 | /********* | 737 | /********* |
693 | - * | 738 | + * |
694 | * 收到灯光频率 | 739 | * 收到灯光频率 |
695 | - * | ||
696 | -**********/ | 740 | + * |
741 | + **********/ | ||
697 | T_JZsdkReturnCode JZsdl_Uart_ObtainSearchLight_Frequency(int DeviceName, int Frequency) | 742 | T_JZsdkReturnCode JZsdl_Uart_ObtainSearchLight_Frequency(int DeviceName, int Frequency) |
698 | { | 743 | { |
699 | UIcontrol_ObtainSearchLight_Frequency(DeviceName, Frequency); | 744 | UIcontrol_ObtainSearchLight_Frequency(DeviceName, Frequency); |
700 | -} | 745 | +} |
701 | 746 | ||
702 | /********* | 747 | /********* |
703 | - * | 748 | + * |
704 | * 收到灯光模式 | 749 | * 收到灯光模式 |
705 | - * | ||
706 | -**********/ | 750 | + * |
751 | + **********/ | ||
707 | T_JZsdkReturnCode JZsdl_Uart_ObtainSearchLight_Mode(int DeviceName, int mode) | 752 | T_JZsdkReturnCode JZsdl_Uart_ObtainSearchLight_Mode(int DeviceName, int mode) |
708 | { | 753 | { |
709 | UIcontrol_ObtainSearchLight_Mode(DeviceName, mode); | 754 | UIcontrol_ObtainSearchLight_Mode(DeviceName, mode); |
710 | -} | 755 | +} |
711 | 756 | ||
712 | /********* | 757 | /********* |
713 | - * | 758 | + * |
714 | * 收到灯光亮度 | 759 | * 收到灯光亮度 |
715 | - * | ||
716 | -**********/ | 760 | + * |
761 | + **********/ | ||
717 | T_JZsdkReturnCode JZsdl_Uart_ObtainSearchLight_Lumen(int DeviceName, int LeftLumen, int RightLumen) | 762 | T_JZsdkReturnCode JZsdl_Uart_ObtainSearchLight_Lumen(int DeviceName, int LeftLumen, int RightLumen) |
718 | { | 763 | { |
719 | UIcontrol_ObtainSearchLight_Lumen(DeviceName, LeftLumen, RightLumen); | 764 | UIcontrol_ObtainSearchLight_Lumen(DeviceName, LeftLumen, RightLumen); |
720 | -} | 765 | +} |
721 | 766 | ||
722 | /********* | 767 | /********* |
723 | - * | 768 | + * |
724 | * 收到探照灯温度 | 769 | * 收到探照灯温度 |
725 | - * | ||
726 | -**********/ | 770 | + * |
771 | + **********/ | ||
727 | T_JZsdkReturnCode JZsdl_Uart_ObtainSearchLight_Temperature(int DeviceName, int LeftTemperature, int RightTemperature) | 772 | T_JZsdkReturnCode JZsdl_Uart_ObtainSearchLight_Temperature(int DeviceName, int LeftTemperature, int RightTemperature) |
728 | { | 773 | { |
729 | UIcontrol_ObtainSearchLight_Temperature(DeviceName, LeftTemperature, RightTemperature); | 774 | UIcontrol_ObtainSearchLight_Temperature(DeviceName, LeftTemperature, RightTemperature); |
730 | } | 775 | } |
731 | 776 | ||
732 | /******************************************************************************************************************************* | 777 | /******************************************************************************************************************************* |
733 | - * | 778 | + * |
734 | * 云台部分 | 779 | * 云台部分 |
735 | - * | 780 | + * |
736 | * *****************************************************************************************************************************/ | 781 | * *****************************************************************************************************************************/ |
737 | /********* | 782 | /********* |
738 | - * | 783 | + * |
739 | * 收到云台俯仰 | 784 | * 收到云台俯仰 |
740 | - * | ||
741 | -**********/ | 785 | + * |
786 | + **********/ | ||
742 | T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainGimbal_Pitch(int DeviceName, int pitch) | 787 | T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainGimbal_Pitch(int DeviceName, int pitch) |
743 | { | 788 | { |
744 | UIcontrol_ObtainGimbal_Pitch(DeviceName, pitch); | 789 | UIcontrol_ObtainGimbal_Pitch(DeviceName, pitch); |
745 | } | 790 | } |
746 | 791 | ||
747 | /********* | 792 | /********* |
748 | - * | 793 | + * |
749 | * 收到云台航向 | 794 | * 收到云台航向 |
750 | - * | ||
751 | -**********/ | 795 | + * |
796 | + **********/ | ||
752 | T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainGimbal_Yaw(int DeviceName, int yaw) | 797 | T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainGimbal_Yaw(int DeviceName, int yaw) |
753 | { | 798 | { |
754 | - | ||
755 | } | 799 | } |
756 | 800 | ||
757 | /********* | 801 | /********* |
758 | - * | 802 | + * |
759 | * 收到云台俯仰微调值 | 803 | * 收到云台俯仰微调值 |
760 | - * | ||
761 | -**********/ | ||
762 | -T_JZsdkReturnCode JZsdl_Uart_ObtainGimbalPitchFineTuning(int DeviceName, int FrameSequence,int pitch) | 804 | + * |
805 | + **********/ | ||
806 | +T_JZsdkReturnCode JZsdl_Uart_ObtainGimbalPitchFineTuning(int DeviceName, int FrameSequence, int pitch) | ||
763 | { | 807 | { |
764 | printf("收到云台俯仰微调值\n"); | 808 | printf("收到云台俯仰微调值\n"); |
765 | 809 | ||
766 | - //2、发送到本地处理 | ||
767 | - UIcontrol_Obtain_GimbalPitchFineTuninng(DeviceName, pitch); | 810 | + // 2、发送到本地处理 |
811 | + UIcontrol_Obtain_GimbalPitchFineTuninng(DeviceName, pitch); | ||
768 | 812 | ||
769 | - //3、回复操作成功 | ||
770 | - JZsdk_Uart_SendDeal_Reply_Sucesss(DeviceName, FrameSequence); | 813 | + // 3、回复操作成功 |
814 | + JZsdk_Uart_SendDeal_Reply_Sucesss(DeviceName, FrameSequence); | ||
771 | } | 815 | } |
772 | 816 | ||
773 | - | ||
774 | /******************************************************************************************************************************* | 817 | /******************************************************************************************************************************* |
775 | - * | 818 | + * |
776 | * 警灯部分 | 819 | * 警灯部分 |
777 | - * | 820 | + * |
778 | * *****************************************************************************************************************************/ | 821 | * *****************************************************************************************************************************/ |
779 | /********* | 822 | /********* |
780 | - * | 823 | + * |
781 | * 收到警灯状态 | 824 | * 收到警灯状态 |
782 | - * | ||
783 | -**********/ | 825 | + * |
826 | + **********/ | ||
784 | T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainWaringlight_Status(int DeviceName, int status, int mode) | 827 | T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainWaringlight_Status(int DeviceName, int status, int mode) |
785 | { | 828 | { |
786 | UIcontrol_ObtainWarningLight_Status(DeviceName, status, mode); | 829 | UIcontrol_ObtainWarningLight_Status(DeviceName, status, mode); |
787 | } | 830 | } |
788 | 831 | ||
789 | /********* | 832 | /********* |
790 | - * | 833 | + * |
791 | * 收到警灯颜色 | 834 | * 收到警灯颜色 |
792 | - * | ||
793 | -**********/ | 835 | + * |
836 | + **********/ | ||
794 | T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainWaringlight_Color(int DeviceName, int color1, int color2) | 837 | T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainWaringlight_Color(int DeviceName, int color1, int color2) |
795 | { | 838 | { |
796 | UIcontrol_ObtainWarningLight_Color(DeviceName, color1, color2); | 839 | UIcontrol_ObtainWarningLight_Color(DeviceName, color1, color2); |
797 | } | 840 | } |
798 | 841 | ||
799 | /********* | 842 | /********* |
800 | - * | 843 | + * |
801 | * 收到产品序列号 | 844 | * 收到产品序列号 |
802 | - * | ||
803 | -**********/ | 845 | + * |
846 | + **********/ | ||
804 | T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainSerialNumber(int DeviceName, int SerialNumber) | 847 | T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainSerialNumber(int DeviceName, int SerialNumber) |
805 | { | 848 | { |
806 | - | ||
807 | } | 849 | } |
808 | 850 | ||
809 | - | ||
810 | /******************************************************************************************************** | 851 | /******************************************************************************************************** |
811 | ********* ********| | 852 | ********* ********| |
812 | ********* ********| | 853 | ********* ********| |
@@ -822,41 +863,41 @@ T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainSerialNumber(int DeviceName, int Ser | @@ -822,41 +863,41 @@ T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainSerialNumber(int DeviceName, int Ser | ||
822 | *********************************************************************************************************/ | 863 | *********************************************************************************************************/ |
823 | 864 | ||
824 | /********* | 865 | /********* |
825 | - * | 866 | + * |
826 | * 设置云台最大值最小值 | 867 | * 设置云台最大值最小值 |
827 | - * | ||
828 | -**********/ | 868 | + * |
869 | + **********/ | ||
829 | T_JZsdkReturnCode JZsdk_Uart_SetGimbalRange(int DeviceName, int value) | 870 | T_JZsdkReturnCode JZsdk_Uart_SetGimbalRange(int DeviceName, int value) |
830 | { | 871 | { |
831 | return UIcontrol_SetGimbalRange(DeviceName, value); | 872 | return UIcontrol_SetGimbalRange(DeviceName, value); |
832 | } | 873 | } |
833 | 874 | ||
834 | /********* | 875 | /********* |
835 | - * | 876 | + * |
836 | * 设置云台联动 | 877 | * 设置云台联动 |
837 | - * | ||
838 | -**********/ | 878 | + * |
879 | + **********/ | ||
839 | T_JZsdkReturnCode JZsdk_Uart_GimbalLinkageControl(int DeviceName, int FrameSequence, int value) | 880 | T_JZsdkReturnCode JZsdk_Uart_GimbalLinkageControl(int DeviceName, int FrameSequence, int value) |
840 | { | 881 | { |
841 | - //1、设置本地的云台联动 | 882 | + // 1、设置本地的云台联动 |
842 | int ret = UIcontrol_Set_GimbalLinkageControl(DeviceName, value); | 883 | int ret = UIcontrol_Set_GimbalLinkageControl(DeviceName, value); |
843 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 884 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
844 | { | 885 | { |
845 | - //回复操作成功 | ||
846 | - JZsdk_Uart_SendDeal_Reply_Sucesss(DeviceName, FrameSequence); | 886 | + // 回复操作成功 |
887 | + JZsdk_Uart_SendDeal_Reply_Sucesss(DeviceName, FrameSequence); | ||
847 | } | 888 | } |
848 | else | 889 | else |
849 | { | 890 | { |
850 | - //回复操作失败 | ||
851 | - JZsdk_Uart_SendDeal_Reply_Failure(DeviceName, FrameSequence); | 891 | + // 回复操作失败 |
892 | + JZsdk_Uart_SendDeal_Reply_Failure(DeviceName, FrameSequence); | ||
852 | } | 893 | } |
853 | } | 894 | } |
854 | 895 | ||
855 | /********* | 896 | /********* |
856 | - * | 897 | + * |
857 | * 查询云台联动 | 898 | * 查询云台联动 |
858 | - * | ||
859 | -**********/ | 899 | + * |
900 | + **********/ | ||
860 | T_JZsdkReturnCode JZsdk_Uart_Checkstatus_GimbalLinkage(int DeviceName, int FrameSequence) | 901 | T_JZsdkReturnCode JZsdk_Uart_Checkstatus_GimbalLinkage(int DeviceName, int FrameSequence) |
861 | { | 902 | { |
862 | int LinkageValue; | 903 | int LinkageValue; |
@@ -864,40 +905,38 @@ T_JZsdkReturnCode JZsdk_Uart_Checkstatus_GimbalLinkage(int DeviceName, int Frame | @@ -864,40 +905,38 @@ T_JZsdkReturnCode JZsdk_Uart_Checkstatus_GimbalLinkage(int DeviceName, int Frame | ||
864 | T_JZsdkReturnCode ret = UIcontrol_CheckStatus_GimbalLinkage(&LinkageValue); | 905 | T_JZsdkReturnCode ret = UIcontrol_CheckStatus_GimbalLinkage(&LinkageValue); |
865 | if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 906 | if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
866 | { | 907 | { |
867 | - //回复操作失败 | ||
868 | - JZsdk_Uart_SendDeal_Reply_Failure(DeviceName, FrameSequence); | 908 | + // 回复操作失败 |
909 | + JZsdk_Uart_SendDeal_Reply_Failure(DeviceName, FrameSequence); | ||
869 | } | 910 | } |
870 | 911 | ||
871 | - //成功则发送云台联动值 | 912 | + // 成功则发送云台联动值 |
872 | JZsdk_Uart_SendDeal_GimbalLinkageControl(DeviceName, FrameSequence, LinkageValue); | 913 | JZsdk_Uart_SendDeal_GimbalLinkageControl(DeviceName, FrameSequence, LinkageValue); |
873 | } | 914 | } |
874 | 915 | ||
875 | /* | 916 | /* |
876 | -* | ||
877 | -* 设置本地从设备名 | ||
878 | -* | ||
879 | -*/ | 917 | + * |
918 | + * 设置本地从设备名 | ||
919 | + * | ||
920 | + */ | ||
880 | T_JZsdkReturnCode JZsdk_Uart_SetSecondaryDeviceName(int DeviceName) | 921 | T_JZsdkReturnCode JZsdk_Uart_SetSecondaryDeviceName(int DeviceName) |
881 | { | 922 | { |
882 | - printf("设置本地从设备名%x\n",DeviceName); | 923 | + printf("设置本地从设备名%x\n", DeviceName); |
883 | 924 | ||
884 | SecondaryDeviceName = DeviceName; | 925 | SecondaryDeviceName = DeviceName; |
885 | 926 | ||
886 | return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS; | 927 | return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS; |
887 | } | 928 | } |
888 | 929 | ||
889 | - | ||
890 | /* | 930 | /* |
891 | -* | ||
892 | -* 获取本地从设备名 | ||
893 | -* | ||
894 | -*/ | 931 | + * |
932 | + * 获取本地从设备名 | ||
933 | + * | ||
934 | + */ | ||
895 | int JZsdk_Uart_GetSecondaryDeviceName() | 935 | int JZsdk_Uart_GetSecondaryDeviceName() |
896 | { | 936 | { |
897 | return SecondaryDeviceName; | 937 | return SecondaryDeviceName; |
898 | } | 938 | } |
899 | 939 | ||
900 | - | ||
901 | /******************************************************************************************************** | 940 | /******************************************************************************************************** |
902 | ********* ********| | 941 | ********* ********| |
903 | ********* ********| | 942 | ********* ********| |
@@ -913,32 +952,32 @@ int JZsdk_Uart_GetSecondaryDeviceName() | @@ -913,32 +952,32 @@ int JZsdk_Uart_GetSecondaryDeviceName() | ||
913 | *********************************************************************************************************/ | 952 | *********************************************************************************************************/ |
914 | 953 | ||
915 | /** | 954 | /** |
916 | - * | 955 | + * |
917 | * 查询从设备名 | 956 | * 查询从设备名 |
918 | - * | ||
919 | -*/ | 957 | + * |
958 | + */ | ||
920 | int JZsdk_Uart_QuerySecondaryDeviceName(int FrameSequence) | 959 | int JZsdk_Uart_QuerySecondaryDeviceName(int FrameSequence) |
921 | { | 960 | { |
922 | - //1、发送查询一遍从设备名, 通常位于 串口1 | 961 | + // 1、发送查询一遍从设备名, 通常位于 串口1 |
923 | JZsdk_Uart_SendDeal_QuerySecondaryDeviceName(UART_DEV_1, FrameSequence); | 962 | JZsdk_Uart_SendDeal_QuerySecondaryDeviceName(UART_DEV_1, FrameSequence); |
924 | } | 963 | } |
925 | 964 | ||
926 | /********* | 965 | /********* |
927 | - * | 966 | + * |
928 | * 收到云台联动值 | 967 | * 收到云台联动值 |
929 | - * | ||
930 | -**********/ | ||
931 | -T_JZsdkReturnCode JZsdk_Uart_ObtainGimbalLinkage(int DeviceName,int FrameSequence, int value) | 968 | + * |
969 | + **********/ | ||
970 | +T_JZsdkReturnCode JZsdk_Uart_ObtainGimbalLinkage(int DeviceName, int FrameSequence, int value) | ||
932 | { | 971 | { |
933 | T_JZsdkReturnCode ret = UIcontrol_Obtain_GimbalLinkage(DeviceName, value); | 972 | T_JZsdkReturnCode ret = UIcontrol_Obtain_GimbalLinkage(DeviceName, value); |
934 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 973 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
935 | { | 974 | { |
936 | - //回复操作成功 | ||
937 | - JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence); | 975 | + // 回复操作成功 |
976 | + JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence); | ||
938 | } | 977 | } |
939 | else | 978 | else |
940 | { | 979 | { |
941 | - //回复操作失败 | ||
942 | - JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence); | 980 | + // 回复操作失败 |
981 | + JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence); | ||
943 | } | 982 | } |
944 | } | 983 | } |
@@ -62,6 +62,7 @@ T_JZsdkReturnCode JZsdk_Uart_audio_PlayLoop(int DeviceName, int mode); | @@ -62,6 +62,7 @@ T_JZsdkReturnCode JZsdk_Uart_audio_PlayLoop(int DeviceName, int mode); | ||
62 | 62 | ||
63 | T_JZsdkReturnCode JZsdk_Uart_Opus_PlayFixedFile(int DeviceName); | 63 | T_JZsdkReturnCode JZsdk_Uart_Opus_PlayFixedFile(int DeviceName); |
64 | 64 | ||
65 | +T_JZsdkReturnCode JZsdk_Uart_CheckStatus_SerialNumber(int UartPort, int FrameSequence); | ||
65 | 66 | ||
66 | 67 | ||
67 | 68 | ||
@@ -132,6 +133,10 @@ int JZsdk_Uart_GetSecondaryDeviceName(); | @@ -132,6 +133,10 @@ int JZsdk_Uart_GetSecondaryDeviceName(); | ||
132 | T_JZsdkReturnCode JZsdk_Uart_SetSecondaryDeviceName(int DeviceName); | 133 | T_JZsdkReturnCode JZsdk_Uart_SetSecondaryDeviceName(int DeviceName); |
133 | int JZsdk_Uart_QuerySecondaryDeviceName(int FrameSequence); | 134 | int JZsdk_Uart_QuerySecondaryDeviceName(int FrameSequence); |
134 | 135 | ||
136 | + | ||
137 | +T_JZsdkReturnCode JZsdk_Uart_OutPutPower_Control(int DeviceName, int FrameSequence, int Value); | ||
138 | +T_JZsdkReturnCode JZsdk_Uart_Checkstatus_OutPutPower(int DeviceName, int FrameSequence); | ||
139 | + | ||
135 | #ifdef __cplusplus | 140 | #ifdef __cplusplus |
136 | } | 141 | } |
137 | #endif | 142 | #endif |
@@ -39,7 +39,7 @@ int JZsdk_Uart_RecvDeal_Set_UART_4G_Receive_mode(int value); | @@ -39,7 +39,7 @@ int JZsdk_Uart_RecvDeal_Set_UART_4G_Receive_mode(int value); | ||
39 | **********/ | 39 | **********/ |
40 | static int Uart_4G_RecvDeal_AskForConnect(char *getbuf) | 40 | static int Uart_4G_RecvDeal_AskForConnect(char *getbuf) |
41 | { | 41 | { |
42 | - USER_LOG_INFO("串口设备4G,连接成功"); | 42 | + JZSDK_LOG_INFO("串口设备4g,连接成功"); |
43 | //获取帧的序列号 | 43 | //获取帧的序列号 |
44 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 44 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
45 | 45 | ||
@@ -50,7 +50,7 @@ static int Uart_4G_RecvDeal_AskForConnect(char *getbuf) | @@ -50,7 +50,7 @@ static int Uart_4G_RecvDeal_AskForConnect(char *getbuf) | ||
50 | JZsdk_Uart_SendDeal_Send_Connect(UART_4G, Device_name); | 50 | JZsdk_Uart_SendDeal_Send_Connect(UART_4G, Device_name); |
51 | 51 | ||
52 | //1、将串口程序设置为连接模式 | 52 | //1、将串口程序设置为连接模式 |
53 | - //JZsdk_Uart_SetMainWorkMode(JZ_FLAGCODE_ON); | 53 | + //JZsdk_Uart_SetMainWorkMode(JZ_FLAGCODE_ON);s |
54 | } | 54 | } |
55 | 55 | ||
56 | /******************************************************************************************************************************* | 56 | /******************************************************************************************************************************* |
@@ -67,7 +67,7 @@ static int Uart_4G_RecvDeal_AskForConnect(char *getbuf) | @@ -67,7 +67,7 @@ static int Uart_4G_RecvDeal_AskForConnect(char *getbuf) | ||
67 | **********/ | 67 | **********/ |
68 | static int Uart_4G_RecvDeal_RealTimeMP2_start(char *getbuf) | 68 | static int Uart_4G_RecvDeal_RealTimeMP2_start(char *getbuf) |
69 | { | 69 | { |
70 | - USER_LOG_INFO("开启MP2实时喊话功能\n"); | 70 | + JZSDK_LOG_INFO("开启MP2实时喊话功能\n"); |
71 | T_JZsdkReturnCode ret; | 71 | T_JZsdkReturnCode ret; |
72 | 72 | ||
73 | //获取帧的序列号 | 73 | //获取帧的序列号 |
@@ -111,7 +111,7 @@ static int Uart_4G_RecvDeal_RealTimeMP2_start(char *getbuf) | @@ -111,7 +111,7 @@ static int Uart_4G_RecvDeal_RealTimeMP2_start(char *getbuf) | ||
111 | **********/ | 111 | **********/ |
112 | static int Uart_4G_RecvDeal_RealTimeMP2_transmission(char *getdata, int len) | 112 | static int Uart_4G_RecvDeal_RealTimeMP2_transmission(char *getdata, int len) |
113 | { | 113 | { |
114 | - USER_LOG_INFO("MP2实时喊话传输中\n"); | 114 | + JZSDK_LOG_INFO("MP2实时喊话传输中\n"); |
115 | T_JZsdkReturnCode ret; | 115 | T_JZsdkReturnCode ret; |
116 | 116 | ||
117 | //传输数据接口 | 117 | //传输数据接口 |
@@ -126,7 +126,7 @@ static int Uart_4G_RecvDeal_RealTimeMP2_transmission(char *getdata, int len) | @@ -126,7 +126,7 @@ static int Uart_4G_RecvDeal_RealTimeMP2_transmission(char *getdata, int len) | ||
126 | **********/ | 126 | **********/ |
127 | static int Uart_4G_RecvDeal_RealTimeMP2_stop(char *getbuf) | 127 | static int Uart_4G_RecvDeal_RealTimeMP2_stop(char *getbuf) |
128 | { | 128 | { |
129 | - USER_LOG_INFO("关闭MP2实时喊话功能\n"); | 129 | + JZSDK_LOG_INFO("关闭MP2实时喊话功能\n"); |
130 | T_JZsdkReturnCode ret; | 130 | T_JZsdkReturnCode ret; |
131 | 131 | ||
132 | //获取帧的序列号 | 132 | //获取帧的序列号 |
@@ -157,7 +157,7 @@ static int Uart_4G_RecvDeal_RealTimeMP2_stop(char *getbuf) | @@ -157,7 +157,7 @@ static int Uart_4G_RecvDeal_RealTimeMP2_stop(char *getbuf) | ||
157 | **********/ | 157 | **********/ |
158 | static int Uart_4G_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | 158 | static int Uart_4G_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) |
159 | { | 159 | { |
160 | - USER_LOG_INFO("开始传输的音频文件保存\n"); | 160 | + JZSDK_LOG_INFO("开始传输的音频文件保存\n"); |
161 | //获取帧的序列号 | 161 | //获取帧的序列号 |
162 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 162 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
163 | 163 | ||
@@ -168,7 +168,7 @@ static int Uart_4G_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | @@ -168,7 +168,7 @@ static int Uart_4G_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | ||
168 | char FileName[1024]; | 168 | char FileName[1024]; |
169 | memset(FileName,0,1024); | 169 | memset(FileName,0,1024); |
170 | memcpy(FileName, &getbuf[9], FileNameLen); | 170 | memcpy(FileName, &getbuf[9], FileNameLen); |
171 | - USER_LOG_INFO("保存的文件名为%s",FileName); | 171 | + JZSDK_LOG_INFO("保存的文件名为%s",FileName); |
172 | 172 | ||
173 | T_JZsdkReturnCode ret = JZsdk_Uart_SaveAudioFileStart(FileName); | 173 | T_JZsdkReturnCode ret = JZsdk_Uart_SaveAudioFileStart(FileName); |
174 | if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 174 | if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
@@ -192,7 +192,7 @@ static int Uart_4G_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | @@ -192,7 +192,7 @@ static int Uart_4G_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | ||
192 | **********/ | 192 | **********/ |
193 | static int Uart_4G_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int len) | 193 | static int Uart_4G_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int len) |
194 | { | 194 | { |
195 | - USER_LOG_INFO("传输音频文件中\n"); | 195 | + JZSDK_LOG_INFO("传输音频文件中\n"); |
196 | JZsdk_Uart_SaveAudioFileTrans(getdata, len); | 196 | JZsdk_Uart_SaveAudioFileTrans(getdata, len); |
197 | } | 197 | } |
198 | /********* | 198 | /********* |
@@ -203,7 +203,7 @@ static int Uart_4G_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int l | @@ -203,7 +203,7 @@ static int Uart_4G_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int l | ||
203 | **********/ | 203 | **********/ |
204 | static int Uart_4G_RecvDeal_SaveAudioFileTrans_stop(char *getbuf) | 204 | static int Uart_4G_RecvDeal_SaveAudioFileTrans_stop(char *getbuf) |
205 | { | 205 | { |
206 | - USER_LOG_INFO("开始传输的音频文件保存\n"); | 206 | + JZSDK_LOG_INFO("开始传输的音频文件保存\n"); |
207 | //获取帧的序列号 | 207 | //获取帧的序列号 |
208 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 208 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
209 | 209 | ||
@@ -223,7 +223,7 @@ static int Uart_4G_RecvDeal_SaveAudioFileTrans_stop(char *getbuf) | @@ -223,7 +223,7 @@ static int Uart_4G_RecvDeal_SaveAudioFileTrans_stop(char *getbuf) | ||
223 | static int Uart_4G_RecvDeal_audio_PlayFile(char *getbuf) | 223 | static int Uart_4G_RecvDeal_audio_PlayFile(char *getbuf) |
224 | { | 224 | { |
225 | T_JZsdkReturnCode ret; | 225 | T_JZsdkReturnCode ret; |
226 | - USER_LOG_INFO("播放指定音频\n"); | 226 | + JZSDK_LOG_INFO("播放指定音频\n"); |
227 | //获取帧的序列号 | 227 | //获取帧的序列号 |
228 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 228 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
229 | 229 | ||
@@ -238,7 +238,7 @@ static int Uart_4G_RecvDeal_audio_PlayFile(char *getbuf) | @@ -238,7 +238,7 @@ static int Uart_4G_RecvDeal_audio_PlayFile(char *getbuf) | ||
238 | memset(music_name, 0, 256); | 238 | memset(music_name, 0, 256); |
239 | memcpy(music_name, &getbuf[9], datasize); | 239 | memcpy(music_name, &getbuf[9], datasize); |
240 | 240 | ||
241 | - USER_LOG_INFO("播放指定音频:%s\n",music_name); | 241 | + JZSDK_LOG_INFO("播放指定音频:%s\n",music_name); |
242 | 242 | ||
243 | ret = JZsdk_Uart_PlayMusic(UART_4G, music_name, datasize); | 243 | ret = JZsdk_Uart_PlayMusic(UART_4G, music_name, datasize); |
244 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 244 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
@@ -260,7 +260,7 @@ static int Uart_4G_RecvDeal_audio_PlayFile(char *getbuf) | @@ -260,7 +260,7 @@ static int Uart_4G_RecvDeal_audio_PlayFile(char *getbuf) | ||
260 | **********/ | 260 | **********/ |
261 | static int Uart_4G_RecvDeal_audio_PlayContinue(char *getbuf) | 261 | static int Uart_4G_RecvDeal_audio_PlayContinue(char *getbuf) |
262 | { | 262 | { |
263 | - USER_LOG_INFO("音频继续播放\n"); | 263 | + JZSDK_LOG_INFO("音频继续播放\n"); |
264 | //获取帧的序列号 | 264 | //获取帧的序列号 |
265 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 265 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
266 | 266 | ||
@@ -277,7 +277,7 @@ static int Uart_4G_RecvDeal_audio_PlayContinue(char *getbuf) | @@ -277,7 +277,7 @@ static int Uart_4G_RecvDeal_audio_PlayContinue(char *getbuf) | ||
277 | **********/ | 277 | **********/ |
278 | static int Uart_4G_RecvDeal_audio_PlayPause(char *getbuf) | 278 | static int Uart_4G_RecvDeal_audio_PlayPause(char *getbuf) |
279 | { | 279 | { |
280 | - USER_LOG_INFO("音频暂停播放\n"); | 280 | + JZSDK_LOG_INFO("音频暂停播放\n"); |
281 | //获取帧的序列号 | 281 | //获取帧的序列号 |
282 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 282 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
283 | 283 | ||
@@ -294,7 +294,7 @@ static int Uart_4G_RecvDeal_audio_PlayPause(char *getbuf) | @@ -294,7 +294,7 @@ static int Uart_4G_RecvDeal_audio_PlayPause(char *getbuf) | ||
294 | **********/ | 294 | **********/ |
295 | static int Uart_4G_RecvDeal_audio_PlayStop(char *getbuf) | 295 | static int Uart_4G_RecvDeal_audio_PlayStop(char *getbuf) |
296 | { | 296 | { |
297 | - USER_LOG_INFO("音频停止播放\n"); | 297 | + JZSDK_LOG_INFO("音频停止播放\n"); |
298 | //获取帧的序列号 | 298 | //获取帧的序列号 |
299 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 299 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
300 | 300 | ||
@@ -312,7 +312,7 @@ static int Uart_4G_RecvDeal_audio_PlayStop(char *getbuf) | @@ -312,7 +312,7 @@ static int Uart_4G_RecvDeal_audio_PlayStop(char *getbuf) | ||
312 | **********/ | 312 | **********/ |
313 | static int Uart_4G_RecvDeal_audio_LastSong(char *getbuf) | 313 | static int Uart_4G_RecvDeal_audio_LastSong(char *getbuf) |
314 | { | 314 | { |
315 | - USER_LOG_INFO("音频上一曲\n"); | 315 | + JZSDK_LOG_INFO("音频上一曲\n"); |
316 | //获取帧的序列号 | 316 | //获取帧的序列号 |
317 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 317 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
318 | 318 | ||
@@ -330,7 +330,7 @@ static int Uart_4G_RecvDeal_audio_LastSong(char *getbuf) | @@ -330,7 +330,7 @@ static int Uart_4G_RecvDeal_audio_LastSong(char *getbuf) | ||
330 | **********/ | 330 | **********/ |
331 | static int Uart_4G_RecvDeal_audio_NextSong(char *getbuf) | 331 | static int Uart_4G_RecvDeal_audio_NextSong(char *getbuf) |
332 | { | 332 | { |
333 | - USER_LOG_INFO("音频下一曲\n"); | 333 | + JZSDK_LOG_INFO("音频下一曲\n"); |
334 | //获取帧的序列号 | 334 | //获取帧的序列号 |
335 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 335 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
336 | 336 | ||
@@ -348,7 +348,7 @@ static int Uart_4G_RecvDeal_audio_NextSong(char *getbuf) | @@ -348,7 +348,7 @@ static int Uart_4G_RecvDeal_audio_NextSong(char *getbuf) | ||
348 | **********/ | 348 | **********/ |
349 | static int Uart_4G_RecvDeal_audio_GetMusicList(char *getbuf) | 349 | static int Uart_4G_RecvDeal_audio_GetMusicList(char *getbuf) |
350 | { | 350 | { |
351 | - USER_LOG_INFO("获取音乐列表\n"); | 351 | + JZSDK_LOG_INFO("获取音乐列表\n"); |
352 | //获取帧的序列号 | 352 | //获取帧的序列号 |
353 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 353 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
354 | 354 | ||
@@ -390,7 +390,7 @@ static int Uart_4G_RecvDeal_audio_GetMusicList(char *getbuf) | @@ -390,7 +390,7 @@ static int Uart_4G_RecvDeal_audio_GetMusicList(char *getbuf) | ||
390 | **********/ | 390 | **********/ |
391 | static int Uart_4G_RecvDeal_Amplifier_stop(char *getbuf) | 391 | static int Uart_4G_RecvDeal_Amplifier_stop(char *getbuf) |
392 | { | 392 | { |
393 | - USER_LOG_INFO("强制关闭功放\n"); | 393 | + JZSDK_LOG_INFO("强制关闭功放\n"); |
394 | //获取帧的序列号 | 394 | //获取帧的序列号 |
395 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 395 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
396 | 396 | ||
@@ -408,7 +408,7 @@ static int Uart_4G_RecvDeal_Amplifier_stop(char *getbuf) | @@ -408,7 +408,7 @@ static int Uart_4G_RecvDeal_Amplifier_stop(char *getbuf) | ||
408 | **********/ | 408 | **********/ |
409 | static int Uart_4G_RecvDeal_Amplifier_open(char *getbuf) | 409 | static int Uart_4G_RecvDeal_Amplifier_open(char *getbuf) |
410 | { | 410 | { |
411 | - USER_LOG_INFO("强制关闭功放\n"); | 411 | + JZSDK_LOG_INFO("强制关闭功放\n"); |
412 | //获取帧的序列号 | 412 | //获取帧的序列号 |
413 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 413 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
414 | 414 | ||
@@ -437,7 +437,7 @@ static int Uart_4G_RecvDeal_Amplifier_auto() | @@ -437,7 +437,7 @@ static int Uart_4G_RecvDeal_Amplifier_auto() | ||
437 | **********/ | 437 | **********/ |
438 | static int Uart_4G_RecvDeal_SetVolume(char *getbuf) | 438 | static int Uart_4G_RecvDeal_SetVolume(char *getbuf) |
439 | { | 439 | { |
440 | - USER_LOG_INFO("调节音量\n"); | 440 | + JZSDK_LOG_INFO("调节音量\n"); |
441 | //获取帧的序列号 | 441 | //获取帧的序列号 |
442 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 442 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
443 | 443 | ||
@@ -456,7 +456,7 @@ static int Uart_4G_RecvDeal_SetVolume(char *getbuf) | @@ -456,7 +456,7 @@ static int Uart_4G_RecvDeal_SetVolume(char *getbuf) | ||
456 | **********/ | 456 | **********/ |
457 | static int Uart_4G_RecvDeal_CheckStatus_volume(char *getbuf) | 457 | static int Uart_4G_RecvDeal_CheckStatus_volume(char *getbuf) |
458 | { | 458 | { |
459 | - USER_LOG_INFO("查询音量\n"); | 459 | + JZSDK_LOG_INFO("查询音量\n"); |
460 | //获取帧的序列号 | 460 | //获取帧的序列号 |
461 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 461 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
462 | 462 | ||
@@ -479,7 +479,7 @@ static int Uart_4G_RecvDeal_CheckStatus_volume(char *getbuf) | @@ -479,7 +479,7 @@ static int Uart_4G_RecvDeal_CheckStatus_volume(char *getbuf) | ||
479 | static int Uart_4G_RecvDeal_CheckStatus_play(char *getbuf) | 479 | static int Uart_4G_RecvDeal_CheckStatus_play(char *getbuf) |
480 | { | 480 | { |
481 | //查询播放状态 | 481 | //查询播放状态 |
482 | - USER_LOG_INFO("查询播放状态\n"); | 482 | + JZSDK_LOG_INFO("查询播放状态\n"); |
483 | //获取帧的序列号 | 483 | //获取帧的序列号 |
484 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 484 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
485 | 485 | ||
@@ -504,7 +504,7 @@ static int Uart_4G_RecvDeal_CheckStatus_play(char *getbuf) | @@ -504,7 +504,7 @@ static int Uart_4G_RecvDeal_CheckStatus_play(char *getbuf) | ||
504 | static int Uart_4G_RecvDeal_CheckStatus_gimbal(char *getbuf) | 504 | static int Uart_4G_RecvDeal_CheckStatus_gimbal(char *getbuf) |
505 | { | 505 | { |
506 | //查询云台角度 | 506 | //查询云台角度 |
507 | - USER_LOG_INFO("查询云台角度\n"); | 507 | + JZSDK_LOG_INFO("查询云台角度\n"); |
508 | //获取帧的序列号 | 508 | //获取帧的序列号 |
509 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 509 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
510 | 510 | ||
@@ -514,9 +514,6 @@ static int Uart_4G_RecvDeal_CheckStatus_gimbal(char *getbuf) | @@ -514,9 +514,6 @@ static int Uart_4G_RecvDeal_CheckStatus_gimbal(char *getbuf) | ||
514 | 514 | ||
515 | JZsdk_Uart_CheckStatus_gimbal(&PitchAngle, &YawAngle); | 515 | JZsdk_Uart_CheckStatus_gimbal(&PitchAngle, &YawAngle); |
516 | 516 | ||
517 | - //回复操作成功 | ||
518 | - //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence); | ||
519 | - | ||
520 | //2、发送本地云台值 | 517 | //2、发送本地云台值 |
521 | JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(UART_4G, PitchAngle); | 518 | JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(UART_4G, PitchAngle); |
522 | } | 519 | } |
@@ -543,7 +540,7 @@ static int Uart_4G_RecvDeal_CheckStatus_GimbalFineTuning(char *getbuf) | @@ -543,7 +540,7 @@ static int Uart_4G_RecvDeal_CheckStatus_GimbalFineTuning(char *getbuf) | ||
543 | static int Uart_4G_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | 540 | static int Uart_4G_RecvDeal_CheckStatus_PLayFileName(char *getbuf) |
544 | { | 541 | { |
545 | //查询播放文件名 | 542 | //查询播放文件名 |
546 | - USER_LOG_INFO("查询播放文件名\n"); | 543 | + JZSDK_LOG_INFO("查询播放文件名\n"); |
547 | //获取帧的序列号 | 544 | //获取帧的序列号 |
548 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 545 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
549 | 546 | ||
@@ -552,7 +549,7 @@ static int Uart_4G_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | @@ -552,7 +549,7 @@ static int Uart_4G_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | ||
552 | int MusicName_Len; | 549 | int MusicName_Len; |
553 | JZsdk_Uart_CheckStatus_PlayFileName(MusicName, &MusicName_Len); | 550 | JZsdk_Uart_CheckStatus_PlayFileName(MusicName, &MusicName_Len); |
554 | 551 | ||
555 | - USER_LOG_INFO("当前播放的是%s %d\n",MusicName, MusicName_Len); | 552 | + JZSDK_LOG_INFO("当前播放的是%s %d\n",MusicName, MusicName_Len); |
556 | 553 | ||
557 | //回复操作成功 | 554 | //回复操作成功 |
558 | //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence); | 555 | //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence); |
@@ -569,7 +566,7 @@ static int Uart_4G_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | @@ -569,7 +566,7 @@ static int Uart_4G_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | ||
569 | static int Uart_4G_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | 566 | static int Uart_4G_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) |
570 | { | 567 | { |
571 | //查询软件版本号 | 568 | //查询软件版本号 |
572 | - USER_LOG_INFO("查询软件版本号\n"); | 569 | + JZSDK_LOG_INFO("查询软件版本号\n"); |
573 | //获取帧的序列号 | 570 | //获取帧的序列号 |
574 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 571 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
575 | 572 | ||
@@ -580,7 +577,7 @@ static int Uart_4G_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | @@ -580,7 +577,7 @@ static int Uart_4G_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | ||
580 | 577 | ||
581 | //1、获取版本号 | 578 | //1、获取版本号 |
582 | JZsdk_Uart_CheckStatus_SoftwareVersion(&majorVersion, &minorVersion, &modifyVersion, &debugVersion); | 579 | JZsdk_Uart_CheckStatus_SoftwareVersion(&majorVersion, &minorVersion, &modifyVersion, &debugVersion); |
583 | - USER_LOG_INFO("当前的软件版本号为:%2x, %2x, %2x, %2x",majorVersion, minorVersion, modifyVersion, debugVersion); | 580 | + JZSDK_LOG_INFO("当前的软件版本号为:%2x, %2x, %2x, %2x",majorVersion, minorVersion, modifyVersion, debugVersion); |
584 | 581 | ||
585 | //回复操作成功 | 582 | //回复操作成功 |
586 | //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence); | 583 | //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence); |
@@ -597,7 +594,7 @@ static int Uart_4G_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | @@ -597,7 +594,7 @@ static int Uart_4G_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | ||
597 | static int Uart_4G_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | 594 | static int Uart_4G_RecvDeal_CheckStatus_LoopPlay(char *getbuf) |
598 | { | 595 | { |
599 | //查询是否打开循环 | 596 | //查询是否打开循环 |
600 | - USER_LOG_INFO("查询是否打开循环\n"); | 597 | + JZSDK_LOG_INFO("查询是否打开循环\n"); |
601 | //获取帧的序列号 | 598 | //获取帧的序列号 |
602 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 599 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
603 | 600 | ||
@@ -605,7 +602,7 @@ static int Uart_4G_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | @@ -605,7 +602,7 @@ static int Uart_4G_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | ||
605 | int LoopStatus = JZsdk_Uart_CheckStatus_LoopPlay(); | 602 | int LoopStatus = JZsdk_Uart_CheckStatus_LoopPlay(); |
606 | if (LoopStatus < 0) | 603 | if (LoopStatus < 0) |
607 | { | 604 | { |
608 | - USER_LOG_INFO("循环状态获取失败"); | 605 | + JZSDK_LOG_INFO("循环状态获取失败"); |
609 | return -1; | 606 | return -1; |
610 | } | 607 | } |
611 | 608 | ||
@@ -624,7 +621,7 @@ static int Uart_4G_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | @@ -624,7 +621,7 @@ static int Uart_4G_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | ||
624 | static int Uart_4G_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | 621 | static int Uart_4G_RecvDeal_CheckStatus_TTS_tone(char *getbuf) |
625 | { | 622 | { |
626 | //查询音色 | 623 | //查询音色 |
627 | - USER_LOG_INFO("查询音色\n"); | 624 | + JZSDK_LOG_INFO("查询音色\n"); |
628 | //获取帧的序列号 | 625 | //获取帧的序列号 |
629 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 626 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
630 | 627 | ||
@@ -632,7 +629,7 @@ static int Uart_4G_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | @@ -632,7 +629,7 @@ static int Uart_4G_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | ||
632 | int TTS_tone = JZsdk_Uart_CheckStatus_TTS_tone(); | 629 | int TTS_tone = JZsdk_Uart_CheckStatus_TTS_tone(); |
633 | if (TTS_tone < 0) | 630 | if (TTS_tone < 0) |
634 | { | 631 | { |
635 | - USER_LOG_INFO("音色获取失败"); | 632 | + JZSDK_LOG_INFO("音色获取失败"); |
636 | return -1; | 633 | return -1; |
637 | } | 634 | } |
638 | 635 | ||
@@ -652,7 +649,7 @@ static int Uart_4G_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | @@ -652,7 +649,7 @@ static int Uart_4G_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | ||
652 | static int Uart_4G_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | 649 | static int Uart_4G_RecvDeal_CheckStatus_TTS_speed(char *getbuf) |
653 | { | 650 | { |
654 | //查询语速 | 651 | //查询语速 |
655 | - USER_LOG_INFO("查询语速\n"); | 652 | + JZSDK_LOG_INFO("查询语速\n"); |
656 | //获取帧的序列号 | 653 | //获取帧的序列号 |
657 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 654 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
658 | 655 | ||
@@ -660,7 +657,7 @@ static int Uart_4G_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | @@ -660,7 +657,7 @@ static int Uart_4G_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | ||
660 | int TTS_speed = JZsdk_Uart_CheckStatus_TTS_speed(); | 657 | int TTS_speed = JZsdk_Uart_CheckStatus_TTS_speed(); |
661 | if (TTS_speed < 0) | 658 | if (TTS_speed < 0) |
662 | { | 659 | { |
663 | - USER_LOG_INFO("语速获取失败"); | 660 | + JZSDK_LOG_INFO("语速获取失败"); |
664 | return -1; | 661 | return -1; |
665 | } | 662 | } |
666 | 663 | ||
@@ -681,7 +678,7 @@ static int Uart_4G_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | @@ -681,7 +678,7 @@ static int Uart_4G_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | ||
681 | **********/ | 678 | **********/ |
682 | static int Uart_4G_RecvDeal_PlayLoop(char *getbuf) | 679 | static int Uart_4G_RecvDeal_PlayLoop(char *getbuf) |
683 | { | 680 | { |
684 | - USER_LOG_INFO("开启关闭循环\n"); | 681 | + JZSDK_LOG_INFO("开启关闭循环\n"); |
685 | //获取帧的序列号 | 682 | //获取帧的序列号 |
686 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 683 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
687 | 684 | ||
@@ -711,7 +708,7 @@ static int Uart_4G_RecvDeal_PlayLoop(char *getbuf) | @@ -711,7 +708,7 @@ static int Uart_4G_RecvDeal_PlayLoop(char *getbuf) | ||
711 | **********/ | 708 | **********/ |
712 | static int Uart_4G_RecvDeal_Delete_Audio(char *getbuf) | 709 | static int Uart_4G_RecvDeal_Delete_Audio(char *getbuf) |
713 | { | 710 | { |
714 | - USER_LOG_INFO("删除音频操作\n"); | 711 | + JZSDK_LOG_INFO("删除音频操作\n"); |
715 | //获取帧的序列号 | 712 | //获取帧的序列号 |
716 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 713 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
717 | 714 | ||
@@ -744,7 +741,7 @@ static int Uart_4G_RecvDeal_Delete_Audio(char *getbuf) | @@ -744,7 +741,7 @@ static int Uart_4G_RecvDeal_Delete_Audio(char *getbuf) | ||
744 | **********/ | 741 | **********/ |
745 | static int Uart_4G_RecvDeal_Delete_VoiceRecord(char *getbuf) | 742 | static int Uart_4G_RecvDeal_Delete_VoiceRecord(char *getbuf) |
746 | { | 743 | { |
747 | - USER_LOG_INFO("删除录音操作\n"); | 744 | + JZSDK_LOG_INFO("删除录音操作\n"); |
748 | //获取帧的序列号 | 745 | //获取帧的序列号 |
749 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 746 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
750 | 747 | ||
@@ -786,7 +783,7 @@ static int Uart_4G_RecvDeal_Delete_VideoRecord() | @@ -786,7 +783,7 @@ static int Uart_4G_RecvDeal_Delete_VideoRecord() | ||
786 | **********/ | 783 | **********/ |
787 | static int Uart_4G_RecvDeal_TTS_SetTone(char *getbuf) | 784 | static int Uart_4G_RecvDeal_TTS_SetTone(char *getbuf) |
788 | { | 785 | { |
789 | - USER_LOG_INFO("tts设置音色\n"); | 786 | + JZSDK_LOG_INFO("tts设置音色\n"); |
790 | //获取帧的序列号 | 787 | //获取帧的序列号 |
791 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 788 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
792 | 789 | ||
@@ -814,16 +811,16 @@ static int Uart_4G_RecvDeal_TTS_SetTone(char *getbuf) | @@ -814,16 +811,16 @@ static int Uart_4G_RecvDeal_TTS_SetTone(char *getbuf) | ||
814 | **********/ | 811 | **********/ |
815 | static int Uart_4G_RecvDeal_TTS_SetSpeed(char *getbuf) | 812 | static int Uart_4G_RecvDeal_TTS_SetSpeed(char *getbuf) |
816 | { | 813 | { |
817 | - USER_LOG_INFO("设置语速\n"); | 814 | + JZSDK_LOG_INFO("设置语速\n"); |
818 | //获取帧的序列号 | 815 | //获取帧的序列号 |
819 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 816 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
820 | 817 | ||
821 | //1、从帧数据从获取语速 | 818 | //1、从帧数据从获取语速 |
822 | int speed = (int)getbuf[9]; | 819 | int speed = (int)getbuf[9]; |
823 | - USER_LOG_INFO("获取的语速为:%d",speed); | 820 | + JZSDK_LOG_INFO("获取的语速为:%d",speed); |
824 | if (speed > 100 || speed < 0) | 821 | if (speed > 100 || speed < 0) |
825 | { | 822 | { |
826 | - USER_LOG_INFO("语速超出范围\n"); | 823 | + JZSDK_LOG_INFO("语速超出范围\n"); |
827 | 824 | ||
828 | //回复操作失败 | 825 | //回复操作失败 |
829 | JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence); | 826 | JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence); |
@@ -854,12 +851,12 @@ static int Uart_4G_RecvDeal_TTS_SetSpeed(char *getbuf) | @@ -854,12 +851,12 @@ static int Uart_4G_RecvDeal_TTS_SetSpeed(char *getbuf) | ||
854 | // 0x5A 0x5A 0x77 0x00 0x0c 0x00 0x00 0x57 0x04 0x00 0x00 0x23 结束TTS发送 | 851 | // 0x5A 0x5A 0x77 0x00 0x0c 0x00 0x00 0x57 0x04 0x00 0x00 0x23 结束TTS发送 |
855 | static int Uart_4G_RecvDeal_TTS_Trans_start(char *getbuf) | 852 | static int Uart_4G_RecvDeal_TTS_Trans_start(char *getbuf) |
856 | { | 853 | { |
857 | - USER_LOG_INFO("tts开始传输"); | 854 | + JZSDK_LOG_INFO("tts开始传输"); |
858 | //获取帧的序列号 | 855 | //获取帧的序列号 |
859 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 856 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
860 | 857 | ||
861 | //1、重置缓冲区 | 858 | //1、重置缓冲区 |
862 | - memset(TTS_Recv_buffer, '\0', 1009); | 859 | + memset(TTS_Recv_buffer, 0, 1009); |
863 | 860 | ||
864 | //2、重置缓冲区长度 | 861 | //2、重置缓冲区长度 |
865 | TTS_Recv_buffer_length = 0; | 862 | TTS_Recv_buffer_length = 0; |
@@ -878,7 +875,7 @@ static int Uart_4G_RecvDeal_TTS_Trans_start(char *getbuf) | @@ -878,7 +875,7 @@ static int Uart_4G_RecvDeal_TTS_Trans_start(char *getbuf) | ||
878 | **********/ | 875 | **********/ |
879 | static int Uart_4G_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | 876 | static int Uart_4G_RecvDeal_TTS_Trans_transmission(char *getdata, int len) |
880 | { | 877 | { |
881 | - USER_LOG_INFO("tts传输中"); | 878 | + JZSDK_LOG_INFO("tts传输中"); |
882 | 879 | ||
883 | if (TTS_Recv_buffer_length+len < 1000) | 880 | if (TTS_Recv_buffer_length+len < 1000) |
884 | { | 881 | { |
@@ -890,9 +887,10 @@ static int Uart_4G_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | @@ -890,9 +887,10 @@ static int Uart_4G_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | ||
890 | } | 887 | } |
891 | else | 888 | else |
892 | { | 889 | { |
893 | - USER_LOG_ERROR("TTS字数超出1000字"); | 890 | + JZSDK_LOG_ERROR("TTS字数超出1000字节"); |
894 | } | 891 | } |
895 | } | 892 | } |
893 | + | ||
896 | /********* | 894 | /********* |
897 | * | 895 | * |
898 | * tts传输结束 | 896 | * tts传输结束 |
@@ -901,12 +899,13 @@ static int Uart_4G_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | @@ -901,12 +899,13 @@ static int Uart_4G_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | ||
901 | **********/ | 899 | **********/ |
902 | static int Uart_4G_RecvDeal_TTS_Trans_stop(char *getbuf) | 900 | static int Uart_4G_RecvDeal_TTS_Trans_stop(char *getbuf) |
903 | { | 901 | { |
904 | - USER_LOG_INFO("tts传输结束"); | 902 | + JZSDK_LOG_INFO("tts传输结束"); |
905 | //获取帧的序列号 | 903 | //获取帧的序列号 |
906 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 904 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
907 | 905 | ||
906 | + | ||
908 | //1、打印一次TTS文本 | 907 | //1、打印一次TTS文本 |
909 | - USER_LOG_INFO("TTS播放%s",TTS_Recv_buffer); | 908 | + JZSDK_LOG_INFO("TTS播放%s",TTS_Recv_buffer); |
910 | 909 | ||
911 | //2、播放TTS | 910 | //2、播放TTS |
912 | JZsdk_Uart_TTS_Play(UART_4G, TTS_Recv_buffer, TTS_Recv_buffer_length); | 911 | JZsdk_Uart_TTS_Play(UART_4G, TTS_Recv_buffer, TTS_Recv_buffer_length); |
@@ -924,7 +923,7 @@ static int Uart_4G_RecvDeal_TTS_Trans_stop(char *getbuf) | @@ -924,7 +923,7 @@ static int Uart_4G_RecvDeal_TTS_Trans_stop(char *getbuf) | ||
924 | **********/ | 923 | **********/ |
925 | static int Uart_4G_RecvDeal_OpusTrans_start(char *getbuf) | 924 | static int Uart_4G_RecvDeal_OpusTrans_start(char *getbuf) |
926 | { | 925 | { |
927 | - USER_LOG_INFO("打开opus传输\n"); | 926 | + JZSDK_LOG_INFO("打开opus传输\n"); |
928 | //获取帧的序列号 | 927 | //获取帧的序列号 |
929 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 928 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
930 | 929 | ||
@@ -941,7 +940,7 @@ static int Uart_4G_RecvDeal_OpusTrans_start(char *getbuf) | @@ -941,7 +940,7 @@ static int Uart_4G_RecvDeal_OpusTrans_start(char *getbuf) | ||
941 | //3、修改接收模式为传输opus | 940 | //3、修改接收模式为传输opus |
942 | JZsdk_Uart_RecvDeal_Set_UART_4G_Receive_mode(JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION); | 941 | JZsdk_Uart_RecvDeal_Set_UART_4G_Receive_mode(JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION); |
943 | 942 | ||
944 | - USER_LOG_INFO("已完成打开opus传输处理\n"); | 943 | + JZSDK_LOG_INFO("已完成打开opus传输处理\n"); |
945 | 944 | ||
946 | //回复操作成功 | 945 | //回复操作成功 |
947 | JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence); | 946 | JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence); |
@@ -956,7 +955,7 @@ static int Uart_4G_RecvDeal_OpusTrans_transmission(char *SaveData, int size) | @@ -956,7 +955,7 @@ static int Uart_4G_RecvDeal_OpusTrans_transmission(char *SaveData, int size) | ||
956 | { | 955 | { |
957 | JZsdk_Uart_SaveOpusTrans(SaveData,size); | 956 | JZsdk_Uart_SaveOpusTrans(SaveData,size); |
958 | 957 | ||
959 | - USER_LOG_INFO("已完成opus传输保存处理\n"); | 958 | + JZSDK_LOG_INFO("已完成opus传输保存处理\n"); |
960 | } | 959 | } |
961 | /********* | 960 | /********* |
962 | * | 961 | * |
@@ -966,13 +965,13 @@ static int Uart_4G_RecvDeal_OpusTrans_transmission(char *SaveData, int size) | @@ -966,13 +965,13 @@ static int Uart_4G_RecvDeal_OpusTrans_transmission(char *SaveData, int size) | ||
966 | **********/ | 965 | **********/ |
967 | static int Uart_4G_RecvDeal_OpusTrans_stop(char *getbuf) | 966 | static int Uart_4G_RecvDeal_OpusTrans_stop(char *getbuf) |
968 | { | 967 | { |
969 | - USER_LOG_INFO("结束opus传输\n"); | 968 | + JZSDK_LOG_INFO("结束opus传输\n"); |
970 | //获取帧的序列号 | 969 | //获取帧的序列号 |
971 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 970 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
972 | 971 | ||
973 | JZsdk_Uart_SaveOpusStop(); | 972 | JZsdk_Uart_SaveOpusStop(); |
974 | 973 | ||
975 | - USER_LOG_INFO("结束opus传输处理\n"); | 974 | + JZSDK_LOG_INFO("结束opus传输处理\n"); |
976 | 975 | ||
977 | //回复操作成功 | 976 | //回复操作成功 |
978 | JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence); | 977 | JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence); |
@@ -985,7 +984,7 @@ static int Uart_4G_RecvDeal_OpusTrans_stop(char *getbuf) | @@ -985,7 +984,7 @@ static int Uart_4G_RecvDeal_OpusTrans_stop(char *getbuf) | ||
985 | **********/ | 984 | **********/ |
986 | static int Uart_4G_RecvDeal_OpusPlay(char *getbuf) | 985 | static int Uart_4G_RecvDeal_OpusPlay(char *getbuf) |
987 | { | 986 | { |
988 | - USER_LOG_INFO("opus播放\n"); | 987 | + JZSDK_LOG_INFO("opus播放\n"); |
989 | //获取帧的序列号 | 988 | //获取帧的序列号 |
990 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 989 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
991 | 990 | ||
@@ -1005,7 +1004,7 @@ static int Uart_4G_RecvDeal_OpusPlay(char *getbuf) | @@ -1005,7 +1004,7 @@ static int Uart_4G_RecvDeal_OpusPlay(char *getbuf) | ||
1005 | **********/ | 1004 | **********/ |
1006 | static int Uart_4G_RecvDeal_Opus_RealTimeVoice_start(char *getbuf) | 1005 | static int Uart_4G_RecvDeal_Opus_RealTimeVoice_start(char *getbuf) |
1007 | { | 1006 | { |
1008 | - USER_LOG_INFO("开启opus实时喊话功能\n"); | 1007 | + JZSDK_LOG_INFO("开启opus实时喊话功能\n"); |
1009 | //获取帧的序列号 | 1008 | //获取帧的序列号 |
1010 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1009 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1011 | 1010 | ||
@@ -1040,7 +1039,7 @@ static int Uart_4G_RecvDeal_Opus_RealTimeVoice_start(char *getbuf) | @@ -1040,7 +1039,7 @@ static int Uart_4G_RecvDeal_Opus_RealTimeVoice_start(char *getbuf) | ||
1040 | **********/ | 1039 | **********/ |
1041 | static int Uart_4G_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int len) | 1040 | static int Uart_4G_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int len) |
1042 | { | 1041 | { |
1043 | - USER_LOG_INFO("opus语音传输中\n"); | 1042 | + JZSDK_LOG_INFO("opus语音传输中\n"); |
1044 | JZsdk_Uart_RealTimeVoiceTrans(getdata, len); | 1043 | JZsdk_Uart_RealTimeVoiceTrans(getdata, len); |
1045 | 1044 | ||
1046 | } | 1045 | } |
@@ -1052,7 +1051,7 @@ static int Uart_4G_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int l | @@ -1052,7 +1051,7 @@ static int Uart_4G_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int l | ||
1052 | **********/ | 1051 | **********/ |
1053 | static int Uart_4G_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf) | 1052 | static int Uart_4G_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf) |
1054 | { | 1053 | { |
1055 | - USER_LOG_INFO("关闭opus实时喊话功能\n"); | 1054 | + JZSDK_LOG_INFO("关闭opus实时喊话功能\n"); |
1056 | //获取帧的序列号 | 1055 | //获取帧的序列号 |
1057 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1056 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1058 | 1057 | ||
@@ -1082,7 +1081,7 @@ static int Uart_4G_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf) | @@ -1082,7 +1081,7 @@ static int Uart_4G_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf) | ||
1082 | **********/ | 1081 | **********/ |
1083 | static int Uart_4G_RecvDeal_Gimbal_PitchControl(char *getbuf) | 1082 | static int Uart_4G_RecvDeal_Gimbal_PitchControl(char *getbuf) |
1084 | { | 1083 | { |
1085 | - USER_LOG_INFO("云台俯仰控制\n"); | 1084 | + JZSDK_LOG_INFO("云台俯仰控制\n"); |
1086 | //获取帧的序列号 | 1085 | //获取帧的序列号 |
1087 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1086 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1088 | 1087 | ||
@@ -1103,13 +1102,13 @@ static int Uart_4G_RecvDeal_Gimbal_PitchControl(char *getbuf) | @@ -1103,13 +1102,13 @@ static int Uart_4G_RecvDeal_Gimbal_PitchControl(char *getbuf) | ||
1103 | } | 1102 | } |
1104 | else | 1103 | else |
1105 | { | 1104 | { |
1106 | - USER_LOG_INFO("云台输入角度符号错误,无法正常控制"); | 1105 | + JZSDK_LOG_INFO("云台输入角度符号错误,无法正常控制"); |
1107 | //回复操作失败 | 1106 | //回复操作失败 |
1108 | JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence); | 1107 | JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence); |
1109 | return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; | 1108 | return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; |
1110 | } | 1109 | } |
1111 | 1110 | ||
1112 | - USER_LOG_INFO("处理得到的角度是%d",Gimbal_angle); | 1111 | + JZSDK_LOG_INFO("处理得到的角度是%d",Gimbal_angle); |
1113 | 1112 | ||
1114 | T_JZsdkReturnCode ret = JZsdk_Uart_Gimbal_PitchControl(UART_4G, Gimbal_angle); | 1113 | T_JZsdkReturnCode ret = JZsdk_Uart_Gimbal_PitchControl(UART_4G, Gimbal_angle); |
1115 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 1114 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
@@ -1132,7 +1131,7 @@ static int Uart_4G_RecvDeal_Gimbal_PitchControl(char *getbuf) | @@ -1132,7 +1131,7 @@ static int Uart_4G_RecvDeal_Gimbal_PitchControl(char *getbuf) | ||
1132 | **********/ | 1131 | **********/ |
1133 | static int Uart_4G_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | 1132 | static int Uart_4G_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) |
1134 | { | 1133 | { |
1135 | - USER_LOG_INFO("云台俯仰微调角度\n"); | 1134 | + JZSDK_LOG_INFO("云台俯仰微调角度\n"); |
1136 | //获取帧的序列号 | 1135 | //获取帧的序列号 |
1137 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1136 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1138 | 1137 | ||
@@ -1140,7 +1139,7 @@ static int Uart_4G_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | @@ -1140,7 +1139,7 @@ static int Uart_4G_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | ||
1140 | int Gimbal_signal = getbuf[9]; | 1139 | int Gimbal_signal = getbuf[9]; |
1141 | 1140 | ||
1142 | //2、通过云台控制帧 获取云台角度绝对值 | 1141 | //2、通过云台控制帧 获取云台角度绝对值 |
1143 | - int Gimbal_angle = ((int)getbuf[10]) ; | 1142 | + int Gimbal_angle = (((int)getbuf[10]) << 8 ) + getbuf[11]; |
1144 | 1143 | ||
1145 | //3、拼接得到云台值 | 1144 | //3、拼接得到云台值 |
1146 | if (Gimbal_signal == 0x00) | 1145 | if (Gimbal_signal == 0x00) |
@@ -1153,13 +1152,13 @@ static int Uart_4G_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | @@ -1153,13 +1152,13 @@ static int Uart_4G_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | ||
1153 | } | 1152 | } |
1154 | else | 1153 | else |
1155 | { | 1154 | { |
1156 | - USER_LOG_INFO("云台俯仰微调角度符号错误,无法正常控制"); | 1155 | + JZSDK_LOG_INFO("云台俯仰微调角度符号错误,无法正常控制"); |
1157 | //回复操作失败 | 1156 | //回复操作失败 |
1158 | JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence); | 1157 | JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, FrameSequence); |
1159 | return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; | 1158 | return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; |
1160 | } | 1159 | } |
1161 | 1160 | ||
1162 | - USER_LOG_INFO("处理得到云台俯仰微调角度是%d",Gimbal_angle); | 1161 | + JZSDK_LOG_INFO("处理得到云台俯仰微调角度是%d",Gimbal_angle); |
1163 | 1162 | ||
1164 | JZsdk_Uart_Gimbal_PitchFineTuningControl(UART_4G, FrameSequence ,Gimbal_angle); | 1163 | JZsdk_Uart_Gimbal_PitchFineTuningControl(UART_4G, FrameSequence ,Gimbal_angle); |
1165 | 1164 | ||
@@ -1180,7 +1179,7 @@ static int Uart_4G_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | @@ -1180,7 +1179,7 @@ static int Uart_4G_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | ||
1180 | **********/ | 1179 | **********/ |
1181 | static int Uart_4G_RecvDeal_SearchLight_SetFrequency(char *getbuf) | 1180 | static int Uart_4G_RecvDeal_SearchLight_SetFrequency(char *getbuf) |
1182 | { | 1181 | { |
1183 | - USER_LOG_INFO("设置爆闪频率\n"); | 1182 | + JZSDK_LOG_INFO("设置爆闪频率\n"); |
1184 | //获取帧的序列号 | 1183 | //获取帧的序列号 |
1185 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1184 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1186 | 1185 | ||
@@ -1207,7 +1206,7 @@ static int Uart_4G_RecvDeal_SearchLight_SetFrequency(char *getbuf) | @@ -1207,7 +1206,7 @@ static int Uart_4G_RecvDeal_SearchLight_SetFrequency(char *getbuf) | ||
1207 | **********/ | 1206 | **********/ |
1208 | static int Uart_4G_RecvDeal_SearchLight_Control(char *getbuf) | 1207 | static int Uart_4G_RecvDeal_SearchLight_Control(char *getbuf) |
1209 | { | 1208 | { |
1210 | - USER_LOG_INFO("设置灯光控制\n"); | 1209 | + JZSDK_LOG_INFO("设置灯光控制\n"); |
1211 | //获取帧的序列号 | 1210 | //获取帧的序列号 |
1212 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1211 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1213 | 1212 | ||
@@ -1234,7 +1233,7 @@ static int Uart_4G_RecvDeal_SearchLight_Control(char *getbuf) | @@ -1234,7 +1233,7 @@ static int Uart_4G_RecvDeal_SearchLight_Control(char *getbuf) | ||
1234 | **********/ | 1233 | **********/ |
1235 | static int Uart_4G_RecvDeal_SearchLight_Lumen(char *getbuf) | 1234 | static int Uart_4G_RecvDeal_SearchLight_Lumen(char *getbuf) |
1236 | { | 1235 | { |
1237 | - USER_LOG_INFO("设置灯光亮度\n"); | 1236 | + JZSDK_LOG_INFO("设置灯光亮度\n"); |
1238 | //获取帧的序列号 | 1237 | //获取帧的序列号 |
1239 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1238 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1240 | 1239 | ||
@@ -1262,7 +1261,7 @@ static int Uart_4G_RecvDeal_SearchLight_Lumen(char *getbuf) | @@ -1262,7 +1261,7 @@ static int Uart_4G_RecvDeal_SearchLight_Lumen(char *getbuf) | ||
1262 | **********/ | 1261 | **********/ |
1263 | static int Uart_4G_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf) | 1262 | static int Uart_4G_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf) |
1264 | { | 1263 | { |
1265 | - USER_LOG_INFO("灯光属性查询\n"); | 1264 | + JZSDK_LOG_INFO("灯光属性查询\n"); |
1266 | //1、获取帧的序列号 | 1265 | //1、获取帧的序列号 |
1267 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1266 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1268 | 1267 | ||
@@ -1278,7 +1277,7 @@ static int Uart_4G_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf) | @@ -1278,7 +1277,7 @@ static int Uart_4G_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf) | ||
1278 | **********/ | 1277 | **********/ |
1279 | static int Uart_4G_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf) | 1278 | static int Uart_4G_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf) |
1280 | { | 1279 | { |
1281 | - USER_LOG_INFO("探照灯温度查询\n"); | 1280 | + JZSDK_LOG_INFO("探照灯温度查询\n"); |
1282 | //1、获取帧的序列号 | 1281 | //1、获取帧的序列号 |
1283 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1282 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1284 | 1283 | ||
@@ -1293,7 +1292,7 @@ static int Uart_4G_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf) | @@ -1293,7 +1292,7 @@ static int Uart_4G_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf) | ||
1293 | **********/ | 1292 | **********/ |
1294 | static int Uart_4G_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | 1293 | static int Uart_4G_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) |
1295 | { | 1294 | { |
1296 | - USER_LOG_INFO("消息订阅控制\n"); | 1295 | + JZSDK_LOG_INFO("消息订阅控制\n"); |
1297 | //获取帧的序列号 | 1296 | //获取帧的序列号 |
1298 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1297 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1299 | 1298 | ||
@@ -1313,6 +1312,55 @@ static int Uart_4G_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | @@ -1313,6 +1312,55 @@ static int Uart_4G_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | ||
1313 | } | 1312 | } |
1314 | } | 1313 | } |
1315 | 1314 | ||
1315 | +/********* | ||
1316 | + * | ||
1317 | + * 查询产品序列号 | ||
1318 | + * | ||
1319 | +**********/ | ||
1320 | +static int Uart_4G_RecvDeal_CheckStatus_SerialNumber(char *getbuf) | ||
1321 | +{ | ||
1322 | + JZSDK_LOG_INFO("消息订阅控制\n"); | ||
1323 | + //获取帧的序列号 | ||
1324 | + int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | ||
1325 | + | ||
1326 | + JZsdk_Uart_CheckStatus_SerialNumber(UART_4G, FrameSequence); | ||
1327 | + | ||
1328 | +} | ||
1329 | + | ||
1330 | +/********* | ||
1331 | + * | ||
1332 | + * 对外供电开关 | ||
1333 | + * | ||
1334 | +**********/ | ||
1335 | +static int Uart_4G_RecvDeal_OutPutPower_Control(char *getbuf) | ||
1336 | +{ | ||
1337 | + printf("对外电源控制\n"); | ||
1338 | + //获取帧的序列号 | ||
1339 | + int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | ||
1340 | + | ||
1341 | + //获取控制值 | ||
1342 | + int Value = getbuf[9]; | ||
1343 | + | ||
1344 | + //控制 | ||
1345 | + JZsdk_Uart_OutPutPower_Control(UART_4G, FrameSequence, Value); | ||
1346 | +} | ||
1347 | + | ||
1348 | +/********* | ||
1349 | + * | ||
1350 | + * 对外电源查询 | ||
1351 | + * | ||
1352 | +**********/ | ||
1353 | +static int Uart_4G_RecvDeal_Checkstatus_OutPutPower(char *getbuf) | ||
1354 | +{ | ||
1355 | + printf("对外电源查询\n"); | ||
1356 | + | ||
1357 | + //获取帧的序列号 | ||
1358 | + int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | ||
1359 | + | ||
1360 | + //获取本地数值 | ||
1361 | + JZsdk_Uart_Checkstatus_OutPutPower(UART_4G, FrameSequence); | ||
1362 | +} | ||
1363 | + | ||
1316 | /******************************************************************************************************************************* | 1364 | /******************************************************************************************************************************* |
1317 | * | 1365 | * |
1318 | * 警灯部分 | 1366 | * 警灯部分 |
@@ -1325,7 +1373,7 @@ static int Uart_4G_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | @@ -1325,7 +1373,7 @@ static int Uart_4G_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | ||
1325 | **********/ | 1373 | **********/ |
1326 | static int Uart_4G_RecvDeal_WarningLight_ModeControl(char *getbuf) | 1374 | static int Uart_4G_RecvDeal_WarningLight_ModeControl(char *getbuf) |
1327 | { | 1375 | { |
1328 | - USER_LOG_INFO("警灯模式控制\n"); | 1376 | + JZSDK_LOG_INFO("警灯模式控制\n"); |
1329 | //获取帧的序列号 | 1377 | //获取帧的序列号 |
1330 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1378 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1331 | 1379 | ||
@@ -1353,7 +1401,7 @@ static int Uart_4G_RecvDeal_WarningLight_ModeControl(char *getbuf) | @@ -1353,7 +1401,7 @@ static int Uart_4G_RecvDeal_WarningLight_ModeControl(char *getbuf) | ||
1353 | **********/ | 1401 | **********/ |
1354 | static int Uart_4G_RecvDeal_WarningLight_SetColor(char *getbuf) | 1402 | static int Uart_4G_RecvDeal_WarningLight_SetColor(char *getbuf) |
1355 | { | 1403 | { |
1356 | - USER_LOG_INFO("警灯颜色选择\n"); | 1404 | + JZSDK_LOG_INFO("警灯颜色选择\n"); |
1357 | //获取帧的序列号 | 1405 | //获取帧的序列号 |
1358 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1406 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1359 | 1407 | ||
@@ -1381,7 +1429,7 @@ static int Uart_4G_RecvDeal_WarningLight_SetColor(char *getbuf) | @@ -1381,7 +1429,7 @@ static int Uart_4G_RecvDeal_WarningLight_SetColor(char *getbuf) | ||
1381 | **********/ | 1429 | **********/ |
1382 | static int Uart_4G_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf) | 1430 | static int Uart_4G_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf) |
1383 | { | 1431 | { |
1384 | - USER_LOG_INFO("警灯状态查询\n"); | 1432 | + JZSDK_LOG_INFO("警灯状态查询\n"); |
1385 | //1、获取帧的序列号 | 1433 | //1、获取帧的序列号 |
1386 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1434 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1387 | 1435 | ||
@@ -1397,7 +1445,7 @@ static int Uart_4G_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf) | @@ -1397,7 +1445,7 @@ static int Uart_4G_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf) | ||
1397 | **********/ | 1445 | **********/ |
1398 | static int Uart_4G_RecvDeal_CheckStatus_WarningLightColor(char *getbuf) | 1446 | static int Uart_4G_RecvDeal_CheckStatus_WarningLightColor(char *getbuf) |
1399 | { | 1447 | { |
1400 | - USER_LOG_INFO("警灯颜色查询\n"); | 1448 | + JZSDK_LOG_INFO("警灯颜色查询\n"); |
1401 | //1、获取帧的序列号 | 1449 | //1、获取帧的序列号 |
1402 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1450 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1403 | 1451 | ||
@@ -1436,7 +1484,7 @@ static int Uart_4G_RecvDeal_CheckStatus_WarningLightColor(char *getbuf) | @@ -1436,7 +1484,7 @@ static int Uart_4G_RecvDeal_CheckStatus_WarningLightColor(char *getbuf) | ||
1436 | **********/ | 1484 | **********/ |
1437 | static int Uart_4G_RecvDeal_ObtainSearchLight_Frequency(char *getbuf) | 1485 | static int Uart_4G_RecvDeal_ObtainSearchLight_Frequency(char *getbuf) |
1438 | { | 1486 | { |
1439 | - USER_LOG_INFO("收到灯光频率\n"); | 1487 | + JZSDK_LOG_INFO("收到灯光频率\n"); |
1440 | //获取帧的序列号 | 1488 | //获取帧的序列号 |
1441 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1489 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1442 | 1490 | ||
@@ -1454,7 +1502,7 @@ static int Uart_4G_RecvDeal_ObtainSearchLight_Frequency(char *getbuf) | @@ -1454,7 +1502,7 @@ static int Uart_4G_RecvDeal_ObtainSearchLight_Frequency(char *getbuf) | ||
1454 | **********/ | 1502 | **********/ |
1455 | static int Uart_4G_RecvDeal_ObtainSearchLight_Mode(char *getbuf) | 1503 | static int Uart_4G_RecvDeal_ObtainSearchLight_Mode(char *getbuf) |
1456 | { | 1504 | { |
1457 | - USER_LOG_INFO("收到灯光模式\n"); | 1505 | + JZSDK_LOG_INFO("收到灯光模式\n"); |
1458 | //获取帧的序列号 | 1506 | //获取帧的序列号 |
1459 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1507 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1460 | 1508 | ||
@@ -1472,7 +1520,7 @@ static int Uart_4G_RecvDeal_ObtainSearchLight_Mode(char *getbuf) | @@ -1472,7 +1520,7 @@ static int Uart_4G_RecvDeal_ObtainSearchLight_Mode(char *getbuf) | ||
1472 | **********/ | 1520 | **********/ |
1473 | static int Uart_4G_RecvDeal_ObtainSearchLight_Lumen(char *getbuf) | 1521 | static int Uart_4G_RecvDeal_ObtainSearchLight_Lumen(char *getbuf) |
1474 | { | 1522 | { |
1475 | - USER_LOG_INFO("收到灯光亮度\n"); | 1523 | + JZSDK_LOG_INFO("收到灯光亮度\n"); |
1476 | //获取帧的序列号 | 1524 | //获取帧的序列号 |
1477 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1525 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1478 | 1526 | ||
@@ -1491,7 +1539,7 @@ static int Uart_4G_RecvDeal_ObtainSearchLight_Lumen(char *getbuf) | @@ -1491,7 +1539,7 @@ static int Uart_4G_RecvDeal_ObtainSearchLight_Lumen(char *getbuf) | ||
1491 | **********/ | 1539 | **********/ |
1492 | static int Uart_4G_RecvDeal_ObtainSearchLight_Temperature(char *getbuf) | 1540 | static int Uart_4G_RecvDeal_ObtainSearchLight_Temperature(char *getbuf) |
1493 | { | 1541 | { |
1494 | - USER_LOG_INFO("收到探照灯温度\n"); | 1542 | + JZSDK_LOG_INFO("收到探照灯温度\n"); |
1495 | //获取帧的序列号 | 1543 | //获取帧的序列号 |
1496 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1544 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1497 | 1545 | ||
@@ -1510,7 +1558,7 @@ static int Uart_4G_RecvDeal_ObtainSearchLight_Temperature(char *getbuf) | @@ -1510,7 +1558,7 @@ static int Uart_4G_RecvDeal_ObtainSearchLight_Temperature(char *getbuf) | ||
1510 | **********/ | 1558 | **********/ |
1511 | static int Uart_4G_RecvDeal_ObtainGimbal_Pitch(char *getbuf) | 1559 | static int Uart_4G_RecvDeal_ObtainGimbal_Pitch(char *getbuf) |
1512 | { | 1560 | { |
1513 | - USER_LOG_INFO("收到云台俯仰\n"); | 1561 | + JZSDK_LOG_INFO("收到云台俯仰\n"); |
1514 | //获取帧的序列号 | 1562 | //获取帧的序列号 |
1515 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1563 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1516 | 1564 | ||
@@ -1541,7 +1589,7 @@ static int Uart_4G_RecvDeal_ObtainGimbal_Pitch(char *getbuf) | @@ -1541,7 +1589,7 @@ static int Uart_4G_RecvDeal_ObtainGimbal_Pitch(char *getbuf) | ||
1541 | **********/ | 1589 | **********/ |
1542 | static int Uart_4G_RecvDeal_ObtainGimbal_Yaw(char *getbuf) | 1590 | static int Uart_4G_RecvDeal_ObtainGimbal_Yaw(char *getbuf) |
1543 | { | 1591 | { |
1544 | - USER_LOG_INFO("收到云台航向\n"); | 1592 | + JZSDK_LOG_INFO("收到云台航向\n"); |
1545 | //获取帧的序列号 | 1593 | //获取帧的序列号 |
1546 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1594 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1547 | 1595 | ||
@@ -1579,7 +1627,7 @@ static int Uart_4G_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf) | @@ -1579,7 +1627,7 @@ static int Uart_4G_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf) | ||
1579 | int signal = getbuf[9]; | 1627 | int signal = getbuf[9]; |
1580 | 1628 | ||
1581 | //2、获取云台角度绝对值 | 1629 | //2、获取云台角度绝对值 |
1582 | - int pitch = (int)getbuf[10] ; | 1630 | + int pitch = (((int)getbuf[10]) << 8 ) + getbuf[11]; |
1583 | 1631 | ||
1584 | //3、拼接得到云台值 | 1632 | //3、拼接得到云台值 |
1585 | if (signal == 0x00) | 1633 | if (signal == 0x00) |
@@ -1601,7 +1649,7 @@ static int Uart_4G_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf) | @@ -1601,7 +1649,7 @@ static int Uart_4G_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf) | ||
1601 | **********/ | 1649 | **********/ |
1602 | static int Uart_4G_RecvDeal_ObtainWaringlight_Status(char *getbuf) | 1650 | static int Uart_4G_RecvDeal_ObtainWaringlight_Status(char *getbuf) |
1603 | { | 1651 | { |
1604 | - USER_LOG_INFO("收到警灯状态\n"); | 1652 | + JZSDK_LOG_INFO("收到警灯状态\n"); |
1605 | //获取帧的序列号 | 1653 | //获取帧的序列号 |
1606 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1654 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1607 | 1655 | ||
@@ -1620,7 +1668,7 @@ static int Uart_4G_RecvDeal_ObtainWaringlight_Status(char *getbuf) | @@ -1620,7 +1668,7 @@ static int Uart_4G_RecvDeal_ObtainWaringlight_Status(char *getbuf) | ||
1620 | **********/ | 1668 | **********/ |
1621 | static int Uart_4G_RecvDeal_ObtainWaringlight_Color(char *getbuf) | 1669 | static int Uart_4G_RecvDeal_ObtainWaringlight_Color(char *getbuf) |
1622 | { | 1670 | { |
1623 | - USER_LOG_INFO("收到警灯颜色\n"); | 1671 | + JZSDK_LOG_INFO("收到警灯颜色\n"); |
1624 | //获取帧的序列号 | 1672 | //获取帧的序列号 |
1625 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1673 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1626 | 1674 | ||
@@ -1639,7 +1687,7 @@ static int Uart_4G_RecvDeal_ObtainWaringlight_Color(char *getbuf) | @@ -1639,7 +1687,7 @@ static int Uart_4G_RecvDeal_ObtainWaringlight_Color(char *getbuf) | ||
1639 | **********/ | 1687 | **********/ |
1640 | static int Uart_4G_RecvDeal_ObtainSerialNumber(char *getbuf) | 1688 | static int Uart_4G_RecvDeal_ObtainSerialNumber(char *getbuf) |
1641 | { | 1689 | { |
1642 | - USER_LOG_INFO("收到产品序列号\n"); | 1690 | + JZSDK_LOG_INFO("收到产品序列号\n"); |
1643 | //获取帧的序列号 | 1691 | //获取帧的序列号 |
1644 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1692 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1645 | 1693 | ||
@@ -1670,7 +1718,7 @@ static int Uart_4G_RecvDeal_ObtainSerialNumber(char *getbuf) | @@ -1670,7 +1718,7 @@ static int Uart_4G_RecvDeal_ObtainSerialNumber(char *getbuf) | ||
1670 | **********/ | 1718 | **********/ |
1671 | static int Uart_4G_RecvDeal_QuerySecondaryDeviceName(char *getbuf) | 1719 | static int Uart_4G_RecvDeal_QuerySecondaryDeviceName(char *getbuf) |
1672 | { | 1720 | { |
1673 | - USER_LOG_INFO("查询当前从设备名\n"); | 1721 | + JZSDK_LOG_INFO("查询当前从设备名\n"); |
1674 | 1722 | ||
1675 | //获取帧的序列号 | 1723 | //获取帧的序列号 |
1676 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1724 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
@@ -1699,7 +1747,7 @@ static int Uart_4G_RecvDeal_QuerySecondaryDeviceName(char *getbuf) | @@ -1699,7 +1747,7 @@ static int Uart_4G_RecvDeal_QuerySecondaryDeviceName(char *getbuf) | ||
1699 | **********/ | 1747 | **********/ |
1700 | static int Uart_4G_RecvDeal_SetGimbalRange(char *getbuf) | 1748 | static int Uart_4G_RecvDeal_SetGimbalRange(char *getbuf) |
1701 | { | 1749 | { |
1702 | - USER_LOG_INFO("设置云台最大值最小值\n"); | 1750 | + JZSDK_LOG_INFO("设置云台最大值最小值\n"); |
1703 | //获取帧的序列号 | 1751 | //获取帧的序列号 |
1704 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1752 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1705 | 1753 | ||
@@ -1726,7 +1774,7 @@ static int Uart_4G_RecvDeal_SetGimbalRange(char *getbuf) | @@ -1726,7 +1774,7 @@ static int Uart_4G_RecvDeal_SetGimbalRange(char *getbuf) | ||
1726 | **********/ | 1774 | **********/ |
1727 | static int Uart_4G_RecvDeal_GimbalLinkageControl(char *getbuf) | 1775 | static int Uart_4G_RecvDeal_GimbalLinkageControl(char *getbuf) |
1728 | { | 1776 | { |
1729 | - USER_LOG_INFO("设置云台联动\n"); | 1777 | + JZSDK_LOG_INFO("设置云台联动\n"); |
1730 | 1778 | ||
1731 | //获取帧的序列号 | 1779 | //获取帧的序列号 |
1732 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1780 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
@@ -1746,7 +1794,7 @@ static int Uart_4G_RecvDeal_GimbalLinkageControl(char *getbuf) | @@ -1746,7 +1794,7 @@ static int Uart_4G_RecvDeal_GimbalLinkageControl(char *getbuf) | ||
1746 | **********/ | 1794 | **********/ |
1747 | static int Uart_4G_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf) | 1795 | static int Uart_4G_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf) |
1748 | { | 1796 | { |
1749 | - USER_LOG_INFO("收到查询是否开启云台联动\n"); | 1797 | + JZSDK_LOG_INFO("收到查询是否开启云台联动\n"); |
1750 | 1798 | ||
1751 | //获取帧的序列号 | 1799 | //获取帧的序列号 |
1752 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1800 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
@@ -1780,7 +1828,7 @@ static int Uart_4G_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf) | @@ -1780,7 +1828,7 @@ static int Uart_4G_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf) | ||
1780 | **********/ | 1828 | **********/ |
1781 | static int Uart_4G_RecvDeal_ObtainSecondaryDeviceName(char *getbuf) | 1829 | static int Uart_4G_RecvDeal_ObtainSecondaryDeviceName(char *getbuf) |
1782 | { | 1830 | { |
1783 | - USER_LOG_INFO("收到从设备名\n"); | 1831 | + JZSDK_LOG_INFO("收到从设备名\n"); |
1784 | //获取帧的序列号 | 1832 | //获取帧的序列号 |
1785 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1833 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1786 | 1834 | ||
@@ -1812,7 +1860,7 @@ static int Uart_4G_RecvDeal_ObtainSecondaryDeviceName(char *getbuf) | @@ -1812,7 +1860,7 @@ static int Uart_4G_RecvDeal_ObtainSecondaryDeviceName(char *getbuf) | ||
1812 | **********/ | 1860 | **********/ |
1813 | static int Uart_4G_RecvDeal_ObtainGimbalLinkage(char *getbuf) | 1861 | static int Uart_4G_RecvDeal_ObtainGimbalLinkage(char *getbuf) |
1814 | { | 1862 | { |
1815 | - USER_LOG_INFO("收到云台联动值\n"); | 1863 | + JZSDK_LOG_INFO("收到云台联动值\n"); |
1816 | //获取帧的序列号 | 1864 | //获取帧的序列号 |
1817 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1865 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1818 | 1866 | ||
@@ -1847,7 +1895,7 @@ static int Uart_4G_RecvDeal_ObtainGimbalLinkage(char *getbuf) | @@ -1847,7 +1895,7 @@ static int Uart_4G_RecvDeal_ObtainGimbalLinkage(char *getbuf) | ||
1847 | **********/ | 1895 | **********/ |
1848 | static int Uart_4G_RecvDeal_FrameErrorReply(char *getbuf) | 1896 | static int Uart_4G_RecvDeal_FrameErrorReply(char *getbuf) |
1849 | { | 1897 | { |
1850 | - USER_LOG_ERROR("帧指令错误:帧错误或者是帧无对应操作\n"); | 1898 | + JZSDK_LOG_ERROR("帧指令错误:帧错误或者是帧无对应操作\n"); |
1851 | //无法正常获取帧的序列号 | 1899 | //无法正常获取帧的序列号 |
1852 | //回复操作失败 | 1900 | //回复操作失败 |
1853 | JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, 0x00); | 1901 | JZsdk_Uart_SendDeal_Reply_Failure(UART_4G, 0x00); |
@@ -1862,7 +1910,7 @@ static int Uart_4G_RecvDeal_FrameErrorReply(char *getbuf) | @@ -1862,7 +1910,7 @@ static int Uart_4G_RecvDeal_FrameErrorReply(char *getbuf) | ||
1862 | **********/ | 1910 | **********/ |
1863 | static int Uart_4G_RecvDeal_OperationSuccessful(char *getbuf) | 1911 | static int Uart_4G_RecvDeal_OperationSuccessful(char *getbuf) |
1864 | { | 1912 | { |
1865 | - USER_LOG_INFO("接受到操作成功\n"); | 1913 | + JZSDK_LOG_INFO("接受到操作成功\n"); |
1866 | } | 1914 | } |
1867 | 1915 | ||
1868 | /********* | 1916 | /********* |
@@ -1873,7 +1921,7 @@ static int Uart_4G_RecvDeal_OperationSuccessful(char *getbuf) | @@ -1873,7 +1921,7 @@ static int Uart_4G_RecvDeal_OperationSuccessful(char *getbuf) | ||
1873 | **********/ | 1921 | **********/ |
1874 | static int Uart_4G_RecvDeal_OperationFailed(char *getbuf) | 1922 | static int Uart_4G_RecvDeal_OperationFailed(char *getbuf) |
1875 | { | 1923 | { |
1876 | - USER_LOG_INFO("接受到操作失败\n"); | 1924 | + JZSDK_LOG_INFO("接受到操作失败\n"); |
1877 | } | 1925 | } |
1878 | /******************************************************************************************************** | 1926 | /******************************************************************************************************** |
1879 | ********* ********| | 1927 | ********* ********| |
@@ -1890,7 +1938,7 @@ static int Uart_4G_RecvDeal_OperationFailed(char *getbuf) | @@ -1890,7 +1938,7 @@ static int Uart_4G_RecvDeal_OperationFailed(char *getbuf) | ||
1890 | *********************************************************************************************************/ | 1938 | *********************************************************************************************************/ |
1891 | int Uart_4G_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len) | 1939 | int Uart_4G_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len) |
1892 | { | 1940 | { |
1893 | - USER_LOG_INFO("串口设备4G,接受到的模式为:%x",Receive_mode); | 1941 | + JZSDK_LOG_INFO("串口设备4g,接受到的模式为:%x",Receive_mode); |
1894 | switch (Receive_mode) | 1942 | switch (Receive_mode) |
1895 | { | 1943 | { |
1896 | /******************************************************************************************************************************* | 1944 | /******************************************************************************************************************************* |
@@ -2198,9 +2246,20 @@ int Uart_4G_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len) | @@ -2198,9 +2246,20 @@ int Uart_4G_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len) | ||
2198 | 2246 | ||
2199 | //序列号查询 | 2247 | //序列号查询 |
2200 | case JZ_INSCODE_5AFRAME_CHECKSTATUS_SERIALNUMBER: | 2248 | case JZ_INSCODE_5AFRAME_CHECKSTATUS_SERIALNUMBER: |
2249 | + Uart_4G_RecvDeal_CheckStatus_SerialNumber(getdata); | ||
2250 | + break; | ||
2201 | 2251 | ||
2252 | + //向外供电开关 | ||
2253 | + case JZ_INSCODE_5AFRAME_OUTPUTPOWER_CONTROL: | ||
2254 | + Uart_4G_RecvDeal_OutPutPower_Control(getdata); | ||
2202 | break; | 2255 | break; |
2203 | 2256 | ||
2257 | + //查询向外供电情况 | ||
2258 | + case JZ_INSCODE_5AFRAME_CHECKSTATUS_OUTPUTPOWER: | ||
2259 | + Uart_4G_RecvDeal_Checkstatus_OutPutPower(getdata); | ||
2260 | + break; | ||
2261 | + | ||
2262 | + | ||
2204 | 2263 | ||
2205 | /******************************************************************************************************************************* | 2264 | /******************************************************************************************************************************* |
2206 | * | 2265 | * |
@@ -2589,7 +2648,7 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_4G(unsigned char *getbuf, int len) | @@ -2589,7 +2648,7 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_4G(unsigned char *getbuf, int len) | ||
2589 | * ****************/ | 2648 | * ****************/ |
2590 | int JZsdk_Uart_RecvDeal_Set_UART_4G_Receive_mode(int value) | 2649 | int JZsdk_Uart_RecvDeal_Set_UART_4G_Receive_mode(int value) |
2591 | { | 2650 | { |
2592 | - USER_LOG_INFO("串口设备4G,二次修改接收模式%x\n",value); | 2651 | + JZSDK_LOG_INFO("串口设备4g,二次修改接收模式%x\n",value); |
2593 | UART_4G_Receive_mode = value; | 2652 | UART_4G_Receive_mode = value; |
2594 | return 0; | 2653 | return 0; |
2595 | } | 2654 | } |
@@ -39,7 +39,7 @@ int JZsdk_Uart_RecvDeal_Set_UART_DEV1_Receive_mode(int value); | @@ -39,7 +39,7 @@ int JZsdk_Uart_RecvDeal_Set_UART_DEV1_Receive_mode(int value); | ||
39 | **********/ | 39 | **********/ |
40 | static int Uart_DEV1_RecvDeal_AskForConnect(char *getbuf) | 40 | static int Uart_DEV1_RecvDeal_AskForConnect(char *getbuf) |
41 | { | 41 | { |
42 | - USER_LOG_INFO("串口设备1号,连接成功"); | 42 | + JZSDK_LOG_INFO("串口设备1号,连接成功"); |
43 | //获取帧的序列号 | 43 | //获取帧的序列号 |
44 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 44 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
45 | 45 | ||
@@ -67,7 +67,7 @@ static int Uart_DEV1_RecvDeal_AskForConnect(char *getbuf) | @@ -67,7 +67,7 @@ static int Uart_DEV1_RecvDeal_AskForConnect(char *getbuf) | ||
67 | **********/ | 67 | **********/ |
68 | static int Uart_DEV1_RecvDeal_RealTimeMP2_start(char *getbuf) | 68 | static int Uart_DEV1_RecvDeal_RealTimeMP2_start(char *getbuf) |
69 | { | 69 | { |
70 | - USER_LOG_INFO("开启MP2实时喊话功能\n"); | 70 | + JZSDK_LOG_INFO("开启MP2实时喊话功能\n"); |
71 | T_JZsdkReturnCode ret; | 71 | T_JZsdkReturnCode ret; |
72 | 72 | ||
73 | //获取帧的序列号 | 73 | //获取帧的序列号 |
@@ -111,7 +111,7 @@ static int Uart_DEV1_RecvDeal_RealTimeMP2_start(char *getbuf) | @@ -111,7 +111,7 @@ static int Uart_DEV1_RecvDeal_RealTimeMP2_start(char *getbuf) | ||
111 | **********/ | 111 | **********/ |
112 | static int Uart_DEV1_RecvDeal_RealTimeMP2_transmission(char *getdata, int len) | 112 | static int Uart_DEV1_RecvDeal_RealTimeMP2_transmission(char *getdata, int len) |
113 | { | 113 | { |
114 | - USER_LOG_INFO("MP2实时喊话传输中\n"); | 114 | + JZSDK_LOG_INFO("MP2实时喊话传输中\n"); |
115 | T_JZsdkReturnCode ret; | 115 | T_JZsdkReturnCode ret; |
116 | 116 | ||
117 | //传输数据接口 | 117 | //传输数据接口 |
@@ -126,7 +126,7 @@ static int Uart_DEV1_RecvDeal_RealTimeMP2_transmission(char *getdata, int len) | @@ -126,7 +126,7 @@ static int Uart_DEV1_RecvDeal_RealTimeMP2_transmission(char *getdata, int len) | ||
126 | **********/ | 126 | **********/ |
127 | static int Uart_DEV1_RecvDeal_RealTimeMP2_stop(char *getbuf) | 127 | static int Uart_DEV1_RecvDeal_RealTimeMP2_stop(char *getbuf) |
128 | { | 128 | { |
129 | - USER_LOG_INFO("关闭MP2实时喊话功能\n"); | 129 | + JZSDK_LOG_INFO("关闭MP2实时喊话功能\n"); |
130 | T_JZsdkReturnCode ret; | 130 | T_JZsdkReturnCode ret; |
131 | 131 | ||
132 | //获取帧的序列号 | 132 | //获取帧的序列号 |
@@ -157,7 +157,7 @@ static int Uart_DEV1_RecvDeal_RealTimeMP2_stop(char *getbuf) | @@ -157,7 +157,7 @@ static int Uart_DEV1_RecvDeal_RealTimeMP2_stop(char *getbuf) | ||
157 | **********/ | 157 | **********/ |
158 | static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | 158 | static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) |
159 | { | 159 | { |
160 | - USER_LOG_INFO("开始传输的音频文件保存\n"); | 160 | + JZSDK_LOG_INFO("开始传输的音频文件保存\n"); |
161 | //获取帧的序列号 | 161 | //获取帧的序列号 |
162 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 162 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
163 | 163 | ||
@@ -168,7 +168,7 @@ static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | @@ -168,7 +168,7 @@ static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | ||
168 | char FileName[1024]; | 168 | char FileName[1024]; |
169 | memset(FileName,0,1024); | 169 | memset(FileName,0,1024); |
170 | memcpy(FileName, &getbuf[9], FileNameLen); | 170 | memcpy(FileName, &getbuf[9], FileNameLen); |
171 | - USER_LOG_INFO("保存的文件名为%s",FileName); | 171 | + JZSDK_LOG_INFO("保存的文件名为%s",FileName); |
172 | 172 | ||
173 | T_JZsdkReturnCode ret = JZsdk_Uart_SaveAudioFileStart(FileName); | 173 | T_JZsdkReturnCode ret = JZsdk_Uart_SaveAudioFileStart(FileName); |
174 | if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 174 | if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
@@ -192,7 +192,7 @@ static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | @@ -192,7 +192,7 @@ static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | ||
192 | **********/ | 192 | **********/ |
193 | static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int len) | 193 | static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int len) |
194 | { | 194 | { |
195 | - USER_LOG_INFO("传输音频文件中\n"); | 195 | + JZSDK_LOG_INFO("传输音频文件中\n"); |
196 | JZsdk_Uart_SaveAudioFileTrans(getdata, len); | 196 | JZsdk_Uart_SaveAudioFileTrans(getdata, len); |
197 | } | 197 | } |
198 | /********* | 198 | /********* |
@@ -203,7 +203,7 @@ static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int | @@ -203,7 +203,7 @@ static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int | ||
203 | **********/ | 203 | **********/ |
204 | static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_stop(char *getbuf) | 204 | static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_stop(char *getbuf) |
205 | { | 205 | { |
206 | - USER_LOG_INFO("开始传输的音频文件保存\n"); | 206 | + JZSDK_LOG_INFO("开始传输的音频文件保存\n"); |
207 | //获取帧的序列号 | 207 | //获取帧的序列号 |
208 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 208 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
209 | 209 | ||
@@ -223,7 +223,7 @@ static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_stop(char *getbuf) | @@ -223,7 +223,7 @@ static int Uart_DEV1_RecvDeal_SaveAudioFileTrans_stop(char *getbuf) | ||
223 | static int Uart_DEV1_RecvDeal_audio_PlayFile(char *getbuf) | 223 | static int Uart_DEV1_RecvDeal_audio_PlayFile(char *getbuf) |
224 | { | 224 | { |
225 | T_JZsdkReturnCode ret; | 225 | T_JZsdkReturnCode ret; |
226 | - USER_LOG_INFO("播放指定音频\n"); | 226 | + JZSDK_LOG_INFO("播放指定音频\n"); |
227 | //获取帧的序列号 | 227 | //获取帧的序列号 |
228 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 228 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
229 | 229 | ||
@@ -238,7 +238,7 @@ static int Uart_DEV1_RecvDeal_audio_PlayFile(char *getbuf) | @@ -238,7 +238,7 @@ static int Uart_DEV1_RecvDeal_audio_PlayFile(char *getbuf) | ||
238 | memset(music_name, 0, 256); | 238 | memset(music_name, 0, 256); |
239 | memcpy(music_name, &getbuf[9], datasize); | 239 | memcpy(music_name, &getbuf[9], datasize); |
240 | 240 | ||
241 | - USER_LOG_INFO("播放指定音频:%s\n",music_name); | 241 | + JZSDK_LOG_INFO("播放指定音频:%s\n",music_name); |
242 | 242 | ||
243 | ret = JZsdk_Uart_PlayMusic(UART_DEV_1, music_name, datasize); | 243 | ret = JZsdk_Uart_PlayMusic(UART_DEV_1, music_name, datasize); |
244 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 244 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
@@ -260,7 +260,7 @@ static int Uart_DEV1_RecvDeal_audio_PlayFile(char *getbuf) | @@ -260,7 +260,7 @@ static int Uart_DEV1_RecvDeal_audio_PlayFile(char *getbuf) | ||
260 | **********/ | 260 | **********/ |
261 | static int Uart_DEV1_RecvDeal_audio_PlayContinue(char *getbuf) | 261 | static int Uart_DEV1_RecvDeal_audio_PlayContinue(char *getbuf) |
262 | { | 262 | { |
263 | - USER_LOG_INFO("音频继续播放\n"); | 263 | + JZSDK_LOG_INFO("音频继续播放\n"); |
264 | //获取帧的序列号 | 264 | //获取帧的序列号 |
265 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 265 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
266 | 266 | ||
@@ -277,7 +277,7 @@ static int Uart_DEV1_RecvDeal_audio_PlayContinue(char *getbuf) | @@ -277,7 +277,7 @@ static int Uart_DEV1_RecvDeal_audio_PlayContinue(char *getbuf) | ||
277 | **********/ | 277 | **********/ |
278 | static int Uart_DEV1_RecvDeal_audio_PlayPause(char *getbuf) | 278 | static int Uart_DEV1_RecvDeal_audio_PlayPause(char *getbuf) |
279 | { | 279 | { |
280 | - USER_LOG_INFO("音频暂停播放\n"); | 280 | + JZSDK_LOG_INFO("音频暂停播放\n"); |
281 | //获取帧的序列号 | 281 | //获取帧的序列号 |
282 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 282 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
283 | 283 | ||
@@ -294,7 +294,7 @@ static int Uart_DEV1_RecvDeal_audio_PlayPause(char *getbuf) | @@ -294,7 +294,7 @@ static int Uart_DEV1_RecvDeal_audio_PlayPause(char *getbuf) | ||
294 | **********/ | 294 | **********/ |
295 | static int Uart_DEV1_RecvDeal_audio_PlayStop(char *getbuf) | 295 | static int Uart_DEV1_RecvDeal_audio_PlayStop(char *getbuf) |
296 | { | 296 | { |
297 | - USER_LOG_INFO("音频停止播放\n"); | 297 | + JZSDK_LOG_INFO("音频停止播放\n"); |
298 | //获取帧的序列号 | 298 | //获取帧的序列号 |
299 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 299 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
300 | 300 | ||
@@ -312,7 +312,7 @@ static int Uart_DEV1_RecvDeal_audio_PlayStop(char *getbuf) | @@ -312,7 +312,7 @@ static int Uart_DEV1_RecvDeal_audio_PlayStop(char *getbuf) | ||
312 | **********/ | 312 | **********/ |
313 | static int Uart_DEV1_RecvDeal_audio_LastSong(char *getbuf) | 313 | static int Uart_DEV1_RecvDeal_audio_LastSong(char *getbuf) |
314 | { | 314 | { |
315 | - USER_LOG_INFO("音频上一曲\n"); | 315 | + JZSDK_LOG_INFO("音频上一曲\n"); |
316 | //获取帧的序列号 | 316 | //获取帧的序列号 |
317 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 317 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
318 | 318 | ||
@@ -330,7 +330,7 @@ static int Uart_DEV1_RecvDeal_audio_LastSong(char *getbuf) | @@ -330,7 +330,7 @@ static int Uart_DEV1_RecvDeal_audio_LastSong(char *getbuf) | ||
330 | **********/ | 330 | **********/ |
331 | static int Uart_DEV1_RecvDeal_audio_NextSong(char *getbuf) | 331 | static int Uart_DEV1_RecvDeal_audio_NextSong(char *getbuf) |
332 | { | 332 | { |
333 | - USER_LOG_INFO("音频下一曲\n"); | 333 | + JZSDK_LOG_INFO("音频下一曲\n"); |
334 | //获取帧的序列号 | 334 | //获取帧的序列号 |
335 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 335 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
336 | 336 | ||
@@ -348,7 +348,7 @@ static int Uart_DEV1_RecvDeal_audio_NextSong(char *getbuf) | @@ -348,7 +348,7 @@ static int Uart_DEV1_RecvDeal_audio_NextSong(char *getbuf) | ||
348 | **********/ | 348 | **********/ |
349 | static int Uart_DEV1_RecvDeal_audio_GetMusicList(char *getbuf) | 349 | static int Uart_DEV1_RecvDeal_audio_GetMusicList(char *getbuf) |
350 | { | 350 | { |
351 | - USER_LOG_INFO("获取音乐列表\n"); | 351 | + JZSDK_LOG_INFO("获取音乐列表\n"); |
352 | //获取帧的序列号 | 352 | //获取帧的序列号 |
353 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 353 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
354 | 354 | ||
@@ -390,7 +390,7 @@ static int Uart_DEV1_RecvDeal_audio_GetMusicList(char *getbuf) | @@ -390,7 +390,7 @@ static int Uart_DEV1_RecvDeal_audio_GetMusicList(char *getbuf) | ||
390 | **********/ | 390 | **********/ |
391 | static int Uart_DEV1_RecvDeal_Amplifier_stop(char *getbuf) | 391 | static int Uart_DEV1_RecvDeal_Amplifier_stop(char *getbuf) |
392 | { | 392 | { |
393 | - USER_LOG_INFO("强制关闭功放\n"); | 393 | + JZSDK_LOG_INFO("强制关闭功放\n"); |
394 | //获取帧的序列号 | 394 | //获取帧的序列号 |
395 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 395 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
396 | 396 | ||
@@ -408,7 +408,7 @@ static int Uart_DEV1_RecvDeal_Amplifier_stop(char *getbuf) | @@ -408,7 +408,7 @@ static int Uart_DEV1_RecvDeal_Amplifier_stop(char *getbuf) | ||
408 | **********/ | 408 | **********/ |
409 | static int Uart_DEV1_RecvDeal_Amplifier_open(char *getbuf) | 409 | static int Uart_DEV1_RecvDeal_Amplifier_open(char *getbuf) |
410 | { | 410 | { |
411 | - USER_LOG_INFO("强制关闭功放\n"); | 411 | + JZSDK_LOG_INFO("强制关闭功放\n"); |
412 | //获取帧的序列号 | 412 | //获取帧的序列号 |
413 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 413 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
414 | 414 | ||
@@ -437,7 +437,7 @@ static int Uart_DEV1_RecvDeal_Amplifier_auto() | @@ -437,7 +437,7 @@ static int Uart_DEV1_RecvDeal_Amplifier_auto() | ||
437 | **********/ | 437 | **********/ |
438 | static int Uart_DEV1_RecvDeal_SetVolume(char *getbuf) | 438 | static int Uart_DEV1_RecvDeal_SetVolume(char *getbuf) |
439 | { | 439 | { |
440 | - USER_LOG_INFO("调节音量\n"); | 440 | + JZSDK_LOG_INFO("调节音量\n"); |
441 | //获取帧的序列号 | 441 | //获取帧的序列号 |
442 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 442 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
443 | 443 | ||
@@ -456,7 +456,7 @@ static int Uart_DEV1_RecvDeal_SetVolume(char *getbuf) | @@ -456,7 +456,7 @@ static int Uart_DEV1_RecvDeal_SetVolume(char *getbuf) | ||
456 | **********/ | 456 | **********/ |
457 | static int Uart_DEV1_RecvDeal_CheckStatus_volume(char *getbuf) | 457 | static int Uart_DEV1_RecvDeal_CheckStatus_volume(char *getbuf) |
458 | { | 458 | { |
459 | - USER_LOG_INFO("查询音量\n"); | 459 | + JZSDK_LOG_INFO("查询音量\n"); |
460 | //获取帧的序列号 | 460 | //获取帧的序列号 |
461 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 461 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
462 | 462 | ||
@@ -479,7 +479,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_volume(char *getbuf) | @@ -479,7 +479,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_volume(char *getbuf) | ||
479 | static int Uart_DEV1_RecvDeal_CheckStatus_play(char *getbuf) | 479 | static int Uart_DEV1_RecvDeal_CheckStatus_play(char *getbuf) |
480 | { | 480 | { |
481 | //查询播放状态 | 481 | //查询播放状态 |
482 | - USER_LOG_INFO("查询播放状态\n"); | 482 | + JZSDK_LOG_INFO("查询播放状态\n"); |
483 | //获取帧的序列号 | 483 | //获取帧的序列号 |
484 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 484 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
485 | 485 | ||
@@ -504,7 +504,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_play(char *getbuf) | @@ -504,7 +504,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_play(char *getbuf) | ||
504 | static int Uart_DEV1_RecvDeal_CheckStatus_gimbal(char *getbuf) | 504 | static int Uart_DEV1_RecvDeal_CheckStatus_gimbal(char *getbuf) |
505 | { | 505 | { |
506 | //查询云台角度 | 506 | //查询云台角度 |
507 | - USER_LOG_INFO("查询云台角度\n"); | 507 | + JZSDK_LOG_INFO("查询云台角度\n"); |
508 | //获取帧的序列号 | 508 | //获取帧的序列号 |
509 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 509 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
510 | 510 | ||
@@ -540,7 +540,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_GimbalFineTuning(char *getbuf) | @@ -540,7 +540,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_GimbalFineTuning(char *getbuf) | ||
540 | static int Uart_DEV1_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | 540 | static int Uart_DEV1_RecvDeal_CheckStatus_PLayFileName(char *getbuf) |
541 | { | 541 | { |
542 | //查询播放文件名 | 542 | //查询播放文件名 |
543 | - USER_LOG_INFO("查询播放文件名\n"); | 543 | + JZSDK_LOG_INFO("查询播放文件名\n"); |
544 | //获取帧的序列号 | 544 | //获取帧的序列号 |
545 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 545 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
546 | 546 | ||
@@ -549,7 +549,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | @@ -549,7 +549,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | ||
549 | int MusicName_Len; | 549 | int MusicName_Len; |
550 | JZsdk_Uart_CheckStatus_PlayFileName(MusicName, &MusicName_Len); | 550 | JZsdk_Uart_CheckStatus_PlayFileName(MusicName, &MusicName_Len); |
551 | 551 | ||
552 | - USER_LOG_INFO("当前播放的是%s %d\n",MusicName, MusicName_Len); | 552 | + JZSDK_LOG_INFO("当前播放的是%s %d\n",MusicName, MusicName_Len); |
553 | 553 | ||
554 | //回复操作成功 | 554 | //回复操作成功 |
555 | //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence); | 555 | //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence); |
@@ -566,7 +566,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | @@ -566,7 +566,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | ||
566 | static int Uart_DEV1_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | 566 | static int Uart_DEV1_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) |
567 | { | 567 | { |
568 | //查询软件版本号 | 568 | //查询软件版本号 |
569 | - USER_LOG_INFO("查询软件版本号\n"); | 569 | + JZSDK_LOG_INFO("查询软件版本号\n"); |
570 | //获取帧的序列号 | 570 | //获取帧的序列号 |
571 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 571 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
572 | 572 | ||
@@ -577,7 +577,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | @@ -577,7 +577,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | ||
577 | 577 | ||
578 | //1、获取版本号 | 578 | //1、获取版本号 |
579 | JZsdk_Uart_CheckStatus_SoftwareVersion(&majorVersion, &minorVersion, &modifyVersion, &debugVersion); | 579 | JZsdk_Uart_CheckStatus_SoftwareVersion(&majorVersion, &minorVersion, &modifyVersion, &debugVersion); |
580 | - USER_LOG_INFO("当前的软件版本号为:%2x, %2x, %2x, %2x",majorVersion, minorVersion, modifyVersion, debugVersion); | 580 | + JZSDK_LOG_INFO("当前的软件版本号为:%2x, %2x, %2x, %2x",majorVersion, minorVersion, modifyVersion, debugVersion); |
581 | 581 | ||
582 | //回复操作成功 | 582 | //回复操作成功 |
583 | //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence); | 583 | //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence); |
@@ -594,7 +594,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | @@ -594,7 +594,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | ||
594 | static int Uart_DEV1_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | 594 | static int Uart_DEV1_RecvDeal_CheckStatus_LoopPlay(char *getbuf) |
595 | { | 595 | { |
596 | //查询是否打开循环 | 596 | //查询是否打开循环 |
597 | - USER_LOG_INFO("查询是否打开循环\n"); | 597 | + JZSDK_LOG_INFO("查询是否打开循环\n"); |
598 | //获取帧的序列号 | 598 | //获取帧的序列号 |
599 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 599 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
600 | 600 | ||
@@ -602,7 +602,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | @@ -602,7 +602,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | ||
602 | int LoopStatus = JZsdk_Uart_CheckStatus_LoopPlay(); | 602 | int LoopStatus = JZsdk_Uart_CheckStatus_LoopPlay(); |
603 | if (LoopStatus < 0) | 603 | if (LoopStatus < 0) |
604 | { | 604 | { |
605 | - USER_LOG_INFO("循环状态获取失败"); | 605 | + JZSDK_LOG_INFO("循环状态获取失败"); |
606 | return -1; | 606 | return -1; |
607 | } | 607 | } |
608 | 608 | ||
@@ -621,7 +621,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | @@ -621,7 +621,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | ||
621 | static int Uart_DEV1_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | 621 | static int Uart_DEV1_RecvDeal_CheckStatus_TTS_tone(char *getbuf) |
622 | { | 622 | { |
623 | //查询音色 | 623 | //查询音色 |
624 | - USER_LOG_INFO("查询音色\n"); | 624 | + JZSDK_LOG_INFO("查询音色\n"); |
625 | //获取帧的序列号 | 625 | //获取帧的序列号 |
626 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 626 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
627 | 627 | ||
@@ -629,7 +629,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | @@ -629,7 +629,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | ||
629 | int TTS_tone = JZsdk_Uart_CheckStatus_TTS_tone(); | 629 | int TTS_tone = JZsdk_Uart_CheckStatus_TTS_tone(); |
630 | if (TTS_tone < 0) | 630 | if (TTS_tone < 0) |
631 | { | 631 | { |
632 | - USER_LOG_INFO("音色获取失败"); | 632 | + JZSDK_LOG_INFO("音色获取失败"); |
633 | return -1; | 633 | return -1; |
634 | } | 634 | } |
635 | 635 | ||
@@ -649,7 +649,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | @@ -649,7 +649,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | ||
649 | static int Uart_DEV1_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | 649 | static int Uart_DEV1_RecvDeal_CheckStatus_TTS_speed(char *getbuf) |
650 | { | 650 | { |
651 | //查询语速 | 651 | //查询语速 |
652 | - USER_LOG_INFO("查询语速\n"); | 652 | + JZSDK_LOG_INFO("查询语速\n"); |
653 | //获取帧的序列号 | 653 | //获取帧的序列号 |
654 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 654 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
655 | 655 | ||
@@ -657,7 +657,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | @@ -657,7 +657,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | ||
657 | int TTS_speed = JZsdk_Uart_CheckStatus_TTS_speed(); | 657 | int TTS_speed = JZsdk_Uart_CheckStatus_TTS_speed(); |
658 | if (TTS_speed < 0) | 658 | if (TTS_speed < 0) |
659 | { | 659 | { |
660 | - USER_LOG_INFO("语速获取失败"); | 660 | + JZSDK_LOG_INFO("语速获取失败"); |
661 | return -1; | 661 | return -1; |
662 | } | 662 | } |
663 | 663 | ||
@@ -678,7 +678,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | @@ -678,7 +678,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | ||
678 | **********/ | 678 | **********/ |
679 | static int Uart_DEV1_RecvDeal_PlayLoop(char *getbuf) | 679 | static int Uart_DEV1_RecvDeal_PlayLoop(char *getbuf) |
680 | { | 680 | { |
681 | - USER_LOG_INFO("开启关闭循环\n"); | 681 | + JZSDK_LOG_INFO("开启关闭循环\n"); |
682 | //获取帧的序列号 | 682 | //获取帧的序列号 |
683 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 683 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
684 | 684 | ||
@@ -708,7 +708,7 @@ static int Uart_DEV1_RecvDeal_PlayLoop(char *getbuf) | @@ -708,7 +708,7 @@ static int Uart_DEV1_RecvDeal_PlayLoop(char *getbuf) | ||
708 | **********/ | 708 | **********/ |
709 | static int Uart_DEV1_RecvDeal_Delete_Audio(char *getbuf) | 709 | static int Uart_DEV1_RecvDeal_Delete_Audio(char *getbuf) |
710 | { | 710 | { |
711 | - USER_LOG_INFO("删除音频操作\n"); | 711 | + JZSDK_LOG_INFO("删除音频操作\n"); |
712 | //获取帧的序列号 | 712 | //获取帧的序列号 |
713 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 713 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
714 | 714 | ||
@@ -741,7 +741,7 @@ static int Uart_DEV1_RecvDeal_Delete_Audio(char *getbuf) | @@ -741,7 +741,7 @@ static int Uart_DEV1_RecvDeal_Delete_Audio(char *getbuf) | ||
741 | **********/ | 741 | **********/ |
742 | static int Uart_DEV1_RecvDeal_Delete_VoiceRecord(char *getbuf) | 742 | static int Uart_DEV1_RecvDeal_Delete_VoiceRecord(char *getbuf) |
743 | { | 743 | { |
744 | - USER_LOG_INFO("删除录音操作\n"); | 744 | + JZSDK_LOG_INFO("删除录音操作\n"); |
745 | //获取帧的序列号 | 745 | //获取帧的序列号 |
746 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 746 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
747 | 747 | ||
@@ -783,7 +783,7 @@ static int Uart_DEV1_RecvDeal_Delete_VideoRecord() | @@ -783,7 +783,7 @@ static int Uart_DEV1_RecvDeal_Delete_VideoRecord() | ||
783 | **********/ | 783 | **********/ |
784 | static int Uart_DEV1_RecvDeal_TTS_SetTone(char *getbuf) | 784 | static int Uart_DEV1_RecvDeal_TTS_SetTone(char *getbuf) |
785 | { | 785 | { |
786 | - USER_LOG_INFO("tts设置音色\n"); | 786 | + JZSDK_LOG_INFO("tts设置音色\n"); |
787 | //获取帧的序列号 | 787 | //获取帧的序列号 |
788 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 788 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
789 | 789 | ||
@@ -811,16 +811,16 @@ static int Uart_DEV1_RecvDeal_TTS_SetTone(char *getbuf) | @@ -811,16 +811,16 @@ static int Uart_DEV1_RecvDeal_TTS_SetTone(char *getbuf) | ||
811 | **********/ | 811 | **********/ |
812 | static int Uart_DEV1_RecvDeal_TTS_SetSpeed(char *getbuf) | 812 | static int Uart_DEV1_RecvDeal_TTS_SetSpeed(char *getbuf) |
813 | { | 813 | { |
814 | - USER_LOG_INFO("设置语速\n"); | 814 | + JZSDK_LOG_INFO("设置语速\n"); |
815 | //获取帧的序列号 | 815 | //获取帧的序列号 |
816 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 816 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
817 | 817 | ||
818 | //1、从帧数据从获取语速 | 818 | //1、从帧数据从获取语速 |
819 | int speed = (int)getbuf[9]; | 819 | int speed = (int)getbuf[9]; |
820 | - USER_LOG_INFO("获取的语速为:%d",speed); | 820 | + JZSDK_LOG_INFO("获取的语速为:%d",speed); |
821 | if (speed > 100 || speed < 0) | 821 | if (speed > 100 || speed < 0) |
822 | { | 822 | { |
823 | - USER_LOG_INFO("语速超出范围\n"); | 823 | + JZSDK_LOG_INFO("语速超出范围\n"); |
824 | 824 | ||
825 | //回复操作失败 | 825 | //回复操作失败 |
826 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence); | 826 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence); |
@@ -851,7 +851,7 @@ static int Uart_DEV1_RecvDeal_TTS_SetSpeed(char *getbuf) | @@ -851,7 +851,7 @@ static int Uart_DEV1_RecvDeal_TTS_SetSpeed(char *getbuf) | ||
851 | // 0x5A 0x5A 0x77 0x00 0x0c 0x00 0x00 0x57 0x04 0x00 0x00 0x23 结束TTS发送 | 851 | // 0x5A 0x5A 0x77 0x00 0x0c 0x00 0x00 0x57 0x04 0x00 0x00 0x23 结束TTS发送 |
852 | static int Uart_DEV1_RecvDeal_TTS_Trans_start(char *getbuf) | 852 | static int Uart_DEV1_RecvDeal_TTS_Trans_start(char *getbuf) |
853 | { | 853 | { |
854 | - USER_LOG_INFO("tts开始传输"); | 854 | + JZSDK_LOG_INFO("tts开始传输"); |
855 | //获取帧的序列号 | 855 | //获取帧的序列号 |
856 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 856 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
857 | 857 | ||
@@ -875,7 +875,7 @@ static int Uart_DEV1_RecvDeal_TTS_Trans_start(char *getbuf) | @@ -875,7 +875,7 @@ static int Uart_DEV1_RecvDeal_TTS_Trans_start(char *getbuf) | ||
875 | **********/ | 875 | **********/ |
876 | static int Uart_DEV1_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | 876 | static int Uart_DEV1_RecvDeal_TTS_Trans_transmission(char *getdata, int len) |
877 | { | 877 | { |
878 | - USER_LOG_INFO("tts传输中"); | 878 | + JZSDK_LOG_INFO("tts传输中"); |
879 | 879 | ||
880 | if (TTS_Recv_buffer_length+len < 1000) | 880 | if (TTS_Recv_buffer_length+len < 1000) |
881 | { | 881 | { |
@@ -887,7 +887,7 @@ static int Uart_DEV1_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | @@ -887,7 +887,7 @@ static int Uart_DEV1_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | ||
887 | } | 887 | } |
888 | else | 888 | else |
889 | { | 889 | { |
890 | - USER_LOG_ERROR("TTS字数超出1000字节"); | 890 | + JZSDK_LOG_ERROR("TTS字数超出1000字节"); |
891 | } | 891 | } |
892 | } | 892 | } |
893 | 893 | ||
@@ -899,13 +899,13 @@ static int Uart_DEV1_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | @@ -899,13 +899,13 @@ static int Uart_DEV1_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | ||
899 | **********/ | 899 | **********/ |
900 | static int Uart_DEV1_RecvDeal_TTS_Trans_stop(char *getbuf) | 900 | static int Uart_DEV1_RecvDeal_TTS_Trans_stop(char *getbuf) |
901 | { | 901 | { |
902 | - USER_LOG_INFO("tts传输结束"); | 902 | + JZSDK_LOG_INFO("tts传输结束"); |
903 | //获取帧的序列号 | 903 | //获取帧的序列号 |
904 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 904 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
905 | 905 | ||
906 | 906 | ||
907 | //1、打印一次TTS文本 | 907 | //1、打印一次TTS文本 |
908 | - USER_LOG_INFO("TTS播放%s",TTS_Recv_buffer); | 908 | + JZSDK_LOG_INFO("TTS播放%s",TTS_Recv_buffer); |
909 | 909 | ||
910 | //2、播放TTS | 910 | //2、播放TTS |
911 | JZsdk_Uart_TTS_Play(UART_DEV_1, TTS_Recv_buffer, TTS_Recv_buffer_length); | 911 | JZsdk_Uart_TTS_Play(UART_DEV_1, TTS_Recv_buffer, TTS_Recv_buffer_length); |
@@ -923,7 +923,7 @@ static int Uart_DEV1_RecvDeal_TTS_Trans_stop(char *getbuf) | @@ -923,7 +923,7 @@ static int Uart_DEV1_RecvDeal_TTS_Trans_stop(char *getbuf) | ||
923 | **********/ | 923 | **********/ |
924 | static int Uart_DEV1_RecvDeal_OpusTrans_start(char *getbuf) | 924 | static int Uart_DEV1_RecvDeal_OpusTrans_start(char *getbuf) |
925 | { | 925 | { |
926 | - USER_LOG_INFO("打开opus传输\n"); | 926 | + JZSDK_LOG_INFO("打开opus传输\n"); |
927 | //获取帧的序列号 | 927 | //获取帧的序列号 |
928 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 928 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
929 | 929 | ||
@@ -940,7 +940,7 @@ static int Uart_DEV1_RecvDeal_OpusTrans_start(char *getbuf) | @@ -940,7 +940,7 @@ static int Uart_DEV1_RecvDeal_OpusTrans_start(char *getbuf) | ||
940 | //3、修改接收模式为传输opus | 940 | //3、修改接收模式为传输opus |
941 | JZsdk_Uart_RecvDeal_Set_UART_DEV1_Receive_mode(JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION); | 941 | JZsdk_Uart_RecvDeal_Set_UART_DEV1_Receive_mode(JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION); |
942 | 942 | ||
943 | - USER_LOG_INFO("已完成打开opus传输处理\n"); | 943 | + JZSDK_LOG_INFO("已完成打开opus传输处理\n"); |
944 | 944 | ||
945 | //回复操作成功 | 945 | //回复操作成功 |
946 | JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence); | 946 | JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence); |
@@ -955,7 +955,7 @@ static int Uart_DEV1_RecvDeal_OpusTrans_transmission(char *SaveData, int size) | @@ -955,7 +955,7 @@ static int Uart_DEV1_RecvDeal_OpusTrans_transmission(char *SaveData, int size) | ||
955 | { | 955 | { |
956 | JZsdk_Uart_SaveOpusTrans(SaveData,size); | 956 | JZsdk_Uart_SaveOpusTrans(SaveData,size); |
957 | 957 | ||
958 | - USER_LOG_INFO("已完成opus传输保存处理\n"); | 958 | + JZSDK_LOG_INFO("已完成opus传输保存处理\n"); |
959 | } | 959 | } |
960 | /********* | 960 | /********* |
961 | * | 961 | * |
@@ -965,13 +965,13 @@ static int Uart_DEV1_RecvDeal_OpusTrans_transmission(char *SaveData, int size) | @@ -965,13 +965,13 @@ static int Uart_DEV1_RecvDeal_OpusTrans_transmission(char *SaveData, int size) | ||
965 | **********/ | 965 | **********/ |
966 | static int Uart_DEV1_RecvDeal_OpusTrans_stop(char *getbuf) | 966 | static int Uart_DEV1_RecvDeal_OpusTrans_stop(char *getbuf) |
967 | { | 967 | { |
968 | - USER_LOG_INFO("结束opus传输\n"); | 968 | + JZSDK_LOG_INFO("结束opus传输\n"); |
969 | //获取帧的序列号 | 969 | //获取帧的序列号 |
970 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 970 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
971 | 971 | ||
972 | JZsdk_Uart_SaveOpusStop(); | 972 | JZsdk_Uart_SaveOpusStop(); |
973 | 973 | ||
974 | - USER_LOG_INFO("结束opus传输处理\n"); | 974 | + JZSDK_LOG_INFO("结束opus传输处理\n"); |
975 | 975 | ||
976 | //回复操作成功 | 976 | //回复操作成功 |
977 | JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence); | 977 | JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence); |
@@ -984,7 +984,7 @@ static int Uart_DEV1_RecvDeal_OpusTrans_stop(char *getbuf) | @@ -984,7 +984,7 @@ static int Uart_DEV1_RecvDeal_OpusTrans_stop(char *getbuf) | ||
984 | **********/ | 984 | **********/ |
985 | static int Uart_DEV1_RecvDeal_OpusPlay(char *getbuf) | 985 | static int Uart_DEV1_RecvDeal_OpusPlay(char *getbuf) |
986 | { | 986 | { |
987 | - USER_LOG_INFO("opus播放\n"); | 987 | + JZSDK_LOG_INFO("opus播放\n"); |
988 | //获取帧的序列号 | 988 | //获取帧的序列号 |
989 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 989 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
990 | 990 | ||
@@ -1004,7 +1004,7 @@ static int Uart_DEV1_RecvDeal_OpusPlay(char *getbuf) | @@ -1004,7 +1004,7 @@ static int Uart_DEV1_RecvDeal_OpusPlay(char *getbuf) | ||
1004 | **********/ | 1004 | **********/ |
1005 | static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_start(char *getbuf) | 1005 | static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_start(char *getbuf) |
1006 | { | 1006 | { |
1007 | - USER_LOG_INFO("开启opus实时喊话功能\n"); | 1007 | + JZSDK_LOG_INFO("开启opus实时喊话功能\n"); |
1008 | //获取帧的序列号 | 1008 | //获取帧的序列号 |
1009 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1009 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1010 | 1010 | ||
@@ -1039,7 +1039,7 @@ static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_start(char *getbuf) | @@ -1039,7 +1039,7 @@ static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_start(char *getbuf) | ||
1039 | **********/ | 1039 | **********/ |
1040 | static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int len) | 1040 | static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int len) |
1041 | { | 1041 | { |
1042 | - USER_LOG_INFO("opus语音传输中\n"); | 1042 | + JZSDK_LOG_INFO("opus语音传输中\n"); |
1043 | JZsdk_Uart_RealTimeVoiceTrans(getdata, len); | 1043 | JZsdk_Uart_RealTimeVoiceTrans(getdata, len); |
1044 | 1044 | ||
1045 | } | 1045 | } |
@@ -1051,7 +1051,7 @@ static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int | @@ -1051,7 +1051,7 @@ static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int | ||
1051 | **********/ | 1051 | **********/ |
1052 | static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf) | 1052 | static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf) |
1053 | { | 1053 | { |
1054 | - USER_LOG_INFO("关闭opus实时喊话功能\n"); | 1054 | + JZSDK_LOG_INFO("关闭opus实时喊话功能\n"); |
1055 | //获取帧的序列号 | 1055 | //获取帧的序列号 |
1056 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1056 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1057 | 1057 | ||
@@ -1081,7 +1081,7 @@ static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf) | @@ -1081,7 +1081,7 @@ static int Uart_DEV1_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf) | ||
1081 | **********/ | 1081 | **********/ |
1082 | static int Uart_DEV1_RecvDeal_Gimbal_PitchControl(char *getbuf) | 1082 | static int Uart_DEV1_RecvDeal_Gimbal_PitchControl(char *getbuf) |
1083 | { | 1083 | { |
1084 | - USER_LOG_INFO("云台俯仰控制\n"); | 1084 | + JZSDK_LOG_INFO("云台俯仰控制\n"); |
1085 | //获取帧的序列号 | 1085 | //获取帧的序列号 |
1086 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1086 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1087 | 1087 | ||
@@ -1102,13 +1102,13 @@ static int Uart_DEV1_RecvDeal_Gimbal_PitchControl(char *getbuf) | @@ -1102,13 +1102,13 @@ static int Uart_DEV1_RecvDeal_Gimbal_PitchControl(char *getbuf) | ||
1102 | } | 1102 | } |
1103 | else | 1103 | else |
1104 | { | 1104 | { |
1105 | - USER_LOG_INFO("云台输入角度符号错误,无法正常控制"); | 1105 | + JZSDK_LOG_INFO("云台输入角度符号错误,无法正常控制"); |
1106 | //回复操作失败 | 1106 | //回复操作失败 |
1107 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence); | 1107 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence); |
1108 | return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; | 1108 | return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; |
1109 | } | 1109 | } |
1110 | 1110 | ||
1111 | - USER_LOG_INFO("处理得到的角度是%d",Gimbal_angle); | 1111 | + JZSDK_LOG_INFO("处理得到的角度是%d",Gimbal_angle); |
1112 | 1112 | ||
1113 | T_JZsdkReturnCode ret = JZsdk_Uart_Gimbal_PitchControl(UART_DEV_1, Gimbal_angle); | 1113 | T_JZsdkReturnCode ret = JZsdk_Uart_Gimbal_PitchControl(UART_DEV_1, Gimbal_angle); |
1114 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 1114 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
@@ -1131,7 +1131,7 @@ static int Uart_DEV1_RecvDeal_Gimbal_PitchControl(char *getbuf) | @@ -1131,7 +1131,7 @@ static int Uart_DEV1_RecvDeal_Gimbal_PitchControl(char *getbuf) | ||
1131 | **********/ | 1131 | **********/ |
1132 | static int Uart_DEV1_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | 1132 | static int Uart_DEV1_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) |
1133 | { | 1133 | { |
1134 | - USER_LOG_INFO("云台俯仰微调角度\n"); | 1134 | + JZSDK_LOG_INFO("云台俯仰微调角度\n"); |
1135 | //获取帧的序列号 | 1135 | //获取帧的序列号 |
1136 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1136 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1137 | 1137 | ||
@@ -1139,7 +1139,7 @@ static int Uart_DEV1_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | @@ -1139,7 +1139,7 @@ static int Uart_DEV1_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | ||
1139 | int Gimbal_signal = getbuf[9]; | 1139 | int Gimbal_signal = getbuf[9]; |
1140 | 1140 | ||
1141 | //2、通过云台控制帧 获取云台角度绝对值 | 1141 | //2、通过云台控制帧 获取云台角度绝对值 |
1142 | - int Gimbal_angle = ((int)getbuf[10]) ; | 1142 | + int Gimbal_angle = (((int)getbuf[10]) << 8 ) + getbuf[11]; |
1143 | 1143 | ||
1144 | //3、拼接得到云台值 | 1144 | //3、拼接得到云台值 |
1145 | if (Gimbal_signal == 0x00) | 1145 | if (Gimbal_signal == 0x00) |
@@ -1152,13 +1152,13 @@ static int Uart_DEV1_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | @@ -1152,13 +1152,13 @@ static int Uart_DEV1_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | ||
1152 | } | 1152 | } |
1153 | else | 1153 | else |
1154 | { | 1154 | { |
1155 | - USER_LOG_INFO("云台俯仰微调角度符号错误,无法正常控制"); | 1155 | + JZSDK_LOG_INFO("云台俯仰微调角度符号错误,无法正常控制"); |
1156 | //回复操作失败 | 1156 | //回复操作失败 |
1157 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence); | 1157 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, FrameSequence); |
1158 | return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; | 1158 | return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; |
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | - USER_LOG_INFO("处理得到云台俯仰微调角度是%d",Gimbal_angle); | 1161 | + JZSDK_LOG_INFO("处理得到云台俯仰微调角度是%d",Gimbal_angle); |
1162 | 1162 | ||
1163 | JZsdk_Uart_Gimbal_PitchFineTuningControl(UART_DEV_1, FrameSequence ,Gimbal_angle); | 1163 | JZsdk_Uart_Gimbal_PitchFineTuningControl(UART_DEV_1, FrameSequence ,Gimbal_angle); |
1164 | 1164 | ||
@@ -1179,7 +1179,7 @@ static int Uart_DEV1_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | @@ -1179,7 +1179,7 @@ static int Uart_DEV1_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | ||
1179 | **********/ | 1179 | **********/ |
1180 | static int Uart_DEV1_RecvDeal_SearchLight_SetFrequency(char *getbuf) | 1180 | static int Uart_DEV1_RecvDeal_SearchLight_SetFrequency(char *getbuf) |
1181 | { | 1181 | { |
1182 | - USER_LOG_INFO("设置爆闪频率\n"); | 1182 | + JZSDK_LOG_INFO("设置爆闪频率\n"); |
1183 | //获取帧的序列号 | 1183 | //获取帧的序列号 |
1184 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1184 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1185 | 1185 | ||
@@ -1206,7 +1206,7 @@ static int Uart_DEV1_RecvDeal_SearchLight_SetFrequency(char *getbuf) | @@ -1206,7 +1206,7 @@ static int Uart_DEV1_RecvDeal_SearchLight_SetFrequency(char *getbuf) | ||
1206 | **********/ | 1206 | **********/ |
1207 | static int Uart_DEV1_RecvDeal_SearchLight_Control(char *getbuf) | 1207 | static int Uart_DEV1_RecvDeal_SearchLight_Control(char *getbuf) |
1208 | { | 1208 | { |
1209 | - USER_LOG_INFO("设置灯光控制\n"); | 1209 | + JZSDK_LOG_INFO("设置灯光控制\n"); |
1210 | //获取帧的序列号 | 1210 | //获取帧的序列号 |
1211 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1211 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1212 | 1212 | ||
@@ -1233,7 +1233,7 @@ static int Uart_DEV1_RecvDeal_SearchLight_Control(char *getbuf) | @@ -1233,7 +1233,7 @@ static int Uart_DEV1_RecvDeal_SearchLight_Control(char *getbuf) | ||
1233 | **********/ | 1233 | **********/ |
1234 | static int Uart_DEV1_RecvDeal_SearchLight_Lumen(char *getbuf) | 1234 | static int Uart_DEV1_RecvDeal_SearchLight_Lumen(char *getbuf) |
1235 | { | 1235 | { |
1236 | - USER_LOG_INFO("设置灯光亮度\n"); | 1236 | + JZSDK_LOG_INFO("设置灯光亮度\n"); |
1237 | //获取帧的序列号 | 1237 | //获取帧的序列号 |
1238 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1238 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1239 | 1239 | ||
@@ -1261,7 +1261,7 @@ static int Uart_DEV1_RecvDeal_SearchLight_Lumen(char *getbuf) | @@ -1261,7 +1261,7 @@ static int Uart_DEV1_RecvDeal_SearchLight_Lumen(char *getbuf) | ||
1261 | **********/ | 1261 | **********/ |
1262 | static int Uart_DEV1_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf) | 1262 | static int Uart_DEV1_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf) |
1263 | { | 1263 | { |
1264 | - USER_LOG_INFO("灯光属性查询\n"); | 1264 | + JZSDK_LOG_INFO("灯光属性查询\n"); |
1265 | //1、获取帧的序列号 | 1265 | //1、获取帧的序列号 |
1266 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1266 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1267 | 1267 | ||
@@ -1277,7 +1277,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf | @@ -1277,7 +1277,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf | ||
1277 | **********/ | 1277 | **********/ |
1278 | static int Uart_DEV1_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf) | 1278 | static int Uart_DEV1_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf) |
1279 | { | 1279 | { |
1280 | - USER_LOG_INFO("探照灯温度查询\n"); | 1280 | + JZSDK_LOG_INFO("探照灯温度查询\n"); |
1281 | //1、获取帧的序列号 | 1281 | //1、获取帧的序列号 |
1282 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1282 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1283 | 1283 | ||
@@ -1292,7 +1292,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf) | @@ -1292,7 +1292,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf) | ||
1292 | **********/ | 1292 | **********/ |
1293 | static int Uart_DEV1_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | 1293 | static int Uart_DEV1_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) |
1294 | { | 1294 | { |
1295 | - USER_LOG_INFO("消息订阅控制\n"); | 1295 | + JZSDK_LOG_INFO("消息订阅控制\n"); |
1296 | //获取帧的序列号 | 1296 | //获取帧的序列号 |
1297 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1297 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1298 | 1298 | ||
@@ -1312,6 +1312,55 @@ static int Uart_DEV1_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | @@ -1312,6 +1312,55 @@ static int Uart_DEV1_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | ||
1312 | } | 1312 | } |
1313 | } | 1313 | } |
1314 | 1314 | ||
1315 | +/********* | ||
1316 | + * | ||
1317 | + * 查询产品序列号 | ||
1318 | + * | ||
1319 | +**********/ | ||
1320 | +static int Uart_DEV1_RecvDeal_CheckStatus_SerialNumber(char *getbuf) | ||
1321 | +{ | ||
1322 | + JZSDK_LOG_INFO("消息订阅控制\n"); | ||
1323 | + //获取帧的序列号 | ||
1324 | + int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | ||
1325 | + | ||
1326 | + JZsdk_Uart_CheckStatus_SerialNumber(UART_DEV_1, FrameSequence); | ||
1327 | + | ||
1328 | +} | ||
1329 | + | ||
1330 | +/********* | ||
1331 | + * | ||
1332 | + * 对外供电开关 | ||
1333 | + * | ||
1334 | +**********/ | ||
1335 | +static int Uart_DEV1_RecvDeal_OutPutPower_Control(char *getbuf) | ||
1336 | +{ | ||
1337 | + printf("对外电源控制\n"); | ||
1338 | + //获取帧的序列号 | ||
1339 | + int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | ||
1340 | + | ||
1341 | + //获取控制值 | ||
1342 | + int Value = getbuf[9]; | ||
1343 | + | ||
1344 | + //控制 | ||
1345 | + JZsdk_Uart_OutPutPower_Control(UART_DEV_1, FrameSequence, Value); | ||
1346 | +} | ||
1347 | + | ||
1348 | +/********* | ||
1349 | + * | ||
1350 | + * 对外电源查询 | ||
1351 | + * | ||
1352 | +**********/ | ||
1353 | +static int Uart_DEV1_RecvDeal_Checkstatus_OutPutPower(char *getbuf) | ||
1354 | +{ | ||
1355 | + printf("对外电源查询\n"); | ||
1356 | + | ||
1357 | + //获取帧的序列号 | ||
1358 | + int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | ||
1359 | + | ||
1360 | + //获取本地数值 | ||
1361 | + JZsdk_Uart_Checkstatus_OutPutPower(UART_DEV_1, FrameSequence); | ||
1362 | +} | ||
1363 | + | ||
1315 | /******************************************************************************************************************************* | 1364 | /******************************************************************************************************************************* |
1316 | * | 1365 | * |
1317 | * 警灯部分 | 1366 | * 警灯部分 |
@@ -1324,7 +1373,7 @@ static int Uart_DEV1_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | @@ -1324,7 +1373,7 @@ static int Uart_DEV1_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | ||
1324 | **********/ | 1373 | **********/ |
1325 | static int Uart_DEV1_RecvDeal_WarningLight_ModeControl(char *getbuf) | 1374 | static int Uart_DEV1_RecvDeal_WarningLight_ModeControl(char *getbuf) |
1326 | { | 1375 | { |
1327 | - USER_LOG_INFO("警灯模式控制\n"); | 1376 | + JZSDK_LOG_INFO("警灯模式控制\n"); |
1328 | //获取帧的序列号 | 1377 | //获取帧的序列号 |
1329 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1378 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1330 | 1379 | ||
@@ -1352,7 +1401,7 @@ static int Uart_DEV1_RecvDeal_WarningLight_ModeControl(char *getbuf) | @@ -1352,7 +1401,7 @@ static int Uart_DEV1_RecvDeal_WarningLight_ModeControl(char *getbuf) | ||
1352 | **********/ | 1401 | **********/ |
1353 | static int Uart_DEV1_RecvDeal_WarningLight_SetColor(char *getbuf) | 1402 | static int Uart_DEV1_RecvDeal_WarningLight_SetColor(char *getbuf) |
1354 | { | 1403 | { |
1355 | - USER_LOG_INFO("警灯颜色选择\n"); | 1404 | + JZSDK_LOG_INFO("警灯颜色选择\n"); |
1356 | //获取帧的序列号 | 1405 | //获取帧的序列号 |
1357 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1406 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1358 | 1407 | ||
@@ -1380,7 +1429,7 @@ static int Uart_DEV1_RecvDeal_WarningLight_SetColor(char *getbuf) | @@ -1380,7 +1429,7 @@ static int Uart_DEV1_RecvDeal_WarningLight_SetColor(char *getbuf) | ||
1380 | **********/ | 1429 | **********/ |
1381 | static int Uart_DEV1_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf) | 1430 | static int Uart_DEV1_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf) |
1382 | { | 1431 | { |
1383 | - USER_LOG_INFO("警灯状态查询\n"); | 1432 | + JZSDK_LOG_INFO("警灯状态查询\n"); |
1384 | //1、获取帧的序列号 | 1433 | //1、获取帧的序列号 |
1385 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1434 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1386 | 1435 | ||
@@ -1396,7 +1445,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf) | @@ -1396,7 +1445,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf) | ||
1396 | **********/ | 1445 | **********/ |
1397 | static int Uart_DEV1_RecvDeal_CheckStatus_WarningLightColor(char *getbuf) | 1446 | static int Uart_DEV1_RecvDeal_CheckStatus_WarningLightColor(char *getbuf) |
1398 | { | 1447 | { |
1399 | - USER_LOG_INFO("警灯颜色查询\n"); | 1448 | + JZSDK_LOG_INFO("警灯颜色查询\n"); |
1400 | //1、获取帧的序列号 | 1449 | //1、获取帧的序列号 |
1401 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1450 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1402 | 1451 | ||
@@ -1435,7 +1484,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_WarningLightColor(char *getbuf) | @@ -1435,7 +1484,7 @@ static int Uart_DEV1_RecvDeal_CheckStatus_WarningLightColor(char *getbuf) | ||
1435 | **********/ | 1484 | **********/ |
1436 | static int Uart_DEV1_RecvDeal_ObtainSearchLight_Frequency(char *getbuf) | 1485 | static int Uart_DEV1_RecvDeal_ObtainSearchLight_Frequency(char *getbuf) |
1437 | { | 1486 | { |
1438 | - USER_LOG_INFO("收到灯光频率\n"); | 1487 | + JZSDK_LOG_INFO("收到灯光频率\n"); |
1439 | //获取帧的序列号 | 1488 | //获取帧的序列号 |
1440 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1489 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1441 | 1490 | ||
@@ -1453,7 +1502,7 @@ static int Uart_DEV1_RecvDeal_ObtainSearchLight_Frequency(char *getbuf) | @@ -1453,7 +1502,7 @@ static int Uart_DEV1_RecvDeal_ObtainSearchLight_Frequency(char *getbuf) | ||
1453 | **********/ | 1502 | **********/ |
1454 | static int Uart_DEV1_RecvDeal_ObtainSearchLight_Mode(char *getbuf) | 1503 | static int Uart_DEV1_RecvDeal_ObtainSearchLight_Mode(char *getbuf) |
1455 | { | 1504 | { |
1456 | - USER_LOG_INFO("收到灯光模式\n"); | 1505 | + JZSDK_LOG_INFO("收到灯光模式\n"); |
1457 | //获取帧的序列号 | 1506 | //获取帧的序列号 |
1458 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1507 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1459 | 1508 | ||
@@ -1471,7 +1520,7 @@ static int Uart_DEV1_RecvDeal_ObtainSearchLight_Mode(char *getbuf) | @@ -1471,7 +1520,7 @@ static int Uart_DEV1_RecvDeal_ObtainSearchLight_Mode(char *getbuf) | ||
1471 | **********/ | 1520 | **********/ |
1472 | static int Uart_DEV1_RecvDeal_ObtainSearchLight_Lumen(char *getbuf) | 1521 | static int Uart_DEV1_RecvDeal_ObtainSearchLight_Lumen(char *getbuf) |
1473 | { | 1522 | { |
1474 | - USER_LOG_INFO("收到灯光亮度\n"); | 1523 | + JZSDK_LOG_INFO("收到灯光亮度\n"); |
1475 | //获取帧的序列号 | 1524 | //获取帧的序列号 |
1476 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1525 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1477 | 1526 | ||
@@ -1490,7 +1539,7 @@ static int Uart_DEV1_RecvDeal_ObtainSearchLight_Lumen(char *getbuf) | @@ -1490,7 +1539,7 @@ static int Uart_DEV1_RecvDeal_ObtainSearchLight_Lumen(char *getbuf) | ||
1490 | **********/ | 1539 | **********/ |
1491 | static int Uart_DEV1_RecvDeal_ObtainSearchLight_Temperature(char *getbuf) | 1540 | static int Uart_DEV1_RecvDeal_ObtainSearchLight_Temperature(char *getbuf) |
1492 | { | 1541 | { |
1493 | - USER_LOG_INFO("收到探照灯温度\n"); | 1542 | + JZSDK_LOG_INFO("收到探照灯温度\n"); |
1494 | //获取帧的序列号 | 1543 | //获取帧的序列号 |
1495 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1544 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1496 | 1545 | ||
@@ -1509,7 +1558,7 @@ static int Uart_DEV1_RecvDeal_ObtainSearchLight_Temperature(char *getbuf) | @@ -1509,7 +1558,7 @@ static int Uart_DEV1_RecvDeal_ObtainSearchLight_Temperature(char *getbuf) | ||
1509 | **********/ | 1558 | **********/ |
1510 | static int Uart_DEV1_RecvDeal_ObtainGimbal_Pitch(char *getbuf) | 1559 | static int Uart_DEV1_RecvDeal_ObtainGimbal_Pitch(char *getbuf) |
1511 | { | 1560 | { |
1512 | - USER_LOG_INFO("收到云台俯仰\n"); | 1561 | + JZSDK_LOG_INFO("收到云台俯仰\n"); |
1513 | //获取帧的序列号 | 1562 | //获取帧的序列号 |
1514 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1563 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1515 | 1564 | ||
@@ -1540,7 +1589,7 @@ static int Uart_DEV1_RecvDeal_ObtainGimbal_Pitch(char *getbuf) | @@ -1540,7 +1589,7 @@ static int Uart_DEV1_RecvDeal_ObtainGimbal_Pitch(char *getbuf) | ||
1540 | **********/ | 1589 | **********/ |
1541 | static int Uart_DEV1_RecvDeal_ObtainGimbal_Yaw(char *getbuf) | 1590 | static int Uart_DEV1_RecvDeal_ObtainGimbal_Yaw(char *getbuf) |
1542 | { | 1591 | { |
1543 | - USER_LOG_INFO("收到云台航向\n"); | 1592 | + JZSDK_LOG_INFO("收到云台航向\n"); |
1544 | //获取帧的序列号 | 1593 | //获取帧的序列号 |
1545 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1594 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1546 | 1595 | ||
@@ -1578,7 +1627,7 @@ static int Uart_DEV1_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf) | @@ -1578,7 +1627,7 @@ static int Uart_DEV1_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf) | ||
1578 | int signal = getbuf[9]; | 1627 | int signal = getbuf[9]; |
1579 | 1628 | ||
1580 | //2、获取云台角度绝对值 | 1629 | //2、获取云台角度绝对值 |
1581 | - int pitch = (int)getbuf[10] ; | 1630 | + int pitch = (((int)getbuf[10]) << 8 ) + getbuf[11]; |
1582 | 1631 | ||
1583 | //3、拼接得到云台值 | 1632 | //3、拼接得到云台值 |
1584 | if (signal == 0x00) | 1633 | if (signal == 0x00) |
@@ -1600,7 +1649,7 @@ static int Uart_DEV1_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf) | @@ -1600,7 +1649,7 @@ static int Uart_DEV1_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf) | ||
1600 | **********/ | 1649 | **********/ |
1601 | static int Uart_DEV1_RecvDeal_ObtainWaringlight_Status(char *getbuf) | 1650 | static int Uart_DEV1_RecvDeal_ObtainWaringlight_Status(char *getbuf) |
1602 | { | 1651 | { |
1603 | - USER_LOG_INFO("收到警灯状态\n"); | 1652 | + JZSDK_LOG_INFO("收到警灯状态\n"); |
1604 | //获取帧的序列号 | 1653 | //获取帧的序列号 |
1605 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1654 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1606 | 1655 | ||
@@ -1619,7 +1668,7 @@ static int Uart_DEV1_RecvDeal_ObtainWaringlight_Status(char *getbuf) | @@ -1619,7 +1668,7 @@ static int Uart_DEV1_RecvDeal_ObtainWaringlight_Status(char *getbuf) | ||
1619 | **********/ | 1668 | **********/ |
1620 | static int Uart_DEV1_RecvDeal_ObtainWaringlight_Color(char *getbuf) | 1669 | static int Uart_DEV1_RecvDeal_ObtainWaringlight_Color(char *getbuf) |
1621 | { | 1670 | { |
1622 | - USER_LOG_INFO("收到警灯颜色\n"); | 1671 | + JZSDK_LOG_INFO("收到警灯颜色\n"); |
1623 | //获取帧的序列号 | 1672 | //获取帧的序列号 |
1624 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1673 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1625 | 1674 | ||
@@ -1638,7 +1687,7 @@ static int Uart_DEV1_RecvDeal_ObtainWaringlight_Color(char *getbuf) | @@ -1638,7 +1687,7 @@ static int Uart_DEV1_RecvDeal_ObtainWaringlight_Color(char *getbuf) | ||
1638 | **********/ | 1687 | **********/ |
1639 | static int Uart_DEV1_RecvDeal_ObtainSerialNumber(char *getbuf) | 1688 | static int Uart_DEV1_RecvDeal_ObtainSerialNumber(char *getbuf) |
1640 | { | 1689 | { |
1641 | - USER_LOG_INFO("收到产品序列号\n"); | 1690 | + JZSDK_LOG_INFO("收到产品序列号\n"); |
1642 | //获取帧的序列号 | 1691 | //获取帧的序列号 |
1643 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1692 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1644 | 1693 | ||
@@ -1669,7 +1718,7 @@ static int Uart_DEV1_RecvDeal_ObtainSerialNumber(char *getbuf) | @@ -1669,7 +1718,7 @@ static int Uart_DEV1_RecvDeal_ObtainSerialNumber(char *getbuf) | ||
1669 | **********/ | 1718 | **********/ |
1670 | static int Uart_DEV1_RecvDeal_QuerySecondaryDeviceName(char *getbuf) | 1719 | static int Uart_DEV1_RecvDeal_QuerySecondaryDeviceName(char *getbuf) |
1671 | { | 1720 | { |
1672 | - USER_LOG_INFO("查询当前从设备名\n"); | 1721 | + JZSDK_LOG_INFO("查询当前从设备名\n"); |
1673 | 1722 | ||
1674 | //获取帧的序列号 | 1723 | //获取帧的序列号 |
1675 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1724 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
@@ -1698,7 +1747,7 @@ static int Uart_DEV1_RecvDeal_QuerySecondaryDeviceName(char *getbuf) | @@ -1698,7 +1747,7 @@ static int Uart_DEV1_RecvDeal_QuerySecondaryDeviceName(char *getbuf) | ||
1698 | **********/ | 1747 | **********/ |
1699 | static int Uart_DEV1_RecvDeal_SetGimbalRange(char *getbuf) | 1748 | static int Uart_DEV1_RecvDeal_SetGimbalRange(char *getbuf) |
1700 | { | 1749 | { |
1701 | - USER_LOG_INFO("设置云台最大值最小值\n"); | 1750 | + JZSDK_LOG_INFO("设置云台最大值最小值\n"); |
1702 | //获取帧的序列号 | 1751 | //获取帧的序列号 |
1703 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1752 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1704 | 1753 | ||
@@ -1725,7 +1774,7 @@ static int Uart_DEV1_RecvDeal_SetGimbalRange(char *getbuf) | @@ -1725,7 +1774,7 @@ static int Uart_DEV1_RecvDeal_SetGimbalRange(char *getbuf) | ||
1725 | **********/ | 1774 | **********/ |
1726 | static int Uart_DEV1_RecvDeal_GimbalLinkageControl(char *getbuf) | 1775 | static int Uart_DEV1_RecvDeal_GimbalLinkageControl(char *getbuf) |
1727 | { | 1776 | { |
1728 | - USER_LOG_INFO("设置云台联动\n"); | 1777 | + JZSDK_LOG_INFO("设置云台联动\n"); |
1729 | 1778 | ||
1730 | //获取帧的序列号 | 1779 | //获取帧的序列号 |
1731 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1780 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
@@ -1745,7 +1794,7 @@ static int Uart_DEV1_RecvDeal_GimbalLinkageControl(char *getbuf) | @@ -1745,7 +1794,7 @@ static int Uart_DEV1_RecvDeal_GimbalLinkageControl(char *getbuf) | ||
1745 | **********/ | 1794 | **********/ |
1746 | static int Uart_DEV1_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf) | 1795 | static int Uart_DEV1_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf) |
1747 | { | 1796 | { |
1748 | - USER_LOG_INFO("收到查询是否开启云台联动\n"); | 1797 | + JZSDK_LOG_INFO("收到查询是否开启云台联动\n"); |
1749 | 1798 | ||
1750 | //获取帧的序列号 | 1799 | //获取帧的序列号 |
1751 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1800 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
@@ -1779,7 +1828,7 @@ static int Uart_DEV1_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf) | @@ -1779,7 +1828,7 @@ static int Uart_DEV1_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf) | ||
1779 | **********/ | 1828 | **********/ |
1780 | static int Uart_DEV1_RecvDeal_ObtainSecondaryDeviceName(char *getbuf) | 1829 | static int Uart_DEV1_RecvDeal_ObtainSecondaryDeviceName(char *getbuf) |
1781 | { | 1830 | { |
1782 | - USER_LOG_INFO("收到从设备名\n"); | 1831 | + JZSDK_LOG_INFO("收到从设备名\n"); |
1783 | //获取帧的序列号 | 1832 | //获取帧的序列号 |
1784 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1833 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1785 | 1834 | ||
@@ -1811,7 +1860,7 @@ static int Uart_DEV1_RecvDeal_ObtainSecondaryDeviceName(char *getbuf) | @@ -1811,7 +1860,7 @@ static int Uart_DEV1_RecvDeal_ObtainSecondaryDeviceName(char *getbuf) | ||
1811 | **********/ | 1860 | **********/ |
1812 | static int Uart_DEV1_RecvDeal_ObtainGimbalLinkage(char *getbuf) | 1861 | static int Uart_DEV1_RecvDeal_ObtainGimbalLinkage(char *getbuf) |
1813 | { | 1862 | { |
1814 | - USER_LOG_INFO("收到云台联动值\n"); | 1863 | + JZSDK_LOG_INFO("收到云台联动值\n"); |
1815 | //获取帧的序列号 | 1864 | //获取帧的序列号 |
1816 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1865 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1817 | 1866 | ||
@@ -1846,7 +1895,7 @@ static int Uart_DEV1_RecvDeal_ObtainGimbalLinkage(char *getbuf) | @@ -1846,7 +1895,7 @@ static int Uart_DEV1_RecvDeal_ObtainGimbalLinkage(char *getbuf) | ||
1846 | **********/ | 1895 | **********/ |
1847 | static int Uart_DEV1_RecvDeal_FrameErrorReply(char *getbuf) | 1896 | static int Uart_DEV1_RecvDeal_FrameErrorReply(char *getbuf) |
1848 | { | 1897 | { |
1849 | - USER_LOG_ERROR("帧指令错误:帧错误或者是帧无对应操作\n"); | 1898 | + JZSDK_LOG_ERROR("帧指令错误:帧错误或者是帧无对应操作\n"); |
1850 | //无法正常获取帧的序列号 | 1899 | //无法正常获取帧的序列号 |
1851 | //回复操作失败 | 1900 | //回复操作失败 |
1852 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, 0x00); | 1901 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_1, 0x00); |
@@ -1861,7 +1910,7 @@ static int Uart_DEV1_RecvDeal_FrameErrorReply(char *getbuf) | @@ -1861,7 +1910,7 @@ static int Uart_DEV1_RecvDeal_FrameErrorReply(char *getbuf) | ||
1861 | **********/ | 1910 | **********/ |
1862 | static int Uart_DEV1_RecvDeal_OperationSuccessful(char *getbuf) | 1911 | static int Uart_DEV1_RecvDeal_OperationSuccessful(char *getbuf) |
1863 | { | 1912 | { |
1864 | - USER_LOG_INFO("接受到操作成功\n"); | 1913 | + JZSDK_LOG_INFO("接受到操作成功\n"); |
1865 | } | 1914 | } |
1866 | 1915 | ||
1867 | /********* | 1916 | /********* |
@@ -1872,7 +1921,7 @@ static int Uart_DEV1_RecvDeal_OperationSuccessful(char *getbuf) | @@ -1872,7 +1921,7 @@ static int Uart_DEV1_RecvDeal_OperationSuccessful(char *getbuf) | ||
1872 | **********/ | 1921 | **********/ |
1873 | static int Uart_DEV1_RecvDeal_OperationFailed(char *getbuf) | 1922 | static int Uart_DEV1_RecvDeal_OperationFailed(char *getbuf) |
1874 | { | 1923 | { |
1875 | - USER_LOG_INFO("接受到操作失败\n"); | 1924 | + JZSDK_LOG_INFO("接受到操作失败\n"); |
1876 | } | 1925 | } |
1877 | /******************************************************************************************************** | 1926 | /******************************************************************************************************** |
1878 | ********* ********| | 1927 | ********* ********| |
@@ -1889,7 +1938,7 @@ static int Uart_DEV1_RecvDeal_OperationFailed(char *getbuf) | @@ -1889,7 +1938,7 @@ static int Uart_DEV1_RecvDeal_OperationFailed(char *getbuf) | ||
1889 | *********************************************************************************************************/ | 1938 | *********************************************************************************************************/ |
1890 | int Uart_DEV1_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len) | 1939 | int Uart_DEV1_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len) |
1891 | { | 1940 | { |
1892 | - USER_LOG_INFO("串口设备1号,接受到的模式为:%x",Receive_mode); | 1941 | + JZSDK_LOG_INFO("串口设备1号,接受到的模式为:%x",Receive_mode); |
1893 | switch (Receive_mode) | 1942 | switch (Receive_mode) |
1894 | { | 1943 | { |
1895 | /******************************************************************************************************************************* | 1944 | /******************************************************************************************************************************* |
@@ -2197,10 +2246,21 @@ int Uart_DEV1_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le | @@ -2197,10 +2246,21 @@ int Uart_DEV1_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le | ||
2197 | 2246 | ||
2198 | //序列号查询 | 2247 | //序列号查询 |
2199 | case JZ_INSCODE_5AFRAME_CHECKSTATUS_SERIALNUMBER: | 2248 | case JZ_INSCODE_5AFRAME_CHECKSTATUS_SERIALNUMBER: |
2249 | + Uart_DEV1_RecvDeal_CheckStatus_SerialNumber(getdata); | ||
2250 | + break; | ||
2251 | + | ||
2252 | + //向外供电开关 | ||
2253 | + case JZ_INSCODE_5AFRAME_OUTPUTPOWER_CONTROL: | ||
2254 | + Uart_DEV1_RecvDeal_OutPutPower_Control(getdata); | ||
2255 | + break; | ||
2200 | 2256 | ||
2257 | + //查询向外供电情况 | ||
2258 | + case JZ_INSCODE_5AFRAME_CHECKSTATUS_OUTPUTPOWER: | ||
2259 | + Uart_DEV1_RecvDeal_Checkstatus_OutPutPower(getdata); | ||
2201 | break; | 2260 | break; |
2202 | 2261 | ||
2203 | 2262 | ||
2263 | + | ||
2204 | /******************************************************************************************************************************* | 2264 | /******************************************************************************************************************************* |
2205 | * | 2265 | * |
2206 | * 5B类部分 | 2266 | * 5B类部分 |
@@ -2588,7 +2648,7 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV1(unsigned char *getbuf, int len) | @@ -2588,7 +2648,7 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV1(unsigned char *getbuf, int len) | ||
2588 | * ****************/ | 2648 | * ****************/ |
2589 | int JZsdk_Uart_RecvDeal_Set_UART_DEV1_Receive_mode(int value) | 2649 | int JZsdk_Uart_RecvDeal_Set_UART_DEV1_Receive_mode(int value) |
2590 | { | 2650 | { |
2591 | - USER_LOG_INFO("串口设备1号,二次修改接收模式%x\n",value); | 2651 | + JZSDK_LOG_INFO("串口设备1号,二次修改接收模式%x\n",value); |
2592 | UART_DEV1_Receive_mode = value; | 2652 | UART_DEV1_Receive_mode = value; |
2593 | return 0; | 2653 | return 0; |
2594 | } | 2654 | } |
@@ -39,7 +39,7 @@ int JZsdk_Uart_RecvDeal_Set_UART_DEV2_Receive_mode(int value); | @@ -39,7 +39,7 @@ int JZsdk_Uart_RecvDeal_Set_UART_DEV2_Receive_mode(int value); | ||
39 | **********/ | 39 | **********/ |
40 | static int Uart_DEV2_RecvDeal_AskForConnect(char *getbuf) | 40 | static int Uart_DEV2_RecvDeal_AskForConnect(char *getbuf) |
41 | { | 41 | { |
42 | - USER_LOG_INFO("串口设备2号,连接成功"); | 42 | + JZSDK_LOG_INFO("串口设备2号,连接成功"); |
43 | //获取帧的序列号 | 43 | //获取帧的序列号 |
44 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 44 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
45 | 45 | ||
@@ -67,7 +67,7 @@ static int Uart_DEV2_RecvDeal_AskForConnect(char *getbuf) | @@ -67,7 +67,7 @@ static int Uart_DEV2_RecvDeal_AskForConnect(char *getbuf) | ||
67 | **********/ | 67 | **********/ |
68 | static int Uart_DEV2_RecvDeal_RealTimeMP2_start(char *getbuf) | 68 | static int Uart_DEV2_RecvDeal_RealTimeMP2_start(char *getbuf) |
69 | { | 69 | { |
70 | - USER_LOG_INFO("开启MP2实时喊话功能\n"); | 70 | + JZSDK_LOG_INFO("开启MP2实时喊话功能\n"); |
71 | T_JZsdkReturnCode ret; | 71 | T_JZsdkReturnCode ret; |
72 | 72 | ||
73 | //获取帧的序列号 | 73 | //获取帧的序列号 |
@@ -111,7 +111,7 @@ static int Uart_DEV2_RecvDeal_RealTimeMP2_start(char *getbuf) | @@ -111,7 +111,7 @@ static int Uart_DEV2_RecvDeal_RealTimeMP2_start(char *getbuf) | ||
111 | **********/ | 111 | **********/ |
112 | static int Uart_DEV2_RecvDeal_RealTimeMP2_transmission(char *getdata, int len) | 112 | static int Uart_DEV2_RecvDeal_RealTimeMP2_transmission(char *getdata, int len) |
113 | { | 113 | { |
114 | - USER_LOG_INFO("MP2实时喊话传输中\n"); | 114 | + JZSDK_LOG_INFO("MP2实时喊话传输中\n"); |
115 | T_JZsdkReturnCode ret; | 115 | T_JZsdkReturnCode ret; |
116 | 116 | ||
117 | //传输数据接口 | 117 | //传输数据接口 |
@@ -126,7 +126,7 @@ static int Uart_DEV2_RecvDeal_RealTimeMP2_transmission(char *getdata, int len) | @@ -126,7 +126,7 @@ static int Uart_DEV2_RecvDeal_RealTimeMP2_transmission(char *getdata, int len) | ||
126 | **********/ | 126 | **********/ |
127 | static int Uart_DEV2_RecvDeal_RealTimeMP2_stop(char *getbuf) | 127 | static int Uart_DEV2_RecvDeal_RealTimeMP2_stop(char *getbuf) |
128 | { | 128 | { |
129 | - USER_LOG_INFO("关闭MP2实时喊话功能\n"); | 129 | + JZSDK_LOG_INFO("关闭MP2实时喊话功能\n"); |
130 | T_JZsdkReturnCode ret; | 130 | T_JZsdkReturnCode ret; |
131 | 131 | ||
132 | //获取帧的序列号 | 132 | //获取帧的序列号 |
@@ -157,7 +157,7 @@ static int Uart_DEV2_RecvDeal_RealTimeMP2_stop(char *getbuf) | @@ -157,7 +157,7 @@ static int Uart_DEV2_RecvDeal_RealTimeMP2_stop(char *getbuf) | ||
157 | **********/ | 157 | **********/ |
158 | static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | 158 | static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) |
159 | { | 159 | { |
160 | - USER_LOG_INFO("开始传输的音频文件保存\n"); | 160 | + JZSDK_LOG_INFO("开始传输的音频文件保存\n"); |
161 | //获取帧的序列号 | 161 | //获取帧的序列号 |
162 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 162 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
163 | 163 | ||
@@ -168,7 +168,7 @@ static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | @@ -168,7 +168,7 @@ static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | ||
168 | char FileName[1024]; | 168 | char FileName[1024]; |
169 | memset(FileName,0,1024); | 169 | memset(FileName,0,1024); |
170 | memcpy(FileName, &getbuf[9], FileNameLen); | 170 | memcpy(FileName, &getbuf[9], FileNameLen); |
171 | - USER_LOG_INFO("保存的文件名为%s",FileName); | 171 | + JZSDK_LOG_INFO("保存的文件名为%s",FileName); |
172 | 172 | ||
173 | T_JZsdkReturnCode ret = JZsdk_Uart_SaveAudioFileStart(FileName); | 173 | T_JZsdkReturnCode ret = JZsdk_Uart_SaveAudioFileStart(FileName); |
174 | if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 174 | if (ret != JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
@@ -192,7 +192,7 @@ static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | @@ -192,7 +192,7 @@ static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_start(char *getbuf, int len) | ||
192 | **********/ | 192 | **********/ |
193 | static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int len) | 193 | static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int len) |
194 | { | 194 | { |
195 | - USER_LOG_INFO("传输音频文件中\n"); | 195 | + JZSDK_LOG_INFO("传输音频文件中\n"); |
196 | JZsdk_Uart_SaveAudioFileTrans(getdata, len); | 196 | JZsdk_Uart_SaveAudioFileTrans(getdata, len); |
197 | } | 197 | } |
198 | /********* | 198 | /********* |
@@ -203,7 +203,7 @@ static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int | @@ -203,7 +203,7 @@ static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_transmission(char *getdata, int | ||
203 | **********/ | 203 | **********/ |
204 | static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_stop(char *getbuf) | 204 | static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_stop(char *getbuf) |
205 | { | 205 | { |
206 | - USER_LOG_INFO("开始传输的音频文件保存\n"); | 206 | + JZSDK_LOG_INFO("开始传输的音频文件保存\n"); |
207 | //获取帧的序列号 | 207 | //获取帧的序列号 |
208 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 208 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
209 | 209 | ||
@@ -223,7 +223,7 @@ static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_stop(char *getbuf) | @@ -223,7 +223,7 @@ static int Uart_DEV2_RecvDeal_SaveAudioFileTrans_stop(char *getbuf) | ||
223 | static int Uart_DEV2_RecvDeal_audio_PlayFile(char *getbuf) | 223 | static int Uart_DEV2_RecvDeal_audio_PlayFile(char *getbuf) |
224 | { | 224 | { |
225 | T_JZsdkReturnCode ret; | 225 | T_JZsdkReturnCode ret; |
226 | - USER_LOG_INFO("播放指定音频\n"); | 226 | + JZSDK_LOG_INFO("播放指定音频\n"); |
227 | //获取帧的序列号 | 227 | //获取帧的序列号 |
228 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 228 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
229 | 229 | ||
@@ -238,7 +238,7 @@ static int Uart_DEV2_RecvDeal_audio_PlayFile(char *getbuf) | @@ -238,7 +238,7 @@ static int Uart_DEV2_RecvDeal_audio_PlayFile(char *getbuf) | ||
238 | memset(music_name, 0, 256); | 238 | memset(music_name, 0, 256); |
239 | memcpy(music_name, &getbuf[9], datasize); | 239 | memcpy(music_name, &getbuf[9], datasize); |
240 | 240 | ||
241 | - USER_LOG_INFO("播放指定音频:%s\n",music_name); | 241 | + JZSDK_LOG_INFO("播放指定音频:%s\n",music_name); |
242 | 242 | ||
243 | ret = JZsdk_Uart_PlayMusic(UART_DEV_2, music_name, datasize); | 243 | ret = JZsdk_Uart_PlayMusic(UART_DEV_2, music_name, datasize); |
244 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 244 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
@@ -260,7 +260,7 @@ static int Uart_DEV2_RecvDeal_audio_PlayFile(char *getbuf) | @@ -260,7 +260,7 @@ static int Uart_DEV2_RecvDeal_audio_PlayFile(char *getbuf) | ||
260 | **********/ | 260 | **********/ |
261 | static int Uart_DEV2_RecvDeal_audio_PlayContinue(char *getbuf) | 261 | static int Uart_DEV2_RecvDeal_audio_PlayContinue(char *getbuf) |
262 | { | 262 | { |
263 | - USER_LOG_INFO("音频继续播放\n"); | 263 | + JZSDK_LOG_INFO("音频继续播放\n"); |
264 | //获取帧的序列号 | 264 | //获取帧的序列号 |
265 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 265 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
266 | 266 | ||
@@ -277,7 +277,7 @@ static int Uart_DEV2_RecvDeal_audio_PlayContinue(char *getbuf) | @@ -277,7 +277,7 @@ static int Uart_DEV2_RecvDeal_audio_PlayContinue(char *getbuf) | ||
277 | **********/ | 277 | **********/ |
278 | static int Uart_DEV2_RecvDeal_audio_PlayPause(char *getbuf) | 278 | static int Uart_DEV2_RecvDeal_audio_PlayPause(char *getbuf) |
279 | { | 279 | { |
280 | - USER_LOG_INFO("音频暂停播放\n"); | 280 | + JZSDK_LOG_INFO("音频暂停播放\n"); |
281 | //获取帧的序列号 | 281 | //获取帧的序列号 |
282 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 282 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
283 | 283 | ||
@@ -294,7 +294,7 @@ static int Uart_DEV2_RecvDeal_audio_PlayPause(char *getbuf) | @@ -294,7 +294,7 @@ static int Uart_DEV2_RecvDeal_audio_PlayPause(char *getbuf) | ||
294 | **********/ | 294 | **********/ |
295 | static int Uart_DEV2_RecvDeal_audio_PlayStop(char *getbuf) | 295 | static int Uart_DEV2_RecvDeal_audio_PlayStop(char *getbuf) |
296 | { | 296 | { |
297 | - USER_LOG_INFO("音频停止播放\n"); | 297 | + JZSDK_LOG_INFO("音频停止播放\n"); |
298 | //获取帧的序列号 | 298 | //获取帧的序列号 |
299 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 299 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
300 | 300 | ||
@@ -312,7 +312,7 @@ static int Uart_DEV2_RecvDeal_audio_PlayStop(char *getbuf) | @@ -312,7 +312,7 @@ static int Uart_DEV2_RecvDeal_audio_PlayStop(char *getbuf) | ||
312 | **********/ | 312 | **********/ |
313 | static int Uart_DEV2_RecvDeal_audio_LastSong(char *getbuf) | 313 | static int Uart_DEV2_RecvDeal_audio_LastSong(char *getbuf) |
314 | { | 314 | { |
315 | - USER_LOG_INFO("音频上一曲\n"); | 315 | + JZSDK_LOG_INFO("音频上一曲\n"); |
316 | //获取帧的序列号 | 316 | //获取帧的序列号 |
317 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 317 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
318 | 318 | ||
@@ -330,7 +330,7 @@ static int Uart_DEV2_RecvDeal_audio_LastSong(char *getbuf) | @@ -330,7 +330,7 @@ static int Uart_DEV2_RecvDeal_audio_LastSong(char *getbuf) | ||
330 | **********/ | 330 | **********/ |
331 | static int Uart_DEV2_RecvDeal_audio_NextSong(char *getbuf) | 331 | static int Uart_DEV2_RecvDeal_audio_NextSong(char *getbuf) |
332 | { | 332 | { |
333 | - USER_LOG_INFO("音频下一曲\n"); | 333 | + JZSDK_LOG_INFO("音频下一曲\n"); |
334 | //获取帧的序列号 | 334 | //获取帧的序列号 |
335 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 335 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
336 | 336 | ||
@@ -348,7 +348,7 @@ static int Uart_DEV2_RecvDeal_audio_NextSong(char *getbuf) | @@ -348,7 +348,7 @@ static int Uart_DEV2_RecvDeal_audio_NextSong(char *getbuf) | ||
348 | **********/ | 348 | **********/ |
349 | static int Uart_DEV2_RecvDeal_audio_GetMusicList(char *getbuf) | 349 | static int Uart_DEV2_RecvDeal_audio_GetMusicList(char *getbuf) |
350 | { | 350 | { |
351 | - USER_LOG_INFO("获取音乐列表\n"); | 351 | + JZSDK_LOG_INFO("获取音乐列表\n"); |
352 | //获取帧的序列号 | 352 | //获取帧的序列号 |
353 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 353 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
354 | 354 | ||
@@ -390,7 +390,7 @@ static int Uart_DEV2_RecvDeal_audio_GetMusicList(char *getbuf) | @@ -390,7 +390,7 @@ static int Uart_DEV2_RecvDeal_audio_GetMusicList(char *getbuf) | ||
390 | **********/ | 390 | **********/ |
391 | static int Uart_DEV2_RecvDeal_Amplifier_stop(char *getbuf) | 391 | static int Uart_DEV2_RecvDeal_Amplifier_stop(char *getbuf) |
392 | { | 392 | { |
393 | - USER_LOG_INFO("强制关闭功放\n"); | 393 | + JZSDK_LOG_INFO("强制关闭功放\n"); |
394 | //获取帧的序列号 | 394 | //获取帧的序列号 |
395 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 395 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
396 | 396 | ||
@@ -408,7 +408,7 @@ static int Uart_DEV2_RecvDeal_Amplifier_stop(char *getbuf) | @@ -408,7 +408,7 @@ static int Uart_DEV2_RecvDeal_Amplifier_stop(char *getbuf) | ||
408 | **********/ | 408 | **********/ |
409 | static int Uart_DEV2_RecvDeal_Amplifier_open(char *getbuf) | 409 | static int Uart_DEV2_RecvDeal_Amplifier_open(char *getbuf) |
410 | { | 410 | { |
411 | - USER_LOG_INFO("强制关闭功放\n"); | 411 | + JZSDK_LOG_INFO("强制关闭功放\n"); |
412 | //获取帧的序列号 | 412 | //获取帧的序列号 |
413 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 413 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
414 | 414 | ||
@@ -437,7 +437,7 @@ static int Uart_DEV2_RecvDeal_Amplifier_auto() | @@ -437,7 +437,7 @@ static int Uart_DEV2_RecvDeal_Amplifier_auto() | ||
437 | **********/ | 437 | **********/ |
438 | static int Uart_DEV2_RecvDeal_SetVolume(char *getbuf) | 438 | static int Uart_DEV2_RecvDeal_SetVolume(char *getbuf) |
439 | { | 439 | { |
440 | - USER_LOG_INFO("调节音量\n"); | 440 | + JZSDK_LOG_INFO("调节音量\n"); |
441 | //获取帧的序列号 | 441 | //获取帧的序列号 |
442 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 442 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
443 | 443 | ||
@@ -456,7 +456,7 @@ static int Uart_DEV2_RecvDeal_SetVolume(char *getbuf) | @@ -456,7 +456,7 @@ static int Uart_DEV2_RecvDeal_SetVolume(char *getbuf) | ||
456 | **********/ | 456 | **********/ |
457 | static int Uart_DEV2_RecvDeal_CheckStatus_volume(char *getbuf) | 457 | static int Uart_DEV2_RecvDeal_CheckStatus_volume(char *getbuf) |
458 | { | 458 | { |
459 | - USER_LOG_INFO("查询音量\n"); | 459 | + JZSDK_LOG_INFO("查询音量\n"); |
460 | //获取帧的序列号 | 460 | //获取帧的序列号 |
461 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 461 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
462 | 462 | ||
@@ -479,7 +479,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_volume(char *getbuf) | @@ -479,7 +479,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_volume(char *getbuf) | ||
479 | static int Uart_DEV2_RecvDeal_CheckStatus_play(char *getbuf) | 479 | static int Uart_DEV2_RecvDeal_CheckStatus_play(char *getbuf) |
480 | { | 480 | { |
481 | //查询播放状态 | 481 | //查询播放状态 |
482 | - USER_LOG_INFO("查询播放状态\n"); | 482 | + JZSDK_LOG_INFO("查询播放状态\n"); |
483 | //获取帧的序列号 | 483 | //获取帧的序列号 |
484 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 484 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
485 | 485 | ||
@@ -504,7 +504,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_play(char *getbuf) | @@ -504,7 +504,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_play(char *getbuf) | ||
504 | static int Uart_DEV2_RecvDeal_CheckStatus_gimbal(char *getbuf) | 504 | static int Uart_DEV2_RecvDeal_CheckStatus_gimbal(char *getbuf) |
505 | { | 505 | { |
506 | //查询云台角度 | 506 | //查询云台角度 |
507 | - USER_LOG_INFO("查询云台角度\n"); | 507 | + JZSDK_LOG_INFO("查询云台角度\n"); |
508 | //获取帧的序列号 | 508 | //获取帧的序列号 |
509 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 509 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
510 | 510 | ||
@@ -540,7 +540,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_GimbalFineTuning(char *getbuf) | @@ -540,7 +540,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_GimbalFineTuning(char *getbuf) | ||
540 | static int Uart_DEV2_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | 540 | static int Uart_DEV2_RecvDeal_CheckStatus_PLayFileName(char *getbuf) |
541 | { | 541 | { |
542 | //查询播放文件名 | 542 | //查询播放文件名 |
543 | - USER_LOG_INFO("查询播放文件名\n"); | 543 | + JZSDK_LOG_INFO("查询播放文件名\n"); |
544 | //获取帧的序列号 | 544 | //获取帧的序列号 |
545 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 545 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
546 | 546 | ||
@@ -549,7 +549,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | @@ -549,7 +549,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | ||
549 | int MusicName_Len; | 549 | int MusicName_Len; |
550 | JZsdk_Uart_CheckStatus_PlayFileName(MusicName, &MusicName_Len); | 550 | JZsdk_Uart_CheckStatus_PlayFileName(MusicName, &MusicName_Len); |
551 | 551 | ||
552 | - USER_LOG_INFO("当前播放的是%s %d\n",MusicName, MusicName_Len); | 552 | + JZSDK_LOG_INFO("当前播放的是%s %d\n",MusicName, MusicName_Len); |
553 | 553 | ||
554 | //回复操作成功 | 554 | //回复操作成功 |
555 | //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence); | 555 | //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence); |
@@ -566,7 +566,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | @@ -566,7 +566,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_PLayFileName(char *getbuf) | ||
566 | static int Uart_DEV2_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | 566 | static int Uart_DEV2_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) |
567 | { | 567 | { |
568 | //查询软件版本号 | 568 | //查询软件版本号 |
569 | - USER_LOG_INFO("查询软件版本号\n"); | 569 | + JZSDK_LOG_INFO("查询软件版本号\n"); |
570 | //获取帧的序列号 | 570 | //获取帧的序列号 |
571 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 571 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
572 | 572 | ||
@@ -577,7 +577,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | @@ -577,7 +577,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | ||
577 | 577 | ||
578 | //1、获取版本号 | 578 | //1、获取版本号 |
579 | JZsdk_Uart_CheckStatus_SoftwareVersion(&majorVersion, &minorVersion, &modifyVersion, &debugVersion); | 579 | JZsdk_Uart_CheckStatus_SoftwareVersion(&majorVersion, &minorVersion, &modifyVersion, &debugVersion); |
580 | - USER_LOG_INFO("当前的软件版本号为:%2x, %2x, %2x, %2x",majorVersion, minorVersion, modifyVersion, debugVersion); | 580 | + JZSDK_LOG_INFO("当前的软件版本号为:%2x, %2x, %2x, %2x",majorVersion, minorVersion, modifyVersion, debugVersion); |
581 | 581 | ||
582 | //回复操作成功 | 582 | //回复操作成功 |
583 | //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence); | 583 | //JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence); |
@@ -594,7 +594,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | @@ -594,7 +594,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_SoftwareVersion(char *getbuf) | ||
594 | static int Uart_DEV2_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | 594 | static int Uart_DEV2_RecvDeal_CheckStatus_LoopPlay(char *getbuf) |
595 | { | 595 | { |
596 | //查询是否打开循环 | 596 | //查询是否打开循环 |
597 | - USER_LOG_INFO("查询是否打开循环\n"); | 597 | + JZSDK_LOG_INFO("查询是否打开循环\n"); |
598 | //获取帧的序列号 | 598 | //获取帧的序列号 |
599 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 599 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
600 | 600 | ||
@@ -602,7 +602,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | @@ -602,7 +602,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | ||
602 | int LoopStatus = JZsdk_Uart_CheckStatus_LoopPlay(); | 602 | int LoopStatus = JZsdk_Uart_CheckStatus_LoopPlay(); |
603 | if (LoopStatus < 0) | 603 | if (LoopStatus < 0) |
604 | { | 604 | { |
605 | - USER_LOG_INFO("循环状态获取失败"); | 605 | + JZSDK_LOG_INFO("循环状态获取失败"); |
606 | return -1; | 606 | return -1; |
607 | } | 607 | } |
608 | 608 | ||
@@ -621,7 +621,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | @@ -621,7 +621,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_LoopPlay(char *getbuf) | ||
621 | static int Uart_DEV2_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | 621 | static int Uart_DEV2_RecvDeal_CheckStatus_TTS_tone(char *getbuf) |
622 | { | 622 | { |
623 | //查询音色 | 623 | //查询音色 |
624 | - USER_LOG_INFO("查询音色\n"); | 624 | + JZSDK_LOG_INFO("查询音色\n"); |
625 | //获取帧的序列号 | 625 | //获取帧的序列号 |
626 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 626 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
627 | 627 | ||
@@ -629,7 +629,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | @@ -629,7 +629,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | ||
629 | int TTS_tone = JZsdk_Uart_CheckStatus_TTS_tone(); | 629 | int TTS_tone = JZsdk_Uart_CheckStatus_TTS_tone(); |
630 | if (TTS_tone < 0) | 630 | if (TTS_tone < 0) |
631 | { | 631 | { |
632 | - USER_LOG_INFO("音色获取失败"); | 632 | + JZSDK_LOG_INFO("音色获取失败"); |
633 | return -1; | 633 | return -1; |
634 | } | 634 | } |
635 | 635 | ||
@@ -649,7 +649,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | @@ -649,7 +649,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_TTS_tone(char *getbuf) | ||
649 | static int Uart_DEV2_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | 649 | static int Uart_DEV2_RecvDeal_CheckStatus_TTS_speed(char *getbuf) |
650 | { | 650 | { |
651 | //查询语速 | 651 | //查询语速 |
652 | - USER_LOG_INFO("查询语速\n"); | 652 | + JZSDK_LOG_INFO("查询语速\n"); |
653 | //获取帧的序列号 | 653 | //获取帧的序列号 |
654 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 654 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
655 | 655 | ||
@@ -657,7 +657,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | @@ -657,7 +657,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | ||
657 | int TTS_speed = JZsdk_Uart_CheckStatus_TTS_speed(); | 657 | int TTS_speed = JZsdk_Uart_CheckStatus_TTS_speed(); |
658 | if (TTS_speed < 0) | 658 | if (TTS_speed < 0) |
659 | { | 659 | { |
660 | - USER_LOG_INFO("语速获取失败"); | 660 | + JZSDK_LOG_INFO("语速获取失败"); |
661 | return -1; | 661 | return -1; |
662 | } | 662 | } |
663 | 663 | ||
@@ -678,7 +678,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | @@ -678,7 +678,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_TTS_speed(char *getbuf) | ||
678 | **********/ | 678 | **********/ |
679 | static int Uart_DEV2_RecvDeal_PlayLoop(char *getbuf) | 679 | static int Uart_DEV2_RecvDeal_PlayLoop(char *getbuf) |
680 | { | 680 | { |
681 | - USER_LOG_INFO("开启关闭循环\n"); | 681 | + JZSDK_LOG_INFO("开启关闭循环\n"); |
682 | //获取帧的序列号 | 682 | //获取帧的序列号 |
683 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 683 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
684 | 684 | ||
@@ -708,7 +708,7 @@ static int Uart_DEV2_RecvDeal_PlayLoop(char *getbuf) | @@ -708,7 +708,7 @@ static int Uart_DEV2_RecvDeal_PlayLoop(char *getbuf) | ||
708 | **********/ | 708 | **********/ |
709 | static int Uart_DEV2_RecvDeal_Delete_Audio(char *getbuf) | 709 | static int Uart_DEV2_RecvDeal_Delete_Audio(char *getbuf) |
710 | { | 710 | { |
711 | - USER_LOG_INFO("删除音频操作\n"); | 711 | + JZSDK_LOG_INFO("删除音频操作\n"); |
712 | //获取帧的序列号 | 712 | //获取帧的序列号 |
713 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 713 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
714 | 714 | ||
@@ -741,7 +741,7 @@ static int Uart_DEV2_RecvDeal_Delete_Audio(char *getbuf) | @@ -741,7 +741,7 @@ static int Uart_DEV2_RecvDeal_Delete_Audio(char *getbuf) | ||
741 | **********/ | 741 | **********/ |
742 | static int Uart_DEV2_RecvDeal_Delete_VoiceRecord(char *getbuf) | 742 | static int Uart_DEV2_RecvDeal_Delete_VoiceRecord(char *getbuf) |
743 | { | 743 | { |
744 | - USER_LOG_INFO("删除录音操作\n"); | 744 | + JZSDK_LOG_INFO("删除录音操作\n"); |
745 | //获取帧的序列号 | 745 | //获取帧的序列号 |
746 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 746 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
747 | 747 | ||
@@ -783,7 +783,7 @@ static int Uart_DEV2_RecvDeal_Delete_VideoRecord() | @@ -783,7 +783,7 @@ static int Uart_DEV2_RecvDeal_Delete_VideoRecord() | ||
783 | **********/ | 783 | **********/ |
784 | static int Uart_DEV2_RecvDeal_TTS_SetTone(char *getbuf) | 784 | static int Uart_DEV2_RecvDeal_TTS_SetTone(char *getbuf) |
785 | { | 785 | { |
786 | - USER_LOG_INFO("tts设置音色\n"); | 786 | + JZSDK_LOG_INFO("tts设置音色\n"); |
787 | //获取帧的序列号 | 787 | //获取帧的序列号 |
788 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 788 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
789 | 789 | ||
@@ -811,16 +811,16 @@ static int Uart_DEV2_RecvDeal_TTS_SetTone(char *getbuf) | @@ -811,16 +811,16 @@ static int Uart_DEV2_RecvDeal_TTS_SetTone(char *getbuf) | ||
811 | **********/ | 811 | **********/ |
812 | static int Uart_DEV2_RecvDeal_TTS_SetSpeed(char *getbuf) | 812 | static int Uart_DEV2_RecvDeal_TTS_SetSpeed(char *getbuf) |
813 | { | 813 | { |
814 | - USER_LOG_INFO("设置语速\n"); | 814 | + JZSDK_LOG_INFO("设置语速\n"); |
815 | //获取帧的序列号 | 815 | //获取帧的序列号 |
816 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 816 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
817 | 817 | ||
818 | //1、从帧数据从获取语速 | 818 | //1、从帧数据从获取语速 |
819 | int speed = (int)getbuf[9]; | 819 | int speed = (int)getbuf[9]; |
820 | - USER_LOG_INFO("获取的语速为:%d",speed); | 820 | + JZSDK_LOG_INFO("获取的语速为:%d",speed); |
821 | if (speed > 100 || speed < 0) | 821 | if (speed > 100 || speed < 0) |
822 | { | 822 | { |
823 | - USER_LOG_INFO("语速超出范围\n"); | 823 | + JZSDK_LOG_INFO("语速超出范围\n"); |
824 | 824 | ||
825 | //回复操作失败 | 825 | //回复操作失败 |
826 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence); | 826 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence); |
@@ -851,12 +851,12 @@ static int Uart_DEV2_RecvDeal_TTS_SetSpeed(char *getbuf) | @@ -851,12 +851,12 @@ static int Uart_DEV2_RecvDeal_TTS_SetSpeed(char *getbuf) | ||
851 | // 0x5A 0x5A 0x77 0x00 0x0c 0x00 0x00 0x57 0x04 0x00 0x00 0x23 结束TTS发送 | 851 | // 0x5A 0x5A 0x77 0x00 0x0c 0x00 0x00 0x57 0x04 0x00 0x00 0x23 结束TTS发送 |
852 | static int Uart_DEV2_RecvDeal_TTS_Trans_start(char *getbuf) | 852 | static int Uart_DEV2_RecvDeal_TTS_Trans_start(char *getbuf) |
853 | { | 853 | { |
854 | - USER_LOG_INFO("tts开始传输"); | 854 | + JZSDK_LOG_INFO("tts开始传输"); |
855 | //获取帧的序列号 | 855 | //获取帧的序列号 |
856 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 856 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
857 | 857 | ||
858 | //1、重置缓冲区 | 858 | //1、重置缓冲区 |
859 | - memset(TTS_Recv_buffer, '\0', 1009); | 859 | + memset(TTS_Recv_buffer, 0, 1009); |
860 | 860 | ||
861 | //2、重置缓冲区长度 | 861 | //2、重置缓冲区长度 |
862 | TTS_Recv_buffer_length = 0; | 862 | TTS_Recv_buffer_length = 0; |
@@ -875,7 +875,7 @@ static int Uart_DEV2_RecvDeal_TTS_Trans_start(char *getbuf) | @@ -875,7 +875,7 @@ static int Uart_DEV2_RecvDeal_TTS_Trans_start(char *getbuf) | ||
875 | **********/ | 875 | **********/ |
876 | static int Uart_DEV2_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | 876 | static int Uart_DEV2_RecvDeal_TTS_Trans_transmission(char *getdata, int len) |
877 | { | 877 | { |
878 | - USER_LOG_INFO("tts传输中"); | 878 | + JZSDK_LOG_INFO("tts传输中"); |
879 | 879 | ||
880 | if (TTS_Recv_buffer_length+len < 1000) | 880 | if (TTS_Recv_buffer_length+len < 1000) |
881 | { | 881 | { |
@@ -887,9 +887,10 @@ static int Uart_DEV2_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | @@ -887,9 +887,10 @@ static int Uart_DEV2_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | ||
887 | } | 887 | } |
888 | else | 888 | else |
889 | { | 889 | { |
890 | - USER_LOG_ERROR("TTS字数超出1000字"); | 890 | + JZSDK_LOG_ERROR("TTS字数超出1000字节"); |
891 | } | 891 | } |
892 | } | 892 | } |
893 | + | ||
893 | /********* | 894 | /********* |
894 | * | 895 | * |
895 | * tts传输结束 | 896 | * tts传输结束 |
@@ -898,12 +899,13 @@ static int Uart_DEV2_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | @@ -898,12 +899,13 @@ static int Uart_DEV2_RecvDeal_TTS_Trans_transmission(char *getdata, int len) | ||
898 | **********/ | 899 | **********/ |
899 | static int Uart_DEV2_RecvDeal_TTS_Trans_stop(char *getbuf) | 900 | static int Uart_DEV2_RecvDeal_TTS_Trans_stop(char *getbuf) |
900 | { | 901 | { |
901 | - USER_LOG_INFO("tts传输结束"); | 902 | + JZSDK_LOG_INFO("tts传输结束"); |
902 | //获取帧的序列号 | 903 | //获取帧的序列号 |
903 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 904 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
904 | 905 | ||
906 | + | ||
905 | //1、打印一次TTS文本 | 907 | //1、打印一次TTS文本 |
906 | - USER_LOG_INFO("TTS播放%s",TTS_Recv_buffer); | 908 | + JZSDK_LOG_INFO("TTS播放%s",TTS_Recv_buffer); |
907 | 909 | ||
908 | //2、播放TTS | 910 | //2、播放TTS |
909 | JZsdk_Uart_TTS_Play(UART_DEV_2, TTS_Recv_buffer, TTS_Recv_buffer_length); | 911 | JZsdk_Uart_TTS_Play(UART_DEV_2, TTS_Recv_buffer, TTS_Recv_buffer_length); |
@@ -921,7 +923,7 @@ static int Uart_DEV2_RecvDeal_TTS_Trans_stop(char *getbuf) | @@ -921,7 +923,7 @@ static int Uart_DEV2_RecvDeal_TTS_Trans_stop(char *getbuf) | ||
921 | **********/ | 923 | **********/ |
922 | static int Uart_DEV2_RecvDeal_OpusTrans_start(char *getbuf) | 924 | static int Uart_DEV2_RecvDeal_OpusTrans_start(char *getbuf) |
923 | { | 925 | { |
924 | - USER_LOG_INFO("打开opus传输\n"); | 926 | + JZSDK_LOG_INFO("打开opus传输\n"); |
925 | //获取帧的序列号 | 927 | //获取帧的序列号 |
926 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 928 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
927 | 929 | ||
@@ -938,7 +940,7 @@ static int Uart_DEV2_RecvDeal_OpusTrans_start(char *getbuf) | @@ -938,7 +940,7 @@ static int Uart_DEV2_RecvDeal_OpusTrans_start(char *getbuf) | ||
938 | //3、修改接收模式为传输opus | 940 | //3、修改接收模式为传输opus |
939 | JZsdk_Uart_RecvDeal_Set_UART_DEV2_Receive_mode(JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION); | 941 | JZsdk_Uart_RecvDeal_Set_UART_DEV2_Receive_mode(JZ_INSCODE_5AFRAME_OPUS_TRANS_TRANSMISSION); |
940 | 942 | ||
941 | - USER_LOG_INFO("已完成打开opus传输处理\n"); | 943 | + JZSDK_LOG_INFO("已完成打开opus传输处理\n"); |
942 | 944 | ||
943 | //回复操作成功 | 945 | //回复操作成功 |
944 | JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence); | 946 | JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence); |
@@ -953,7 +955,7 @@ static int Uart_DEV2_RecvDeal_OpusTrans_transmission(char *SaveData, int size) | @@ -953,7 +955,7 @@ static int Uart_DEV2_RecvDeal_OpusTrans_transmission(char *SaveData, int size) | ||
953 | { | 955 | { |
954 | JZsdk_Uart_SaveOpusTrans(SaveData,size); | 956 | JZsdk_Uart_SaveOpusTrans(SaveData,size); |
955 | 957 | ||
956 | - USER_LOG_INFO("已完成opus传输保存处理\n"); | 958 | + JZSDK_LOG_INFO("已完成opus传输保存处理\n"); |
957 | } | 959 | } |
958 | /********* | 960 | /********* |
959 | * | 961 | * |
@@ -963,13 +965,13 @@ static int Uart_DEV2_RecvDeal_OpusTrans_transmission(char *SaveData, int size) | @@ -963,13 +965,13 @@ static int Uart_DEV2_RecvDeal_OpusTrans_transmission(char *SaveData, int size) | ||
963 | **********/ | 965 | **********/ |
964 | static int Uart_DEV2_RecvDeal_OpusTrans_stop(char *getbuf) | 966 | static int Uart_DEV2_RecvDeal_OpusTrans_stop(char *getbuf) |
965 | { | 967 | { |
966 | - USER_LOG_INFO("结束opus传输\n"); | 968 | + JZSDK_LOG_INFO("结束opus传输\n"); |
967 | //获取帧的序列号 | 969 | //获取帧的序列号 |
968 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 970 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
969 | 971 | ||
970 | JZsdk_Uart_SaveOpusStop(); | 972 | JZsdk_Uart_SaveOpusStop(); |
971 | 973 | ||
972 | - USER_LOG_INFO("结束opus传输处理\n"); | 974 | + JZSDK_LOG_INFO("结束opus传输处理\n"); |
973 | 975 | ||
974 | //回复操作成功 | 976 | //回复操作成功 |
975 | JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence); | 977 | JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence); |
@@ -982,7 +984,7 @@ static int Uart_DEV2_RecvDeal_OpusTrans_stop(char *getbuf) | @@ -982,7 +984,7 @@ static int Uart_DEV2_RecvDeal_OpusTrans_stop(char *getbuf) | ||
982 | **********/ | 984 | **********/ |
983 | static int Uart_DEV2_RecvDeal_OpusPlay(char *getbuf) | 985 | static int Uart_DEV2_RecvDeal_OpusPlay(char *getbuf) |
984 | { | 986 | { |
985 | - USER_LOG_INFO("opus播放\n"); | 987 | + JZSDK_LOG_INFO("opus播放\n"); |
986 | //获取帧的序列号 | 988 | //获取帧的序列号 |
987 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 989 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
988 | 990 | ||
@@ -1002,7 +1004,7 @@ static int Uart_DEV2_RecvDeal_OpusPlay(char *getbuf) | @@ -1002,7 +1004,7 @@ static int Uart_DEV2_RecvDeal_OpusPlay(char *getbuf) | ||
1002 | **********/ | 1004 | **********/ |
1003 | static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_start(char *getbuf) | 1005 | static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_start(char *getbuf) |
1004 | { | 1006 | { |
1005 | - USER_LOG_INFO("开启opus实时喊话功能\n"); | 1007 | + JZSDK_LOG_INFO("开启opus实时喊话功能\n"); |
1006 | //获取帧的序列号 | 1008 | //获取帧的序列号 |
1007 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1009 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1008 | 1010 | ||
@@ -1037,7 +1039,7 @@ static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_start(char *getbuf) | @@ -1037,7 +1039,7 @@ static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_start(char *getbuf) | ||
1037 | **********/ | 1039 | **********/ |
1038 | static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int len) | 1040 | static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int len) |
1039 | { | 1041 | { |
1040 | - USER_LOG_INFO("opus语音传输中\n"); | 1042 | + JZSDK_LOG_INFO("opus语音传输中\n"); |
1041 | JZsdk_Uart_RealTimeVoiceTrans(getdata, len); | 1043 | JZsdk_Uart_RealTimeVoiceTrans(getdata, len); |
1042 | 1044 | ||
1043 | } | 1045 | } |
@@ -1049,7 +1051,7 @@ static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int | @@ -1049,7 +1051,7 @@ static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_transmission(char *getdata, int | ||
1049 | **********/ | 1051 | **********/ |
1050 | static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf) | 1052 | static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf) |
1051 | { | 1053 | { |
1052 | - USER_LOG_INFO("关闭opus实时喊话功能\n"); | 1054 | + JZSDK_LOG_INFO("关闭opus实时喊话功能\n"); |
1053 | //获取帧的序列号 | 1055 | //获取帧的序列号 |
1054 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1056 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1055 | 1057 | ||
@@ -1079,7 +1081,7 @@ static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf) | @@ -1079,7 +1081,7 @@ static int Uart_DEV2_RecvDeal_Opus_RealTimeVoice_stop(char *getbuf) | ||
1079 | **********/ | 1081 | **********/ |
1080 | static int Uart_DEV2_RecvDeal_Gimbal_PitchControl(char *getbuf) | 1082 | static int Uart_DEV2_RecvDeal_Gimbal_PitchControl(char *getbuf) |
1081 | { | 1083 | { |
1082 | - USER_LOG_INFO("云台俯仰控制\n"); | 1084 | + JZSDK_LOG_INFO("云台俯仰控制\n"); |
1083 | //获取帧的序列号 | 1085 | //获取帧的序列号 |
1084 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1086 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1085 | 1087 | ||
@@ -1100,13 +1102,13 @@ static int Uart_DEV2_RecvDeal_Gimbal_PitchControl(char *getbuf) | @@ -1100,13 +1102,13 @@ static int Uart_DEV2_RecvDeal_Gimbal_PitchControl(char *getbuf) | ||
1100 | } | 1102 | } |
1101 | else | 1103 | else |
1102 | { | 1104 | { |
1103 | - USER_LOG_INFO("云台输入角度符号错误,无法正常控制"); | 1105 | + JZSDK_LOG_INFO("云台输入角度符号错误,无法正常控制"); |
1104 | //回复操作失败 | 1106 | //回复操作失败 |
1105 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence); | 1107 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence); |
1106 | return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; | 1108 | return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; |
1107 | } | 1109 | } |
1108 | 1110 | ||
1109 | - USER_LOG_INFO("处理得到的角度是%d",Gimbal_angle); | 1111 | + JZSDK_LOG_INFO("处理得到的角度是%d",Gimbal_angle); |
1110 | 1112 | ||
1111 | T_JZsdkReturnCode ret = JZsdk_Uart_Gimbal_PitchControl(UART_DEV_2, Gimbal_angle); | 1113 | T_JZsdkReturnCode ret = JZsdk_Uart_Gimbal_PitchControl(UART_DEV_2, Gimbal_angle); |
1112 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) | 1114 | if (ret == JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS) |
@@ -1129,7 +1131,7 @@ static int Uart_DEV2_RecvDeal_Gimbal_PitchControl(char *getbuf) | @@ -1129,7 +1131,7 @@ static int Uart_DEV2_RecvDeal_Gimbal_PitchControl(char *getbuf) | ||
1129 | **********/ | 1131 | **********/ |
1130 | static int Uart_DEV2_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | 1132 | static int Uart_DEV2_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) |
1131 | { | 1133 | { |
1132 | - USER_LOG_INFO("云台俯仰微调角度\n"); | 1134 | + JZSDK_LOG_INFO("云台俯仰微调角度\n"); |
1133 | //获取帧的序列号 | 1135 | //获取帧的序列号 |
1134 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1136 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1135 | 1137 | ||
@@ -1137,7 +1139,7 @@ static int Uart_DEV2_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | @@ -1137,7 +1139,7 @@ static int Uart_DEV2_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | ||
1137 | int Gimbal_signal = getbuf[9]; | 1139 | int Gimbal_signal = getbuf[9]; |
1138 | 1140 | ||
1139 | //2、通过云台控制帧 获取云台角度绝对值 | 1141 | //2、通过云台控制帧 获取云台角度绝对值 |
1140 | - int Gimbal_angle = ((int)getbuf[10]) ; | 1142 | + int Gimbal_angle = (((int)getbuf[10]) << 8 ) + getbuf[11]; |
1141 | 1143 | ||
1142 | //3、拼接得到云台值 | 1144 | //3、拼接得到云台值 |
1143 | if (Gimbal_signal == 0x00) | 1145 | if (Gimbal_signal == 0x00) |
@@ -1150,13 +1152,13 @@ static int Uart_DEV2_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | @@ -1150,13 +1152,13 @@ static int Uart_DEV2_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | ||
1150 | } | 1152 | } |
1151 | else | 1153 | else |
1152 | { | 1154 | { |
1153 | - USER_LOG_INFO("云台俯仰微调角度符号错误,无法正常控制"); | 1155 | + JZSDK_LOG_INFO("云台俯仰微调角度符号错误,无法正常控制"); |
1154 | //回复操作失败 | 1156 | //回复操作失败 |
1155 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence); | 1157 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, FrameSequence); |
1156 | return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; | 1158 | return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE; |
1157 | } | 1159 | } |
1158 | 1160 | ||
1159 | - USER_LOG_INFO("处理得到云台俯仰微调角度是%d",Gimbal_angle); | 1161 | + JZSDK_LOG_INFO("处理得到云台俯仰微调角度是%d",Gimbal_angle); |
1160 | 1162 | ||
1161 | JZsdk_Uart_Gimbal_PitchFineTuningControl(UART_DEV_2, FrameSequence ,Gimbal_angle); | 1163 | JZsdk_Uart_Gimbal_PitchFineTuningControl(UART_DEV_2, FrameSequence ,Gimbal_angle); |
1162 | 1164 | ||
@@ -1177,7 +1179,7 @@ static int Uart_DEV2_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | @@ -1177,7 +1179,7 @@ static int Uart_DEV2_RecvDeal_Gimbal_PitchFineTuningControl(char *getbuf) | ||
1177 | **********/ | 1179 | **********/ |
1178 | static int Uart_DEV2_RecvDeal_SearchLight_SetFrequency(char *getbuf) | 1180 | static int Uart_DEV2_RecvDeal_SearchLight_SetFrequency(char *getbuf) |
1179 | { | 1181 | { |
1180 | - USER_LOG_INFO("设置爆闪频率\n"); | 1182 | + JZSDK_LOG_INFO("设置爆闪频率\n"); |
1181 | //获取帧的序列号 | 1183 | //获取帧的序列号 |
1182 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1184 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1183 | 1185 | ||
@@ -1204,7 +1206,7 @@ static int Uart_DEV2_RecvDeal_SearchLight_SetFrequency(char *getbuf) | @@ -1204,7 +1206,7 @@ static int Uart_DEV2_RecvDeal_SearchLight_SetFrequency(char *getbuf) | ||
1204 | **********/ | 1206 | **********/ |
1205 | static int Uart_DEV2_RecvDeal_SearchLight_Control(char *getbuf) | 1207 | static int Uart_DEV2_RecvDeal_SearchLight_Control(char *getbuf) |
1206 | { | 1208 | { |
1207 | - USER_LOG_INFO("设置灯光控制\n"); | 1209 | + JZSDK_LOG_INFO("设置灯光控制\n"); |
1208 | //获取帧的序列号 | 1210 | //获取帧的序列号 |
1209 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1211 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1210 | 1212 | ||
@@ -1231,7 +1233,7 @@ static int Uart_DEV2_RecvDeal_SearchLight_Control(char *getbuf) | @@ -1231,7 +1233,7 @@ static int Uart_DEV2_RecvDeal_SearchLight_Control(char *getbuf) | ||
1231 | **********/ | 1233 | **********/ |
1232 | static int Uart_DEV2_RecvDeal_SearchLight_Lumen(char *getbuf) | 1234 | static int Uart_DEV2_RecvDeal_SearchLight_Lumen(char *getbuf) |
1233 | { | 1235 | { |
1234 | - USER_LOG_INFO("设置灯光亮度\n"); | 1236 | + JZSDK_LOG_INFO("设置灯光亮度\n"); |
1235 | //获取帧的序列号 | 1237 | //获取帧的序列号 |
1236 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1238 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1237 | 1239 | ||
@@ -1259,7 +1261,7 @@ static int Uart_DEV2_RecvDeal_SearchLight_Lumen(char *getbuf) | @@ -1259,7 +1261,7 @@ static int Uart_DEV2_RecvDeal_SearchLight_Lumen(char *getbuf) | ||
1259 | **********/ | 1261 | **********/ |
1260 | static int Uart_DEV2_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf) | 1262 | static int Uart_DEV2_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf) |
1261 | { | 1263 | { |
1262 | - USER_LOG_INFO("灯光属性查询\n"); | 1264 | + JZSDK_LOG_INFO("灯光属性查询\n"); |
1263 | //1、获取帧的序列号 | 1265 | //1、获取帧的序列号 |
1264 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1266 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1265 | 1267 | ||
@@ -1275,7 +1277,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf | @@ -1275,7 +1277,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_SearchLightLightAttribute(char *getbuf | ||
1275 | **********/ | 1277 | **********/ |
1276 | static int Uart_DEV2_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf) | 1278 | static int Uart_DEV2_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf) |
1277 | { | 1279 | { |
1278 | - USER_LOG_INFO("探照灯温度查询\n"); | 1280 | + JZSDK_LOG_INFO("探照灯温度查询\n"); |
1279 | //1、获取帧的序列号 | 1281 | //1、获取帧的序列号 |
1280 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1282 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1281 | 1283 | ||
@@ -1290,7 +1292,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf) | @@ -1290,7 +1292,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_SearchLightTemperture(char *getbuf) | ||
1290 | **********/ | 1292 | **********/ |
1291 | static int Uart_DEV2_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | 1293 | static int Uart_DEV2_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) |
1292 | { | 1294 | { |
1293 | - USER_LOG_INFO("消息订阅控制\n"); | 1295 | + JZSDK_LOG_INFO("消息订阅控制\n"); |
1294 | //获取帧的序列号 | 1296 | //获取帧的序列号 |
1295 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1297 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1296 | 1298 | ||
@@ -1310,6 +1312,55 @@ static int Uart_DEV2_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | @@ -1310,6 +1312,55 @@ static int Uart_DEV2_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | ||
1310 | } | 1312 | } |
1311 | } | 1313 | } |
1312 | 1314 | ||
1315 | +/********* | ||
1316 | + * | ||
1317 | + * 查询产品序列号 | ||
1318 | + * | ||
1319 | +**********/ | ||
1320 | +static int Uart_DEV2_RecvDeal_CheckStatus_SerialNumber(char *getbuf) | ||
1321 | +{ | ||
1322 | + JZSDK_LOG_INFO("消息订阅控制\n"); | ||
1323 | + //获取帧的序列号 | ||
1324 | + int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | ||
1325 | + | ||
1326 | + JZsdk_Uart_CheckStatus_SerialNumber(UART_DEV_2, FrameSequence); | ||
1327 | + | ||
1328 | +} | ||
1329 | + | ||
1330 | +/********* | ||
1331 | + * | ||
1332 | + * 对外供电开关 | ||
1333 | + * | ||
1334 | +**********/ | ||
1335 | +static int Uart_DEV2_RecvDeal_OutPutPower_Control(char *getbuf) | ||
1336 | +{ | ||
1337 | + printf("对外电源控制\n"); | ||
1338 | + //获取帧的序列号 | ||
1339 | + int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | ||
1340 | + | ||
1341 | + //获取控制值 | ||
1342 | + int Value = getbuf[9]; | ||
1343 | + | ||
1344 | + //控制 | ||
1345 | + JZsdk_Uart_OutPutPower_Control(UART_DEV_2, FrameSequence, Value); | ||
1346 | +} | ||
1347 | + | ||
1348 | +/********* | ||
1349 | + * | ||
1350 | + * 对外电源查询 | ||
1351 | + * | ||
1352 | +**********/ | ||
1353 | +static int Uart_DEV2_RecvDeal_Checkstatus_OutPutPower(char *getbuf) | ||
1354 | +{ | ||
1355 | + printf("对外电源查询\n"); | ||
1356 | + | ||
1357 | + //获取帧的序列号 | ||
1358 | + int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | ||
1359 | + | ||
1360 | + //获取本地数值 | ||
1361 | + JZsdk_Uart_Checkstatus_OutPutPower(UART_DEV_2, FrameSequence); | ||
1362 | +} | ||
1363 | + | ||
1313 | /******************************************************************************************************************************* | 1364 | /******************************************************************************************************************************* |
1314 | * | 1365 | * |
1315 | * 警灯部分 | 1366 | * 警灯部分 |
@@ -1322,7 +1373,7 @@ static int Uart_DEV2_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | @@ -1322,7 +1373,7 @@ static int Uart_DEV2_RecvDeal_SearchLight_SubscriptionControl(char *getbuf) | ||
1322 | **********/ | 1373 | **********/ |
1323 | static int Uart_DEV2_RecvDeal_WarningLight_ModeControl(char *getbuf) | 1374 | static int Uart_DEV2_RecvDeal_WarningLight_ModeControl(char *getbuf) |
1324 | { | 1375 | { |
1325 | - USER_LOG_INFO("警灯模式控制\n"); | 1376 | + JZSDK_LOG_INFO("警灯模式控制\n"); |
1326 | //获取帧的序列号 | 1377 | //获取帧的序列号 |
1327 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1378 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1328 | 1379 | ||
@@ -1350,7 +1401,7 @@ static int Uart_DEV2_RecvDeal_WarningLight_ModeControl(char *getbuf) | @@ -1350,7 +1401,7 @@ static int Uart_DEV2_RecvDeal_WarningLight_ModeControl(char *getbuf) | ||
1350 | **********/ | 1401 | **********/ |
1351 | static int Uart_DEV2_RecvDeal_WarningLight_SetColor(char *getbuf) | 1402 | static int Uart_DEV2_RecvDeal_WarningLight_SetColor(char *getbuf) |
1352 | { | 1403 | { |
1353 | - USER_LOG_INFO("警灯颜色选择\n"); | 1404 | + JZSDK_LOG_INFO("警灯颜色选择\n"); |
1354 | //获取帧的序列号 | 1405 | //获取帧的序列号 |
1355 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1406 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1356 | 1407 | ||
@@ -1378,7 +1429,7 @@ static int Uart_DEV2_RecvDeal_WarningLight_SetColor(char *getbuf) | @@ -1378,7 +1429,7 @@ static int Uart_DEV2_RecvDeal_WarningLight_SetColor(char *getbuf) | ||
1378 | **********/ | 1429 | **********/ |
1379 | static int Uart_DEV2_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf) | 1430 | static int Uart_DEV2_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf) |
1380 | { | 1431 | { |
1381 | - USER_LOG_INFO("警灯状态查询\n"); | 1432 | + JZSDK_LOG_INFO("警灯状态查询\n"); |
1382 | //1、获取帧的序列号 | 1433 | //1、获取帧的序列号 |
1383 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1434 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1384 | 1435 | ||
@@ -1394,7 +1445,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf) | @@ -1394,7 +1445,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_WarningLightStatus(char *getbuf) | ||
1394 | **********/ | 1445 | **********/ |
1395 | static int Uart_DEV2_RecvDeal_CheckStatus_WarningLightColor(char *getbuf) | 1446 | static int Uart_DEV2_RecvDeal_CheckStatus_WarningLightColor(char *getbuf) |
1396 | { | 1447 | { |
1397 | - USER_LOG_INFO("警灯颜色查询\n"); | 1448 | + JZSDK_LOG_INFO("警灯颜色查询\n"); |
1398 | //1、获取帧的序列号 | 1449 | //1、获取帧的序列号 |
1399 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1450 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1400 | 1451 | ||
@@ -1433,7 +1484,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_WarningLightColor(char *getbuf) | @@ -1433,7 +1484,7 @@ static int Uart_DEV2_RecvDeal_CheckStatus_WarningLightColor(char *getbuf) | ||
1433 | **********/ | 1484 | **********/ |
1434 | static int Uart_DEV2_RecvDeal_ObtainSearchLight_Frequency(char *getbuf) | 1485 | static int Uart_DEV2_RecvDeal_ObtainSearchLight_Frequency(char *getbuf) |
1435 | { | 1486 | { |
1436 | - USER_LOG_INFO("收到灯光频率\n"); | 1487 | + JZSDK_LOG_INFO("收到灯光频率\n"); |
1437 | //获取帧的序列号 | 1488 | //获取帧的序列号 |
1438 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1489 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1439 | 1490 | ||
@@ -1451,7 +1502,7 @@ static int Uart_DEV2_RecvDeal_ObtainSearchLight_Frequency(char *getbuf) | @@ -1451,7 +1502,7 @@ static int Uart_DEV2_RecvDeal_ObtainSearchLight_Frequency(char *getbuf) | ||
1451 | **********/ | 1502 | **********/ |
1452 | static int Uart_DEV2_RecvDeal_ObtainSearchLight_Mode(char *getbuf) | 1503 | static int Uart_DEV2_RecvDeal_ObtainSearchLight_Mode(char *getbuf) |
1453 | { | 1504 | { |
1454 | - USER_LOG_INFO("收到灯光模式\n"); | 1505 | + JZSDK_LOG_INFO("收到灯光模式\n"); |
1455 | //获取帧的序列号 | 1506 | //获取帧的序列号 |
1456 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1507 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1457 | 1508 | ||
@@ -1469,7 +1520,7 @@ static int Uart_DEV2_RecvDeal_ObtainSearchLight_Mode(char *getbuf) | @@ -1469,7 +1520,7 @@ static int Uart_DEV2_RecvDeal_ObtainSearchLight_Mode(char *getbuf) | ||
1469 | **********/ | 1520 | **********/ |
1470 | static int Uart_DEV2_RecvDeal_ObtainSearchLight_Lumen(char *getbuf) | 1521 | static int Uart_DEV2_RecvDeal_ObtainSearchLight_Lumen(char *getbuf) |
1471 | { | 1522 | { |
1472 | - USER_LOG_INFO("收到灯光亮度\n"); | 1523 | + JZSDK_LOG_INFO("收到灯光亮度\n"); |
1473 | //获取帧的序列号 | 1524 | //获取帧的序列号 |
1474 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1525 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1475 | 1526 | ||
@@ -1488,7 +1539,7 @@ static int Uart_DEV2_RecvDeal_ObtainSearchLight_Lumen(char *getbuf) | @@ -1488,7 +1539,7 @@ static int Uart_DEV2_RecvDeal_ObtainSearchLight_Lumen(char *getbuf) | ||
1488 | **********/ | 1539 | **********/ |
1489 | static int Uart_DEV2_RecvDeal_ObtainSearchLight_Temperature(char *getbuf) | 1540 | static int Uart_DEV2_RecvDeal_ObtainSearchLight_Temperature(char *getbuf) |
1490 | { | 1541 | { |
1491 | - USER_LOG_INFO("收到探照灯温度\n"); | 1542 | + JZSDK_LOG_INFO("收到探照灯温度\n"); |
1492 | //获取帧的序列号 | 1543 | //获取帧的序列号 |
1493 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1544 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1494 | 1545 | ||
@@ -1507,7 +1558,7 @@ static int Uart_DEV2_RecvDeal_ObtainSearchLight_Temperature(char *getbuf) | @@ -1507,7 +1558,7 @@ static int Uart_DEV2_RecvDeal_ObtainSearchLight_Temperature(char *getbuf) | ||
1507 | **********/ | 1558 | **********/ |
1508 | static int Uart_DEV2_RecvDeal_ObtainGimbal_Pitch(char *getbuf) | 1559 | static int Uart_DEV2_RecvDeal_ObtainGimbal_Pitch(char *getbuf) |
1509 | { | 1560 | { |
1510 | - USER_LOG_INFO("收到云台俯仰\n"); | 1561 | + JZSDK_LOG_INFO("收到云台俯仰\n"); |
1511 | //获取帧的序列号 | 1562 | //获取帧的序列号 |
1512 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1563 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1513 | 1564 | ||
@@ -1538,7 +1589,7 @@ static int Uart_DEV2_RecvDeal_ObtainGimbal_Pitch(char *getbuf) | @@ -1538,7 +1589,7 @@ static int Uart_DEV2_RecvDeal_ObtainGimbal_Pitch(char *getbuf) | ||
1538 | **********/ | 1589 | **********/ |
1539 | static int Uart_DEV2_RecvDeal_ObtainGimbal_Yaw(char *getbuf) | 1590 | static int Uart_DEV2_RecvDeal_ObtainGimbal_Yaw(char *getbuf) |
1540 | { | 1591 | { |
1541 | - USER_LOG_INFO("收到云台航向\n"); | 1592 | + JZSDK_LOG_INFO("收到云台航向\n"); |
1542 | //获取帧的序列号 | 1593 | //获取帧的序列号 |
1543 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1594 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1544 | 1595 | ||
@@ -1576,7 +1627,7 @@ static int Uart_DEV2_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf) | @@ -1576,7 +1627,7 @@ static int Uart_DEV2_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf) | ||
1576 | int signal = getbuf[9]; | 1627 | int signal = getbuf[9]; |
1577 | 1628 | ||
1578 | //2、获取云台角度绝对值 | 1629 | //2、获取云台角度绝对值 |
1579 | - int pitch = (int)getbuf[10] ; | 1630 | + int pitch = (((int)getbuf[10]) << 8 ) + getbuf[11]; |
1580 | 1631 | ||
1581 | //3、拼接得到云台值 | 1632 | //3、拼接得到云台值 |
1582 | if (signal == 0x00) | 1633 | if (signal == 0x00) |
@@ -1598,7 +1649,7 @@ static int Uart_DEV2_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf) | @@ -1598,7 +1649,7 @@ static int Uart_DEV2_RecvDeal_ObtainGimbalPitchFineTuning(char *getbuf) | ||
1598 | **********/ | 1649 | **********/ |
1599 | static int Uart_DEV2_RecvDeal_ObtainWaringlight_Status(char *getbuf) | 1650 | static int Uart_DEV2_RecvDeal_ObtainWaringlight_Status(char *getbuf) |
1600 | { | 1651 | { |
1601 | - USER_LOG_INFO("收到警灯状态\n"); | 1652 | + JZSDK_LOG_INFO("收到警灯状态\n"); |
1602 | //获取帧的序列号 | 1653 | //获取帧的序列号 |
1603 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1654 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1604 | 1655 | ||
@@ -1617,7 +1668,7 @@ static int Uart_DEV2_RecvDeal_ObtainWaringlight_Status(char *getbuf) | @@ -1617,7 +1668,7 @@ static int Uart_DEV2_RecvDeal_ObtainWaringlight_Status(char *getbuf) | ||
1617 | **********/ | 1668 | **********/ |
1618 | static int Uart_DEV2_RecvDeal_ObtainWaringlight_Color(char *getbuf) | 1669 | static int Uart_DEV2_RecvDeal_ObtainWaringlight_Color(char *getbuf) |
1619 | { | 1670 | { |
1620 | - USER_LOG_INFO("收到警灯颜色\n"); | 1671 | + JZSDK_LOG_INFO("收到警灯颜色\n"); |
1621 | //获取帧的序列号 | 1672 | //获取帧的序列号 |
1622 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1673 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1623 | 1674 | ||
@@ -1636,7 +1687,7 @@ static int Uart_DEV2_RecvDeal_ObtainWaringlight_Color(char *getbuf) | @@ -1636,7 +1687,7 @@ static int Uart_DEV2_RecvDeal_ObtainWaringlight_Color(char *getbuf) | ||
1636 | **********/ | 1687 | **********/ |
1637 | static int Uart_DEV2_RecvDeal_ObtainSerialNumber(char *getbuf) | 1688 | static int Uart_DEV2_RecvDeal_ObtainSerialNumber(char *getbuf) |
1638 | { | 1689 | { |
1639 | - USER_LOG_INFO("收到产品序列号\n"); | 1690 | + JZSDK_LOG_INFO("收到产品序列号\n"); |
1640 | //获取帧的序列号 | 1691 | //获取帧的序列号 |
1641 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1692 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1642 | 1693 | ||
@@ -1667,7 +1718,7 @@ static int Uart_DEV2_RecvDeal_ObtainSerialNumber(char *getbuf) | @@ -1667,7 +1718,7 @@ static int Uart_DEV2_RecvDeal_ObtainSerialNumber(char *getbuf) | ||
1667 | **********/ | 1718 | **********/ |
1668 | static int Uart_DEV2_RecvDeal_QuerySecondaryDeviceName(char *getbuf) | 1719 | static int Uart_DEV2_RecvDeal_QuerySecondaryDeviceName(char *getbuf) |
1669 | { | 1720 | { |
1670 | - USER_LOG_INFO("查询当前从设备名\n"); | 1721 | + JZSDK_LOG_INFO("查询当前从设备名\n"); |
1671 | 1722 | ||
1672 | //获取帧的序列号 | 1723 | //获取帧的序列号 |
1673 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1724 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
@@ -1696,7 +1747,7 @@ static int Uart_DEV2_RecvDeal_QuerySecondaryDeviceName(char *getbuf) | @@ -1696,7 +1747,7 @@ static int Uart_DEV2_RecvDeal_QuerySecondaryDeviceName(char *getbuf) | ||
1696 | **********/ | 1747 | **********/ |
1697 | static int Uart_DEV2_RecvDeal_SetGimbalRange(char *getbuf) | 1748 | static int Uart_DEV2_RecvDeal_SetGimbalRange(char *getbuf) |
1698 | { | 1749 | { |
1699 | - USER_LOG_INFO("设置云台最大值最小值\n"); | 1750 | + JZSDK_LOG_INFO("设置云台最大值最小值\n"); |
1700 | //获取帧的序列号 | 1751 | //获取帧的序列号 |
1701 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1752 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1702 | 1753 | ||
@@ -1723,7 +1774,7 @@ static int Uart_DEV2_RecvDeal_SetGimbalRange(char *getbuf) | @@ -1723,7 +1774,7 @@ static int Uart_DEV2_RecvDeal_SetGimbalRange(char *getbuf) | ||
1723 | **********/ | 1774 | **********/ |
1724 | static int Uart_DEV2_RecvDeal_GimbalLinkageControl(char *getbuf) | 1775 | static int Uart_DEV2_RecvDeal_GimbalLinkageControl(char *getbuf) |
1725 | { | 1776 | { |
1726 | - USER_LOG_INFO("设置云台联动\n"); | 1777 | + JZSDK_LOG_INFO("设置云台联动\n"); |
1727 | 1778 | ||
1728 | //获取帧的序列号 | 1779 | //获取帧的序列号 |
1729 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1780 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
@@ -1743,7 +1794,7 @@ static int Uart_DEV2_RecvDeal_GimbalLinkageControl(char *getbuf) | @@ -1743,7 +1794,7 @@ static int Uart_DEV2_RecvDeal_GimbalLinkageControl(char *getbuf) | ||
1743 | **********/ | 1794 | **********/ |
1744 | static int Uart_DEV2_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf) | 1795 | static int Uart_DEV2_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf) |
1745 | { | 1796 | { |
1746 | - USER_LOG_INFO("收到查询是否开启云台联动\n"); | 1797 | + JZSDK_LOG_INFO("收到查询是否开启云台联动\n"); |
1747 | 1798 | ||
1748 | //获取帧的序列号 | 1799 | //获取帧的序列号 |
1749 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1800 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
@@ -1777,7 +1828,7 @@ static int Uart_DEV2_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf) | @@ -1777,7 +1828,7 @@ static int Uart_DEV2_RecvDeal_Checkstatus_GimbalLinkage(char *getbuf) | ||
1777 | **********/ | 1828 | **********/ |
1778 | static int Uart_DEV2_RecvDeal_ObtainSecondaryDeviceName(char *getbuf) | 1829 | static int Uart_DEV2_RecvDeal_ObtainSecondaryDeviceName(char *getbuf) |
1779 | { | 1830 | { |
1780 | - USER_LOG_INFO("收到从设备名\n"); | 1831 | + JZSDK_LOG_INFO("收到从设备名\n"); |
1781 | //获取帧的序列号 | 1832 | //获取帧的序列号 |
1782 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1833 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1783 | 1834 | ||
@@ -1809,7 +1860,7 @@ static int Uart_DEV2_RecvDeal_ObtainSecondaryDeviceName(char *getbuf) | @@ -1809,7 +1860,7 @@ static int Uart_DEV2_RecvDeal_ObtainSecondaryDeviceName(char *getbuf) | ||
1809 | **********/ | 1860 | **********/ |
1810 | static int Uart_DEV2_RecvDeal_ObtainGimbalLinkage(char *getbuf) | 1861 | static int Uart_DEV2_RecvDeal_ObtainGimbalLinkage(char *getbuf) |
1811 | { | 1862 | { |
1812 | - USER_LOG_INFO("收到云台联动值\n"); | 1863 | + JZSDK_LOG_INFO("收到云台联动值\n"); |
1813 | //获取帧的序列号 | 1864 | //获取帧的序列号 |
1814 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); | 1865 | int FrameSequence = JZsdk_Get_FrameSequence(getbuf); |
1815 | 1866 | ||
@@ -1844,7 +1895,7 @@ static int Uart_DEV2_RecvDeal_ObtainGimbalLinkage(char *getbuf) | @@ -1844,7 +1895,7 @@ static int Uart_DEV2_RecvDeal_ObtainGimbalLinkage(char *getbuf) | ||
1844 | **********/ | 1895 | **********/ |
1845 | static int Uart_DEV2_RecvDeal_FrameErrorReply(char *getbuf) | 1896 | static int Uart_DEV2_RecvDeal_FrameErrorReply(char *getbuf) |
1846 | { | 1897 | { |
1847 | - USER_LOG_ERROR("帧指令错误:帧错误或者是帧无对应操作\n"); | 1898 | + JZSDK_LOG_ERROR("帧指令错误:帧错误或者是帧无对应操作\n"); |
1848 | //无法正常获取帧的序列号 | 1899 | //无法正常获取帧的序列号 |
1849 | //回复操作失败 | 1900 | //回复操作失败 |
1850 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, 0x00); | 1901 | JZsdk_Uart_SendDeal_Reply_Failure(UART_DEV_2, 0x00); |
@@ -1859,7 +1910,7 @@ static int Uart_DEV2_RecvDeal_FrameErrorReply(char *getbuf) | @@ -1859,7 +1910,7 @@ static int Uart_DEV2_RecvDeal_FrameErrorReply(char *getbuf) | ||
1859 | **********/ | 1910 | **********/ |
1860 | static int Uart_DEV2_RecvDeal_OperationSuccessful(char *getbuf) | 1911 | static int Uart_DEV2_RecvDeal_OperationSuccessful(char *getbuf) |
1861 | { | 1912 | { |
1862 | - USER_LOG_INFO("接受到操作成功\n"); | 1913 | + JZSDK_LOG_INFO("接受到操作成功\n"); |
1863 | } | 1914 | } |
1864 | 1915 | ||
1865 | /********* | 1916 | /********* |
@@ -1870,7 +1921,7 @@ static int Uart_DEV2_RecvDeal_OperationSuccessful(char *getbuf) | @@ -1870,7 +1921,7 @@ static int Uart_DEV2_RecvDeal_OperationSuccessful(char *getbuf) | ||
1870 | **********/ | 1921 | **********/ |
1871 | static int Uart_DEV2_RecvDeal_OperationFailed(char *getbuf) | 1922 | static int Uart_DEV2_RecvDeal_OperationFailed(char *getbuf) |
1872 | { | 1923 | { |
1873 | - USER_LOG_INFO("接受到操作失败\n"); | 1924 | + JZSDK_LOG_INFO("接受到操作失败\n"); |
1874 | } | 1925 | } |
1875 | /******************************************************************************************************** | 1926 | /******************************************************************************************************** |
1876 | ********* ********| | 1927 | ********* ********| |
@@ -1887,7 +1938,7 @@ static int Uart_DEV2_RecvDeal_OperationFailed(char *getbuf) | @@ -1887,7 +1938,7 @@ static int Uart_DEV2_RecvDeal_OperationFailed(char *getbuf) | ||
1887 | *********************************************************************************************************/ | 1938 | *********************************************************************************************************/ |
1888 | int Uart_DEV2_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len) | 1939 | int Uart_DEV2_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int len) |
1889 | { | 1940 | { |
1890 | - USER_LOG_INFO("串口设备2号,接受到的模式为:%x",Receive_mode); | 1941 | + JZSDK_LOG_INFO("串口设备2号,接受到的模式为:%x",Receive_mode); |
1891 | switch (Receive_mode) | 1942 | switch (Receive_mode) |
1892 | { | 1943 | { |
1893 | /******************************************************************************************************************************* | 1944 | /******************************************************************************************************************************* |
@@ -2195,9 +2246,20 @@ int Uart_DEV2_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le | @@ -2195,9 +2246,20 @@ int Uart_DEV2_RecvDeal_RecvDeal(int Receive_mode, unsigned char *getdata, int le | ||
2195 | 2246 | ||
2196 | //序列号查询 | 2247 | //序列号查询 |
2197 | case JZ_INSCODE_5AFRAME_CHECKSTATUS_SERIALNUMBER: | 2248 | case JZ_INSCODE_5AFRAME_CHECKSTATUS_SERIALNUMBER: |
2249 | + Uart_DEV2_RecvDeal_CheckStatus_SerialNumber(getdata); | ||
2250 | + break; | ||
2198 | 2251 | ||
2252 | + //向外供电开关 | ||
2253 | + case JZ_INSCODE_5AFRAME_OUTPUTPOWER_CONTROL: | ||
2254 | + Uart_DEV2_RecvDeal_OutPutPower_Control(getdata); | ||
2199 | break; | 2255 | break; |
2200 | 2256 | ||
2257 | + //查询向外供电情况 | ||
2258 | + case JZ_INSCODE_5AFRAME_CHECKSTATUS_OUTPUTPOWER: | ||
2259 | + Uart_DEV2_RecvDeal_Checkstatus_OutPutPower(getdata); | ||
2260 | + break; | ||
2261 | + | ||
2262 | + | ||
2201 | 2263 | ||
2202 | /******************************************************************************************************************************* | 2264 | /******************************************************************************************************************************* |
2203 | * | 2265 | * |
@@ -2586,7 +2648,7 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV2(unsigned char *getbuf, int len) | @@ -2586,7 +2648,7 @@ int JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV2(unsigned char *getbuf, int len) | ||
2586 | * ****************/ | 2648 | * ****************/ |
2587 | int JZsdk_Uart_RecvDeal_Set_UART_DEV2_Receive_mode(int value) | 2649 | int JZsdk_Uart_RecvDeal_Set_UART_DEV2_Receive_mode(int value) |
2588 | { | 2650 | { |
2589 | - USER_LOG_INFO("串口设备2号,二次修改接收模式%x\n",value); | 2651 | + JZSDK_LOG_INFO("串口设备2号,二次修改接收模式%x\n",value); |
2590 | UART_DEV2_Receive_mode = value; | 2652 | UART_DEV2_Receive_mode = value; |
2591 | return 0; | 2653 | return 0; |
2592 | } | 2654 | } |
@@ -96,7 +96,30 @@ int JZsdk_Uart_SendDeal_QuerySecondaryDeviceName(int Uartport ,int FrameSequence | @@ -96,7 +96,30 @@ int JZsdk_Uart_SendDeal_QuerySecondaryDeviceName(int Uartport ,int FrameSequence | ||
96 | JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); | 96 | JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); |
97 | } | 97 | } |
98 | 98 | ||
99 | +//发送当前设备序列号 | ||
100 | +int JZsdk_Uart_SendDeal_SerialNumber(int UartPort, int FrameSequence, char *SerialNumber) | ||
101 | +{ | ||
102 | + char sendbuf[256]; | ||
103 | + int send_buf_len; | ||
99 | 104 | ||
105 | + //1、获取帧样板 | ||
106 | + JZsdk_GetFrameTemplate(JZ_INSCODE_5BFRAME_CHECKSTATUS_SERIALNUMBER , sendbuf, &send_buf_len); | ||
107 | + | ||
108 | + //2、写入数据 | ||
109 | + sendbuf[6] = FrameSequence; //帧序列 | ||
110 | + | ||
111 | + for (int i = 0; i < 14; i++) | ||
112 | + { | ||
113 | + sendbuf[9+i] = SerialNumber[i]; | ||
114 | + } | ||
115 | + | ||
116 | + sendbuf[21] = 0x00; | ||
117 | + sendbuf[22] = 0x23; | ||
118 | + sendbuf[4] = 0x17; | ||
119 | + | ||
120 | + //3、发送帧 | ||
121 | + JZsdk_Uart_SendDeal_SendOreder(UartPort ,sendbuf, send_buf_len); | ||
122 | +} | ||
100 | 123 | ||
101 | 124 | ||
102 | //发送歌曲名字 | 125 | //发送歌曲名字 |
@@ -423,7 +446,8 @@ int JZsdk_Uart_SendDeal_Set_GimbalFineTuningPitch(int Uartport, int PitchFineTun | @@ -423,7 +446,8 @@ int JZsdk_Uart_SendDeal_Set_GimbalFineTuningPitch(int Uartport, int PitchFineTun | ||
423 | sendbuf[9] = 0x00; | 446 | sendbuf[9] = 0x00; |
424 | } | 447 | } |
425 | 448 | ||
426 | - sendbuf[10] = (PitchFineTuning & 0xff); | 449 | + sendbuf[10] = ((PitchFineTuning>>8) & 0xff); |
450 | + sendbuf[11] = (PitchFineTuning & 0xff); | ||
427 | 451 | ||
428 | //3、发送帧 | 452 | //3、发送帧 |
429 | JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); | 453 | JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); |
@@ -467,7 +491,8 @@ int JZsdk_Uart_SendDeal_Reply_GimbalFineTuningPitch(int Uartport, int FrameSeque | @@ -467,7 +491,8 @@ int JZsdk_Uart_SendDeal_Reply_GimbalFineTuningPitch(int Uartport, int FrameSeque | ||
467 | sendbuf[9] = 0x00; | 491 | sendbuf[9] = 0x00; |
468 | } | 492 | } |
469 | 493 | ||
470 | - sendbuf[10] = (FineTunigPitch & 0xff); | 494 | + sendbuf[10] = ((FineTunigPitch>>8) & 0xff); |
495 | + sendbuf[11] = (FineTunigPitch & 0xff); | ||
471 | 496 | ||
472 | //3、发送帧 | 497 | //3、发送帧 |
473 | JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); | 498 | JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); |
@@ -526,6 +551,24 @@ int JZsdk_Uart_SendDeal_GimbalLinkageControl(int Uartport,int FrameSequence,int | @@ -526,6 +551,24 @@ int JZsdk_Uart_SendDeal_GimbalLinkageControl(int Uartport,int FrameSequence,int | ||
526 | JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); | 551 | JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); |
527 | } | 552 | } |
528 | 553 | ||
554 | +//发送云台最大最小值帧 | ||
555 | +int JZsdk_Uart_SendDeal_SetGimbalRange(int Uartport,int FrameSequence,int value) | ||
556 | +{ | ||
557 | + printf("发送云台最大最小值帧\n"); | ||
558 | + char sendbuf[256]; | ||
559 | + int send_buf_len; | ||
560 | + | ||
561 | + //1、获取帧样板 | ||
562 | + JZsdk_GetFrameTemplate(JZ_INSCODE_6AFRAME_SET_GIMBAL_MAXMIN_RANGE, sendbuf, &send_buf_len); | ||
563 | + | ||
564 | + //2、写入数据 | ||
565 | + sendbuf[6] = FrameSequence; //帧序列 | ||
566 | + sendbuf[10] = value; | ||
567 | + | ||
568 | + //3、发送帧 | ||
569 | + JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); | ||
570 | +} | ||
571 | + | ||
529 | /**************************************************************************************************************************************************** | 572 | /**************************************************************************************************************************************************** |
530 | * | 573 | * |
531 | * 探照灯部分 | 574 | * 探照灯部分 |
@@ -902,4 +945,26 @@ int JZsdk_Uart_SendDeal_WarningLight_Color(int Uartport, int color1, int color2) | @@ -902,4 +945,26 @@ int JZsdk_Uart_SendDeal_WarningLight_Color(int Uartport, int color1, int color2) | ||
902 | 945 | ||
903 | //3、发送帧 | 946 | //3、发送帧 |
904 | JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); | 947 | JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); |
948 | +} | ||
949 | + | ||
950 | +/************* | ||
951 | + * | ||
952 | + * 发送对外电源状态 | ||
953 | + * | ||
954 | + * **************/ | ||
955 | +int JZsdk_Uart_SendDeal_OutputPowerStatus(int Uartport, int FrameSequence, int status) | ||
956 | +{ | ||
957 | + printf("发送对外电源状态帧\n"); | ||
958 | + | ||
959 | + char sendbuf[256]; | ||
960 | + int send_buf_len; | ||
961 | + | ||
962 | + //1、获取帧样板 | ||
963 | + JZsdk_GetFrameTemplate(JZ_INSCODE_5BFRAME_CHECKSTATUS_OUTPUTPOWER, sendbuf, &send_buf_len); | ||
964 | + | ||
965 | + //2、写入数据 | ||
966 | + sendbuf[9] = status; | ||
967 | + | ||
968 | + //3、发送帧 | ||
969 | + JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len); | ||
905 | } | 970 | } |
@@ -47,6 +47,7 @@ int JZsdk_Uart_SendDeal_Set_GimbalLinkageControl(int Uartport,int FrameSequence, | @@ -47,6 +47,7 @@ int JZsdk_Uart_SendDeal_Set_GimbalLinkageControl(int Uartport,int FrameSequence, | ||
47 | int JZsdk_Uart_SendDeal_CheckStatus_GimbalLinkage(int Uartport,int FrameSequence); | 47 | int JZsdk_Uart_SendDeal_CheckStatus_GimbalLinkage(int Uartport,int FrameSequence); |
48 | int JZsdk_Uart_SendDeal_GimbalLinkageControl(int Uartport,int FrameSequence,int value); | 48 | int JZsdk_Uart_SendDeal_GimbalLinkageControl(int Uartport,int FrameSequence,int value); |
49 | int JZsdk_Uart_SendDeal_CheckStatus_GimbalAngle(int Uartport ,int FrameSequence); | 49 | int JZsdk_Uart_SendDeal_CheckStatus_GimbalAngle(int Uartport ,int FrameSequence); |
50 | +int JZsdk_Uart_SendDeal_SetGimbalRange(int Uartport,int FrameSequence,int value); | ||
50 | 51 | ||
51 | 52 | ||
52 | int JZsdk_Uart_SendDeal_Reply_SoftVersion(int Uartport ,char majorVersion, char minorVersion, char modifyVersion, char debugVersion); | 53 | int JZsdk_Uart_SendDeal_Reply_SoftVersion(int Uartport ,char majorVersion, char minorVersion, char modifyVersion, char debugVersion); |
@@ -62,6 +63,8 @@ int JZsdk_Uart_SendDeal_MessageSubcription_Control(int Uartport, int value); | @@ -62,6 +63,8 @@ int JZsdk_Uart_SendDeal_MessageSubcription_Control(int Uartport, int value); | ||
62 | int JZsdk_Uart_SendDeal_Set_WarningLight_Status(int Uartport,int status, int mode); | 63 | int JZsdk_Uart_SendDeal_Set_WarningLight_Status(int Uartport,int status, int mode); |
63 | int JZsdk_Uart_SendDeal_Set_WarningLight_Color(int Uartport,int color1, int color2); | 64 | int JZsdk_Uart_SendDeal_Set_WarningLight_Color(int Uartport,int color1, int color2); |
64 | 65 | ||
66 | +int JZsdk_Uart_SendDeal_SerialNumber(int UartPort, int FrameSequence, char *SerialNumber); | ||
67 | + | ||
65 | 68 | ||
66 | 69 | ||
67 | 70 | ||
@@ -86,6 +89,8 @@ int JZsdk_Uart_SendDeal_WarningLight_Color(int Uartport, int color1, int color2) | @@ -86,6 +89,8 @@ int JZsdk_Uart_SendDeal_WarningLight_Color(int Uartport, int color1, int color2) | ||
86 | int JZsdk_Uart_SendDeal_CheckStatus_WarningLightStatus(int Uartport); | 89 | int JZsdk_Uart_SendDeal_CheckStatus_WarningLightStatus(int Uartport); |
87 | int JZsdk_Uart_SendDeal_CheckStatus_WarningLightColor(int Uartport); | 90 | int JZsdk_Uart_SendDeal_CheckStatus_WarningLightColor(int Uartport); |
88 | 91 | ||
92 | +int JZsdk_Uart_SendDeal_OutputPowerStatus(int Uartport, int FrameSequence, int status); | ||
93 | + | ||
89 | 94 | ||
90 | /* Exported functions --------------------------------------------------------*/ | 95 | /* Exported functions --------------------------------------------------------*/ |
91 | 96 |
-
请 注册 或 登录 后发表评论