第一次提交

This commit is contained in:
2023-03-22 09:47:10 +08:00
commit f713586b04
633 changed files with 266330 additions and 0 deletions

View File

@ -0,0 +1,262 @@
/**
********************************************************************
* @file dji_media_file_core.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <string.h>
#include <dji_logger.h>
#include "dji_media_file_core.h"
#include "dji_media_file_jpg.h"
#include "dji_media_file_mp4.h"
#include "dji_platform.h"
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Private values ------------------------------------------------------------*/
//@formatter:off
static const T_DjiMediaFileOptItem s_mediaFileOpt[] =
{
//JPEG File Operation Item
{
DJI_CAMERA_FILE_TYPE_JPEG ,
DjiMediaFile_IsSupported_JPG,
DjiMediaFile_GetAttrFunc_JPG,
DjiMediaFile_GetDataOrigin_JPG,
DjiMediaFile_GetFileSizeOrigin_JPG,
DjiMediaFile_CreateThumbNail_JPG,
DjiMediaFile_GetFileSizeThumbNail_JPG,
DjiMediaFile_GetDataThumbNail_JPG,
DjiMediaFile_DestroyThumbNail_JPG,
DjiMediaFile_CreateScreenNail_JPG,
DjiMediaFile_GetFileSizeScreenNail_JPG,
DjiMediaFile_GetDataScreenNail_JPG,
DjiMediaFile_DestroyScreenNail_JPG,
},
//MP4 File Operation Item
{
DJI_CAMERA_FILE_TYPE_MP4 ,
DjiMediaFile_IsSupported_MP4,
DjiMediaFile_GetAttrFunc_MP4,
DjiMediaFile_GetDataOrigin_MP4,
DjiMediaFile_GetFileSizeOrigin_MP4,
DjiMediaFile_CreateThumbNail_MP4,
DjiMediaFile_GetFileSizeThumbNail_MP4,
DjiMediaFile_GetDataThumbNail_MP4,
DjiMediaFile_DestroyThumbNail_MP4,
DjiMediaFile_CreateScreenNail_MP4,
DjiMediaFile_GetFileSizeScreenNail_MP4,
DjiMediaFile_GetDataScreenNail_MP4,
DjiMediaFile_DestroyScreenNail_MP4,
},
};
static const uint32_t s_mediaFileOptCount = sizeof (s_mediaFileOpt) / sizeof(T_DjiMediaFileOptItem);
//@formatter:on
/* Exported functions definition ---------------------------------------------*/
bool DjiMediaFile_IsSupported(const char *filePath)
{
int i;
for (i = 0; i < s_mediaFileOptCount; i++) {
if (s_mediaFileOpt[i].isSupportedFunc(filePath) == true) {
return true;
}
}
return false;
}
T_DjiReturnCode DjiMediaFile_CreateHandle(const char *filePath, T_DjiMediaFileHandle *pMediaFileHandle)
{
int optIndex;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
for (optIndex = 0; optIndex < s_mediaFileOptCount; optIndex++) {
if (s_mediaFileOpt[optIndex].isSupportedFunc(filePath) == true) {
break;
}
}
if (optIndex == s_mediaFileOptCount) {
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
*pMediaFileHandle = osalHandler->Malloc(sizeof(T_DjiMediaFile));
if (*pMediaFileHandle == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
(*pMediaFileHandle)->filePath = osalHandler->Malloc(strlen(filePath) + 1);
if ((*pMediaFileHandle)->filePath == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
(*pMediaFileHandle)->mediaFileOptItem = s_mediaFileOpt[optIndex];
(*pMediaFileHandle)->mediaFileThm.privThm = NULL;
(*pMediaFileHandle)->mediaFileScr.privScr = NULL;
strcpy((*pMediaFileHandle)->filePath, filePath);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiMediaFile_DestroyHandle(T_DjiMediaFileHandle mediaFileHandle)
{
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
osalHandler->Free(mediaFileHandle->filePath);
osalHandler->Free(mediaFileHandle);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiMediaFile_GetMediaFileType(T_DjiMediaFileHandle mediaFileHandle,
E_DjiCameraMediaFileType *mediaFileType)
{
*mediaFileType = mediaFileHandle->mediaFileOptItem.mediaFileType;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiMediaFile_GetMediaFileAttr(T_DjiMediaFileHandle mediaFileHandle,
T_DjiCameraMediaFileAttr *mediaFileAttr)
{
if (mediaFileHandle->mediaFileOptItem.getAttrFunc == NULL) {
USER_LOG_ERROR("Media file handle getAttrFunc null error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getAttrFunc(mediaFileHandle, mediaFileAttr);
}
T_DjiReturnCode DjiMediaFile_GetDataOrg(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
if (mediaFileHandle->mediaFileOptItem.getDataOrgFunc == NULL) {
USER_LOG_ERROR("Media file handle getDataOrgFunc null error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getDataOrgFunc(mediaFileHandle, offset, len, data, realLen);
}
T_DjiReturnCode DjiMediaFile_GetFileSizeOrg(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize)
{
if (mediaFileHandle->mediaFileOptItem.getFileSizeOrgFunc == NULL) {
USER_LOG_ERROR("Media file handle getFileSizeOrgFunc null error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getFileSizeOrgFunc(mediaFileHandle, fileSize);
}
T_DjiReturnCode DjiMediaFile_CreateThm(T_DjiMediaFileHandle mediaFileHandle)
{
if (mediaFileHandle->mediaFileOptItem.createThmFunc == NULL) {
USER_LOG_ERROR("Media file handle createThmFunc null error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.createThmFunc(mediaFileHandle);
}
T_DjiReturnCode DjiMediaFile_GetFileSizeThm(T_DjiMediaFileHandle mediaFileHandle, uint32_t *fileSize)
{
if (mediaFileHandle->mediaFileOptItem.getFileSizeThmFunc == NULL) {
USER_LOG_ERROR("Media file handle getFileSizeThmFunc null error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getFileSizeThmFunc(mediaFileHandle, fileSize);
}
T_DjiReturnCode DjiMediaFile_GetDataThm(T_DjiMediaFileHandle mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
if (mediaFileHandle->mediaFileOptItem.getDataThmFunc == NULL) {
USER_LOG_ERROR("Media file handle getDataThmFunc null error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getDataThmFunc(mediaFileHandle, offset, len, data, realLen);
}
T_DjiReturnCode DjiMediaFile_DestoryThm(T_DjiMediaFileHandle mediaFileHandle)
{
if (mediaFileHandle->mediaFileOptItem.destroyThmFunc == NULL) {
USER_LOG_ERROR("Media file handle destroyThmFunc null error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.destroyThmFunc(mediaFileHandle);
}
T_DjiReturnCode DjiMediaFile_CreateScr(T_DjiMediaFileHandle mediaFileHandle)
{
if (mediaFileHandle->mediaFileOptItem.creatScrFunc == NULL) {
USER_LOG_ERROR("Media file handle creatScrFunc null error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.creatScrFunc(mediaFileHandle);
}
T_DjiReturnCode DjiMediaFile_GetFileSizeScr(T_DjiMediaFileHandle mediaFileHandle, uint32_t *fileSize)
{
if (mediaFileHandle->mediaFileOptItem.getFileSizeScrFunc == NULL) {
USER_LOG_ERROR("Media file handle getFileSizeScrFunc null error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getFileSizeScrFunc(mediaFileHandle, fileSize);
}
T_DjiReturnCode DjiMediaFile_GetDataScr(T_DjiMediaFileHandle mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
if (mediaFileHandle->mediaFileOptItem.getDataScrFunc == NULL) {
USER_LOG_ERROR("Media file handle getDataScrFunc null error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getDataScrFunc(mediaFileHandle, offset, len, data, realLen);
}
T_DjiReturnCode DjiMediaFile_DestroyScr(T_DjiMediaFileHandle mediaFileHandle)
{
if (mediaFileHandle->mediaFileOptItem.destroyScrFunc == NULL) {
USER_LOG_ERROR("Media file handle destroyScrFunc null error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.destroyScrFunc(mediaFileHandle);
}
/* Private functions definition-----------------------------------------------*/
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,115 @@
/**
********************************************************************
* @file dji_media_file_core.h
* @brief This is the header file for "dji_media_file_core.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef PSDK_MEDIA_FILE_CORE_H
#define PSDK_MEDIA_FILE_CORE_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include <dji_typedef.h>
#include <dji_payload_camera.h>
/* Exported constants --------------------------------------------------------*/
#define PSDK_MEDIA_FILE_PATH_LEN_MAX 512 /*max file path len */
#define PSDK_MEDIA_DIR_PATH_LEN_MAX 256 /*max dir path len */
/* Exported types ------------------------------------------------------------*/
typedef struct {
void *privThm;
} T_DjiMediaFileThm;
typedef struct {
void *privScr;
} T_DjiMediaFileScr;
struct _DjiMediaFile;
typedef struct {
E_DjiCameraMediaFileType mediaFileType;
bool (*isSupportedFunc)(const char *filePath);
T_DjiReturnCode (*getAttrFunc)(struct _DjiMediaFile *mediaFileHandle, T_DjiCameraMediaFileAttr *mediaFileAttr);
T_DjiReturnCode (*getDataOrgFunc)(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode (*getFileSizeOrgFunc)(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize);
T_DjiReturnCode (*createThmFunc)(struct _DjiMediaFile *mediaFileHandle);
T_DjiReturnCode (*getFileSizeThmFunc)(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize);
T_DjiReturnCode (*getDataThmFunc)(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode (*destroyThmFunc)(struct _DjiMediaFile *mediaFileHandle);
T_DjiReturnCode (*creatScrFunc)(struct _DjiMediaFile *mediaFileHandle);
T_DjiReturnCode (*getFileSizeScrFunc)(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize);
T_DjiReturnCode (*getDataScrFunc)(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode (*destroyScrFunc)(struct _DjiMediaFile *mediaFileHandle);
} T_DjiMediaFileOptItem;
typedef struct _DjiMediaFile {
char *filePath;
T_DjiMediaFileOptItem mediaFileOptItem;
T_DjiMediaFileThm mediaFileThm;
T_DjiMediaFileScr mediaFileScr;
} T_DjiMediaFile, *T_DjiMediaFileHandle;
/* Exported functions --------------------------------------------------------*/
bool DjiMediaFile_IsSupported(const char *filePath);
T_DjiReturnCode DjiMediaFile_CreateHandle(const char *filePath, T_DjiMediaFileHandle *pMediaFileHandle);
T_DjiReturnCode DjiMediaFile_DestroyHandle(T_DjiMediaFileHandle mediaFileHandle);
T_DjiReturnCode DjiMediaFile_GetMediaFileType(T_DjiMediaFileHandle mediaFileHandle,
E_DjiCameraMediaFileType *mediaFileType);
T_DjiReturnCode DjiMediaFile_GetMediaFileAttr(T_DjiMediaFileHandle mediaFileHandle,
T_DjiCameraMediaFileAttr *mediaFileAttr);
T_DjiReturnCode DjiMediaFile_GetDataOrg(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode DjiMediaFile_GetFileSizeOrg(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize);
T_DjiReturnCode DjiMediaFile_CreateThm(T_DjiMediaFileHandle mediaFileHandle);
T_DjiReturnCode DjiMediaFile_GetFileSizeThm(T_DjiMediaFileHandle mediaFileHandle, uint32_t *fileSize);
T_DjiReturnCode DjiMediaFile_GetDataThm(T_DjiMediaFileHandle mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode DjiMediaFile_DestoryThm(T_DjiMediaFileHandle mediaFileHandle);
T_DjiReturnCode DjiMediaFile_CreateScr(T_DjiMediaFileHandle mediaFileHandle);
T_DjiReturnCode DjiMediaFile_GetFileSizeScr(T_DjiMediaFileHandle mediaFileHandle, uint32_t *fileSize);
T_DjiReturnCode DjiMediaFile_GetDataScr(T_DjiMediaFileHandle mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode DjiMediaFile_DestroyScr(T_DjiMediaFileHandle mediaFileHandle);
#ifdef __cplusplus
}
#endif
#endif // PSDK_MEDIA_FILE_CORE_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,228 @@
/**
********************************************************************
* @file dji_media_file_jpg.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "dji_media_file_jpg.h"
#include "dji_media_file_core.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <dji_logger.h>
#include <utils/util_misc.h>
#include "dji_platform.h"
#include "utils/util_time.h"
#include "utils/util_file.h"
/* Private constants ---------------------------------------------------------*/
#define JPG_FILE_SUFFIX ".jpg"
#define JPG_TEMP_FILE_TEMPLATE_STR "JPG_TEMP_XXXXXX.jpg"
#define JPG_TEMP_FILE_PATH_MAX_LEN 50
#define FFMPEG_CMD_BUF_SIZE 1024
#define JPG_THM_SCALE_CFG_STR "scale=100:-1"
#define JPG_SCR_SCALE_CFG_STR "scale=600:-1"
/* Private types -------------------------------------------------------------*/
typedef struct {
FILE *tempFile;
char tempfilePath[JPG_TEMP_FILE_PATH_MAX_LEN];
} T_DjiJPGTempFilePriv;
/* Private functions declaration ---------------------------------------------*/
static T_DjiReturnCode DjiMediaFile_CreateTempFilePriv_JPG(const char *srcFilePath, const char *scaleCfgStr,
T_DjiJPGTempFilePriv **pTempFilePrivHandle);
static T_DjiReturnCode DjiMediaFile_DestroyTempFilePriv_JPG(T_DjiJPGTempFilePriv *tempFilePrivHandle);
/* Exported functions definition ---------------------------------------------*/
bool DjiMediaFile_IsSupported_JPG(const char *filePath)
{
if (filePath == NULL) {
USER_LOG_ERROR("input parameter is null error");
return false;
}
if (strcmp(&filePath[strlen(filePath) - 4], JPG_FILE_SUFFIX) == 0) {
return true;
}
return false;
}
T_DjiReturnCode DjiMediaFile_GetAttrFunc_JPG(struct _DjiMediaFile *mediaFileHandle,
T_DjiCameraMediaFileAttr *mediaFileAttr)
{
USER_UTIL_UNUSED(mediaFileHandle);
mediaFileAttr->attrVideoDuration = 0;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiMediaFile_GetDataOrigin_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
return UtilFile_GetFileDataByPath(mediaFileHandle->filePath, offset, len, data, realLen);
}
T_DjiReturnCode DjiMediaFile_GetFileSizeOrigin_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize)
{
return UtilFile_GetFileSizeByPath(mediaFileHandle->filePath, fileSize);
}
T_DjiReturnCode DjiMediaFile_CreateThumbNail_JPG(struct _DjiMediaFile *mediaFileHandle)
{
return DjiMediaFile_CreateTempFilePriv_JPG(mediaFileHandle->filePath, JPG_THM_SCALE_CFG_STR,
(T_DjiJPGTempFilePriv **) &mediaFileHandle->mediaFileThm.privThm);
}
T_DjiReturnCode DjiMediaFile_GetFileSizeThumbNail_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize)
{
T_DjiJPGTempFilePriv *jpgFileThmPriv = (T_DjiJPGTempFilePriv *) mediaFileHandle->mediaFileThm.privThm;
return UtilFile_GetFileSize(jpgFileThmPriv->tempFile, fileSize);
}
T_DjiReturnCode
DjiMediaFile_GetDataThumbNail_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
T_DjiJPGTempFilePriv *jpgFileThmPriv = (T_DjiJPGTempFilePriv *) mediaFileHandle->mediaFileThm.privThm;
return UtilFile_GetFileData(jpgFileThmPriv->tempFile, offset, len, data, realLen);
}
T_DjiReturnCode DjiMediaFile_DestroyThumbNail_JPG(struct _DjiMediaFile *mediaFileHandle)
{
return DjiMediaFile_DestroyTempFilePriv_JPG(mediaFileHandle->mediaFileThm.privThm);
}
T_DjiReturnCode DjiMediaFile_CreateScreenNail_JPG(struct _DjiMediaFile *mediaFileHandle)
{
return DjiMediaFile_CreateTempFilePriv_JPG(mediaFileHandle->filePath, JPG_SCR_SCALE_CFG_STR,
(T_DjiJPGTempFilePriv **) &mediaFileHandle->mediaFileScr.privScr);
}
T_DjiReturnCode DjiMediaFile_GetFileSizeScreenNail_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize)
{
T_DjiJPGTempFilePriv *jpgFileScrPriv = (T_DjiJPGTempFilePriv *) mediaFileHandle->mediaFileScr.privScr;
return UtilFile_GetFileSize(jpgFileScrPriv->tempFile, fileSize);
}
T_DjiReturnCode
DjiMediaFile_GetDataScreenNail_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
T_DjiJPGTempFilePriv *jpgFileScrPriv = (T_DjiJPGTempFilePriv *) mediaFileHandle->mediaFileScr.privScr;
return UtilFile_GetFileData(jpgFileScrPriv->tempFile, offset, len, data, realLen);
}
T_DjiReturnCode DjiMediaFile_DestroyScreenNail_JPG(struct _DjiMediaFile *mediaFileHandle)
{
return DjiMediaFile_DestroyTempFilePriv_JPG(mediaFileHandle->mediaFileScr.privScr);
}
/* Private functions definition-----------------------------------------------*/
static T_DjiReturnCode DjiMediaFile_CreateTempFilePriv_JPG(const char *srcFilePath, const char *scaleCfgStr,
T_DjiJPGTempFilePriv **pTempFilePrivHandle)
{
char ffmpeg_cmd[FFMPEG_CMD_BUF_SIZE];
int cmdRet;
T_DjiRunTimeStamps tiStart, tiEnd;
T_DjiJPGTempFilePriv *jpgTempFilePriv;
T_DjiReturnCode psdkStat;
int tempFd;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
tiStart = DjiUtilTime_GetRunTimeStamps();
*pTempFilePrivHandle = osalHandler->Malloc(sizeof(T_DjiJPGTempFilePriv));
if (*pTempFilePrivHandle == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
jpgTempFilePriv = *pTempFilePrivHandle;
//get temp file name
strcpy(jpgTempFilePriv->tempfilePath, JPG_TEMP_FILE_TEMPLATE_STR);
tempFd = mkstemps(jpgTempFilePriv->tempfilePath, strlen(JPG_FILE_SUFFIX));
if (tempFd < 0) {
USER_LOG_ERROR("JPG Create Temp File Error, tempFd = %d\n", tempFd);
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto err_create_temp;
}
close(tempFd);
unlink(jpgTempFilePriv->tempfilePath);
//ffmpeg cmd send
snprintf(ffmpeg_cmd, FFMPEG_CMD_BUF_SIZE, "ffmpeg -i \"%s\" -vf %s %s 1>/dev/null 2>&1",
srcFilePath, scaleCfgStr, jpgTempFilePriv->tempfilePath);
cmdRet = system(ffmpeg_cmd);
tiEnd = DjiUtilTime_GetRunTimeStamps();
USER_LOG_DEBUG("JPG Create TempFile, RealTime = %ld us\n", tiEnd.realUsec - tiStart.realUsec);
if (cmdRet != 0) {
USER_LOG_ERROR("JPG ffmpeg cmd call error, ret = %d\n", cmdRet);
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto err_system_cmd;
}
//open temp file
jpgTempFilePriv->tempFile = fopen(jpgTempFilePriv->tempfilePath, "rb+");
if (jpgTempFilePriv->tempFile == NULL) {
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto err_file_open;
}
//unlink temp file
unlink(jpgTempFilePriv->tempfilePath);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
err_file_open:
unlink(jpgTempFilePriv->tempfilePath);
err_system_cmd:
err_create_temp:
osalHandler->Free(*pTempFilePrivHandle);
return psdkStat;
}
static T_DjiReturnCode DjiMediaFile_DestroyTempFilePriv_JPG(T_DjiJPGTempFilePriv *tempFilePrivHandle)
{
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
fclose(tempFilePrivHandle->tempFile);
osalHandler->Free(tempFilePrivHandle);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,75 @@
/**
********************************************************************
* @file dji_media_file_jpg.h
* @brief This is the header file for "dji_media_file_jpg.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef PSDK_MEDIA_FILE_JPG_H
#define PSDK_MEDIA_FILE_JPG_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include <dji_payload_camera.h>
#include <dji_typedef.h>
#include "dji_media_file_core.h"
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
bool DjiMediaFile_IsSupported_JPG(const char *filePath);
T_DjiReturnCode DjiMediaFile_GetAttrFunc_JPG(struct _DjiMediaFile *mediaFileHandle,
T_DjiCameraMediaFileAttr *mediaFileAttr);
T_DjiReturnCode DjiMediaFile_GetDataOrigin_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode DjiMediaFile_GetFileSizeOrigin_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize);
T_DjiReturnCode DjiMediaFile_CreateThumbNail_JPG(struct _DjiMediaFile *mediaFileHandle);
T_DjiReturnCode DjiMediaFile_GetFileSizeThumbNail_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize);
T_DjiReturnCode
DjiMediaFile_GetDataThumbNail_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode DjiMediaFile_DestroyThumbNail_JPG(struct _DjiMediaFile *mediaFileHandle);
T_DjiReturnCode DjiMediaFile_CreateScreenNail_JPG(struct _DjiMediaFile *mediaFileHandle);
T_DjiReturnCode DjiMediaFile_GetFileSizeScreenNail_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize);
T_DjiReturnCode
DjiMediaFile_GetDataScreenNail_JPG(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode DjiMediaFile_DestroyScreenNail_JPG(struct _DjiMediaFile *mediaFileHandle);
#ifdef __cplusplus
}
#endif
#endif // PSDK_MEIDA_FILE_JPG_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,262 @@
/**
********************************************************************
* @file dji_media_file_mp4.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "dji_media_file_mp4.h"
#include "dji_media_file_core.h"
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <dji_logger.h>
#include <stdlib.h>
#include "dji_platform.h"
#include "utils/util_time.h"
#include "utils/util_file.h"
/* Private constants ---------------------------------------------------------*/
#define MP4_FILE_SUFFIX ".mp4"
#define MP4_TEMP_FILE_TEMPLATE_STR "MP4_TEMP_XXXXXX.jpg"
#define MP4_TEMP_FILE_PATH_MAX_LEN 50
#define FFMPEG_CMD_BUF_SIZE (256 + 256)
#define MP4_THM_SCALE_CFG_STR "scale=100:-1"
#define MP4_SCR_SCALE_CFG_STR "scale=600:-1"
/* Private types -------------------------------------------------------------*/
typedef struct {
FILE *tempFile;
char tempfilePath[MP4_TEMP_FILE_PATH_MAX_LEN];
} T_DjiMP4TempPicPriv;
/* Private functions declaration ---------------------------------------------*/
static T_DjiReturnCode DjiMediaFile_CreateTempPicPriv_MP4(const char *srcFilePath, const char *scaleCfgStr,
T_DjiMP4TempPicPriv **pTempPicPrivHandle);
static T_DjiReturnCode DjiMediaFile_DestroyTempPicPriv_MP4(T_DjiMP4TempPicPriv *tempPicPrivHandle);
/* Private values ------------------------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
bool DjiMediaFile_IsSupported_MP4(const char *filePath)
{
if (filePath == NULL) {
USER_LOG_ERROR("input parameter is null error");
return false;
}
if (strcmp(&filePath[strlen(filePath) - 4], MP4_FILE_SUFFIX) == 0) {
return true;
}
return false;
}
T_DjiReturnCode DjiMediaFile_GetAttrFunc_MP4(struct _DjiMediaFile *mediaFileHandle,
T_DjiCameraMediaFileAttr *mediaFileAttr)
{
FILE *fp;
char ffmpegCmdStr[FFMPEG_CMD_BUF_SIZE];
float hour, minute, second;
char tempTailStr[128];
int ret;
T_DjiReturnCode psdkStat;
snprintf(ffmpegCmdStr, FFMPEG_CMD_BUF_SIZE, "ffmpeg -i \"%s\" 2>&1 | grep \"Duration\"", mediaFileHandle->filePath);
fp = popen(ffmpegCmdStr, "r");
if (fp == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
ret = fscanf(fp, " Duration: %f:%f:%f,%127s", &hour, &minute, &second, tempTailStr);
if (ret <= 0) {
USER_LOG_ERROR("MP4 File Get Duration Error\n");
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto out;
}
mediaFileAttr->attrVideoDuration = (uint32_t) (hour * 3600 + minute * 60 + second + 0.5);
/*! The user needs to obtain the frame rate and resolution of the video file by ffmpeg tools.
* Also the frame rate and resolution of video need convert to enum E_DjiCameraVideoFrameRate or
* E_DjiCameraVideoResolution.
*/
mediaFileAttr->attrVideoFrameRate = DJI_CAMERA_VIDEO_FRAME_RATE_30_FPS;
mediaFileAttr->attrVideoResolution = DJI_CAMERA_VIDEO_RESOLUTION_1920x1080;
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
out:
pclose(fp);
return psdkStat;
}
T_DjiReturnCode DjiMediaFile_GetDataOrigin_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
return UtilFile_GetFileDataByPath(mediaFileHandle->filePath, offset, len, data, realLen);
}
T_DjiReturnCode DjiMediaFile_GetFileSizeOrigin_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize)
{
return UtilFile_GetFileSizeByPath(mediaFileHandle->filePath, fileSize);
}
T_DjiReturnCode DjiMediaFile_CreateThumbNail_MP4(struct _DjiMediaFile *mediaFileHandle)
{
return DjiMediaFile_CreateTempPicPriv_MP4(mediaFileHandle->filePath, MP4_THM_SCALE_CFG_STR,
(T_DjiMP4TempPicPriv **) &mediaFileHandle->mediaFileThm.privThm);
}
T_DjiReturnCode DjiMediaFile_GetFileSizeThumbNail_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize)
{
T_DjiMP4TempPicPriv *jpgFileThmPriv = (T_DjiMP4TempPicPriv *) mediaFileHandle->mediaFileThm.privThm;
return UtilFile_GetFileSize(jpgFileThmPriv->tempFile, fileSize);
}
T_DjiReturnCode
DjiMediaFile_GetDataThumbNail_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
T_DjiMP4TempPicPriv *jpgFileThmPriv = (T_DjiMP4TempPicPriv *) mediaFileHandle->mediaFileThm.privThm;
return UtilFile_GetFileData(jpgFileThmPriv->tempFile, offset, len, data, realLen);
}
T_DjiReturnCode DjiMediaFile_DestroyThumbNail_MP4(struct _DjiMediaFile *MediaFileHandle)
{
return DjiMediaFile_DestroyTempPicPriv_MP4(MediaFileHandle->mediaFileThm.privThm);
}
T_DjiReturnCode DjiMediaFile_CreateScreenNail_MP4(struct _DjiMediaFile *mediaFileHandle)
{
return DjiMediaFile_CreateTempPicPriv_MP4(mediaFileHandle->filePath, MP4_SCR_SCALE_CFG_STR,
(T_DjiMP4TempPicPriv **) &mediaFileHandle->mediaFileScr.privScr);
}
T_DjiReturnCode DjiMediaFile_GetFileSizeScreenNail_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize)
{
T_DjiMP4TempPicPriv *jpgFileScrPriv = (T_DjiMP4TempPicPriv *) mediaFileHandle->mediaFileScr.privScr;
return UtilFile_GetFileSize(jpgFileScrPriv->tempFile, fileSize);
}
T_DjiReturnCode
DjiMediaFile_GetDataScreenNail_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
T_DjiMP4TempPicPriv *jpgFileScrPriv = (T_DjiMP4TempPicPriv *) mediaFileHandle->mediaFileScr.privScr;
return UtilFile_GetFileData(jpgFileScrPriv->tempFile, offset, len, data, realLen);
}
T_DjiReturnCode DjiMediaFile_DestroyScreenNail_MP4(struct _DjiMediaFile *mediaFileHandle)
{
return DjiMediaFile_DestroyTempPicPriv_MP4(mediaFileHandle->mediaFileScr.privScr);
}
/* Private functions definition-----------------------------------------------*/
static T_DjiReturnCode DjiMediaFile_CreateTempPicPriv_MP4(const char *srcFilePath, const char *scaleCfgStr,
T_DjiMP4TempPicPriv **pTempPicPrivHandle)
{
char ffmpeg_cmd[FFMPEG_CMD_BUF_SIZE];
int cmdRet;
T_DjiRunTimeStamps tiStart, tiEnd;
T_DjiMP4TempPicPriv *mp4TempPicFile;
T_DjiReturnCode psdkStat;
int tempFd;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
tiStart = DjiUtilTime_GetRunTimeStamps();
*pTempPicPrivHandle = osalHandler->Malloc(sizeof(T_DjiMP4TempPicPriv));
if (*pTempPicPrivHandle == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
mp4TempPicFile = *pTempPicPrivHandle;
//get temp file name
strcpy(mp4TempPicFile->tempfilePath, MP4_TEMP_FILE_TEMPLATE_STR);
tempFd = mkstemps(mp4TempPicFile->tempfilePath, strlen(MP4_FILE_SUFFIX));
if (tempFd < 0) {
USER_LOG_ERROR("JPG Create Temp File Error, tempFd = %d\n", tempFd);
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto err_create_temp;
}
close(tempFd);
unlink(mp4TempPicFile->tempfilePath);
//ffmpeg cmd send
snprintf(ffmpeg_cmd, FFMPEG_CMD_BUF_SIZE, "ffmpeg -i \"%s\" -vf %s -ss 00:00:00 -vframes 1 %s 1>/dev/null 2>&1",
srcFilePath, scaleCfgStr, mp4TempPicFile->tempfilePath);
cmdRet = system(ffmpeg_cmd);
tiEnd = DjiUtilTime_GetRunTimeStamps();
USER_LOG_DEBUG("JPG Create TempFile, RealTime = %ld us\n", tiEnd.realUsec - tiStart.realUsec);
if (cmdRet != 0) {
USER_LOG_ERROR("JPG ffmpeg cmd call error, ret = %d\n", cmdRet);
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto err_system_cmd;
}
//open temp file
mp4TempPicFile->tempFile = fopen(mp4TempPicFile->tempfilePath, "rb+");
if (mp4TempPicFile->tempFile == NULL) {
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto err_file_open;
}
//unlink temp file
unlink(mp4TempPicFile->tempfilePath);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
err_file_open:
unlink(mp4TempPicFile->tempfilePath);
err_system_cmd:
err_create_temp:
osalHandler->Free(*pTempPicPrivHandle);
return psdkStat;
}
static T_DjiReturnCode DjiMediaFile_DestroyTempPicPriv_MP4(T_DjiMP4TempPicPriv *tempPicPrivHandle)
{
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
fclose(tempPicPrivHandle->tempFile);
osalHandler->Free(tempPicPrivHandle);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,75 @@
/**
********************************************************************
* @file dji_media_file_mp4.h
* @brief This is the header file for "dji_media_file_mp4.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef PSDK_MEDIA_FILE_MP4_H
#define PSDK_MEDIA_FILE_MP4_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include <dji_payload_camera.h>
#include <dji_typedef.h>
#include "dji_media_file_core.h"
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
bool DjiMediaFile_IsSupported_MP4(const char *filePath);
T_DjiReturnCode DjiMediaFile_GetAttrFunc_MP4(struct _DjiMediaFile *mediaFileHandle,
T_DjiCameraMediaFileAttr *mediaFileAttr);
T_DjiReturnCode DjiMediaFile_GetDataOrigin_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode DjiMediaFile_GetFileSizeOrigin_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize);
T_DjiReturnCode DjiMediaFile_CreateThumbNail_MP4(struct _DjiMediaFile *mediaFileHandle);
T_DjiReturnCode DjiMediaFile_GetFileSizeThumbNail_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize);
T_DjiReturnCode
DjiMediaFile_GetDataThumbNail_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode DjiMediaFile_DestroyThumbNail_MP4(struct _DjiMediaFile *MediaFileHandle);
T_DjiReturnCode DjiMediaFile_CreateScreenNail_MP4(struct _DjiMediaFile *mediaFileHandle);
T_DjiReturnCode DjiMediaFile_GetFileSizeScreenNail_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t *fileSize);
T_DjiReturnCode
DjiMediaFile_GetDataScreenNail_MP4(struct _DjiMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode DjiMediaFile_DestroyScreenNail_MP4(struct _DjiMediaFile *mediaFileHandle);
#ifdef __cplusplus
}
#endif
#endif // PSDK_MEDIA_FILE_MP4_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,55 @@
/**
********************************************************************
* @file test_payload_cam_emu_common.h
* @brief This is the header file for "test_payload_cam_emu.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_PAYLOAD_CAM_EMU_BASE_H
#define TEST_PAYLOAD_CAM_EMU_BASE_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#include "dji_payload_camera.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_CameraEmuBaseStartService(void);
T_DjiReturnCode DjiTest_CameraGetDigitalZoomFactor(dji_f32_t *factor);
T_DjiReturnCode DjiTest_CameraGetOpticalZoomFactor(dji_f32_t *factor);
T_DjiReturnCode DjiTest_CameraGetMode(E_DjiCameraMode *mode);
T_DjiReturnCode DjiTest_CameraGetVideoStreamType(E_DjiCameraVideoStreamType *type);
bool DjiTest_CameraIsInited(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_PAYLOAD_CAM_EMU_BASE_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,52 @@
/**
********************************************************************
* @file test_payload_cam_emu_media.h
* @brief This is the header file for "test_payload_cam_media.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_PAYLOAD_CAM_EMU_MEDIA_H
#define TEST_PAYLOAD_CAM_EMU_MEDIA_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#include "dji_payload_camera.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_CameraEmuMediaStartService(void);
T_DjiReturnCode DjiTest_CameraEmuSetMediaFilePath(const char *path);
T_DjiReturnCode DjiTest_CameraMediaGetFileInfo(const char *filePath, T_DjiCameraMediaFileInfo *fileInfo);
#ifdef __cplusplus
}
#endif
#endif // TEST_PAYLOAD_CAM_EMU_MEDIA_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,265 @@
/**
********************************************************************
* @file test_camera_manager.h
* @brief This is the header file for "test_camera_manager.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_CAMERA_MANAGER_H
#define TEST_CAMERA_MANAGER_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#include "dji_camera_manager.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef enum {
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_SHUTTER_SPEED,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_APERTURE,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_EV,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_ISO,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_FOCUS_POINT,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_TAP_ZOOM_POINT,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_ZOOM_PARAM,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SHOOT_SINGLE_PHOTO,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SHOOT_AEB_PHOTO,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SHOOT_BURST_PHOTO,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SHOOT_INTERVAL_PHOTO,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_RECORD_VIDEO,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_DOWNLOAD_AND_DELETE_MEDIA_FILE,
} E_DjiTestCameraManagerSampleSelect;
/* Exported functions --------------------------------------------------------*/
/*! @brief Sample to set exposure compensation value for camera, using async
* api
*
* @note In this interface, exposure compensation value will be got then be
* set.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @param dataTarget the target exposure compensation value
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerSetEV(E_DjiMountPosition position,
E_DjiCameraManagerExposureCompensation exposureCompensation);
/*! @brief Sample to set exposure mode for camera, using async api
*
* @note In this interface, exposure will be got then be set.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @param dataTarget the target exposure mode
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerSetExposureMode(E_DjiMountPosition position,
E_DjiCameraManagerExposureMode exposureMode);
/*! @brief Sample to set ISO value for camera, using async api
*
* @note In this interface, ISO will be got then be set.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @param dataTarget the target ISO value
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerSetISO(E_DjiMountPosition position,
E_DjiCameraManagerISO isoData);
/*! @brief Sample to set shutter speed for camera, using async api
*
* @note In this interface, shutter speed will be got then be set.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @param dataTarget the target shutter speed
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerSetShutterSpeed(E_DjiMountPosition position,
E_DjiCameraManagerShutterSpeed shutterSpeed);
/*! @brief Sample to set shutter aperture value for camera, using async api
*
* @note In this interface, aperture value will be got then be set.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @param dataTarget the target aperture value
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerSetAperture(E_DjiMountPosition position,
E_DjiCameraManagerAperture aperture);
/*! @brief Sample to set focus point for camera, using async api
*
* @note In this interface, focus mode will be set to be AUTO. Then the
* focus point will be set to be (x, y)
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @param x the x value of target focus point, 0~1
* @param y the y value of target focus point, 0~1
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerSetFocusPoint(E_DjiMountPosition position,
T_DjiCameraManagerFocusPosData tapFocusPos);
/*! @brief Sample to set tap-zoom point for camera, using async api
*
* @note In this interface, tap-zoom function will be enable and the
* multiplier will be set. Then the tap-zoom function will start with the
* target tap-zoom point (x, y)
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @param multiplier the zoom multiplier of each tap zoom
* @param x the x value of target tap-zoom point, 0~1
* @param y the y value of target tap-zoom point, 0~1
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerSetTapZoomPoint(E_DjiMountPosition position, uint8_t multiplier,
T_DjiCameraManagerTapZoomPosData tapZoomPosData);
/*! @brief Sample to execute continuous zoom on camera, using sync api
*
* @note It is only supported by X5, X5R and X5S camera on Osmo with lens
* Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ, Z3 camera, Z30 camera.
* @note In this interface, the zoom will start with the designated direction
* and speed, and will stop after zoomTimeInSecond second(s).
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @param direction the choice of zoom out or zoom in
* @param speed zooming speed
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerStartContinuousZoom(E_DjiMountPosition position,
E_DjiCameraZoomDirection zoomDirection,
E_DjiCameraZoomSpeed zoomSpeed);
/*! @brief Sample to execute position zoom on camera, using sync api
*
* @note It is only supported by X5, X5R and X5S camera on Osmo with lens
* Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ, Z3 camera, Z30 camera.
* @note In this interface, the zoom will set the zoom factor as the your
* target value.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @param factor target zoom factor
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerOpticalZoom(E_DjiMountPosition position,
E_DjiCameraZoomDirection zoomDirection,
dji_f32_t factor);
/*! @brief Sample to stop continuous zoom on camera, using async api
*
* @note It is only supported by X5, X5R and X5S camera on Osmo with lens
* Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ, Z3 camera, Z30 camera.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerStopContinuousZoom(E_DjiMountPosition position);
/*! @brief Sample to shoot single photo, using async api
*
* @note In this interface, camera will be set to be the SHOOT_PHOTO mode
* then start to shoot a single photo.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerStartShootSinglePhoto(E_DjiMountPosition position);
/*! @brief Sample to shoot burst photo, using async api
*
* @note In this interface, camera will be set to be the SHOOT_PHOTO mode
* then start to shoot a burst photo.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @param count The number of pictures in each burst shooting
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerStartShootBurstPhoto(E_DjiMountPosition position,
E_DjiCameraBurstCount burstCount);
/*! @brief Sample to shoot AEB photo, using async api
*
* @note In this interface, camera will be set to be the SHOOT_PHOTO mode
* then start to shoot a AEB photo.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @param photoNum The number of pictures in each AEB shooting
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerStartShootAEBPhoto(E_DjiMountPosition position,
E_DjiCameraManagerPhotoAEBCount aebCount);
/*! @brief Sample to start shooting interval photo, using async api
*
* @note In this interface, camera will be set to be the SHOOT_PHOTO mode
* then start to shoot a interval photo.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @param intervalData the parameter of interval shooting
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerStartShootIntervalPhoto(E_DjiMountPosition position,
T_DjiCameraPhotoTimeIntervalSettings intervalData);
/*! @brief Sample to stop shooting, using async api
*
* @note In this interface, camera will stop all the shooting action
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerStopShootPhoto(E_DjiMountPosition position);
/*! @brief Sample to start record video, using async api
*
* @note In this interface, camera will be set to be the RECORD_VIDEO mode
* then start to record video.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerStartRecordVideo(E_DjiMountPosition position);
/*! @brief Sample to stop record video, using async api
*
* @note In this interface, camera will be set to be the RECORD_VIDEO mode
* then stop recording video.
* @param index payload node index, input limit see enum
* DJI::OSDK::PayloadIndexType
* @return T_DjiReturnCode error code
*/
T_DjiReturnCode DjiTest_CameraManagerStopRecordVideo(E_DjiMountPosition position);
T_DjiReturnCode DjiTest_CameraManagerRunSample(E_DjiMountPosition mountPosition,
E_DjiTestCameraManagerSampleSelect cameraManagerSampleSelect);
#ifdef __cplusplus
}
#endif
#endif // TEST_CAMERA_MANAGER_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,280 @@
/**
********************************************************************
* @file test_data_transmission.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_data_transmission.h"
#include "dji_logger.h"
#include "dji_platform.h"
#include "utils/util_misc.h"
#include "dji_low_speed_data_channel.h"
#include "dji_high_speed_data_channel.h"
#include "dji_aircraft_info.h"
#include "widget_interaction_test/test_widget_interaction.h"
/* Private constants ---------------------------------------------------------*/
#define DATA_TRANSMISSION_TASK_FREQ (1)
#define DATA_TRANSMISSION_TASK_STACK_SIZE (2048)
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static void *UserDataTransmission_Task(void *arg);
static T_DjiReturnCode ReceiveDataFromMobile(const uint8_t *data, uint16_t len);
static T_DjiReturnCode ReceiveDataFromOnboardComputer(const uint8_t *data, uint16_t len);
static T_DjiReturnCode ReceiveDataFromPayload(const uint8_t *data, uint16_t len);
/* Private variables ---------------------------------------------------------*/
static T_DjiTaskHandle s_userDataTransmissionThread;
static T_DjiAircraftInfoBaseInfo s_aircraftInfoBaseInfo;
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_DataTransmissionStartService(void)
{
T_DjiReturnCode djiStat;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
E_DjiChannelAddress channelAddress;
const T_DjiDataChannelBandwidthProportionOfHighspeedChannel bandwidthProportionOfHighspeedChannel =
{10, 60, 30};
char ipAddr[DJI_IP_ADDR_STR_SIZE_MAX];
uint16_t port;
djiStat = DjiLowSpeedDataChannel_Init();
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("init data transmission module error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
djiStat = DjiAircraftInfo_GetBaseInfo(&s_aircraftInfoBaseInfo);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get aircraft base info error");
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
channelAddress = DJI_CHANNEL_ADDRESS_MASTER_RC_APP;
djiStat = DjiLowSpeedDataChannel_RegRecvDataCallback(channelAddress, ReceiveDataFromMobile);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("register receive data from mobile error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_PAYLOAD_PORT_NO1 ||
s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_PAYLOAD_PORT_NO2 ||
s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_PAYLOAD_PORT_NO3) {
channelAddress = DJI_CHANNEL_ADDRESS_EXTENSION_PORT;
djiStat = DjiLowSpeedDataChannel_RegRecvDataCallback(channelAddress, ReceiveDataFromOnboardComputer);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("register receive data from onboard coputer error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
djiStat = DjiHighSpeedDataChannel_SetBandwidthProportion(bandwidthProportionOfHighspeedChannel);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Set data channel bandwidth width proportion error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
djiStat = DjiHighSpeedDataChannel_GetDataStreamRemoteAddress(ipAddr, &port);
if (djiStat == DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_DEBUG("Get data stream remote address: %s, port: %d", ipAddr, port);
} else {
USER_LOG_ERROR("get data stream remote address error.");
}
} else if (s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_EXTENSION_PORT) {
channelAddress = DJI_CHANNEL_ADDRESS_PAYLOAD_PORT_NO1;
djiStat = DjiLowSpeedDataChannel_RegRecvDataCallback(channelAddress, ReceiveDataFromPayload);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("register receive data from payload NO1 error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
} else {
return DJI_ERROR_SYSTEM_MODULE_CODE_NONSUPPORT;
}
if (osalHandler->TaskCreate("user_transmission_task", UserDataTransmission_Task,
DATA_TRANSMISSION_TASK_STACK_SIZE, NULL, &s_userDataTransmissionThread) !=
DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("user data transmission task create error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *UserDataTransmission_Task(void *arg)
{
T_DjiReturnCode djiStat;
const uint8_t dataToBeSent[] = "DJI Data Transmission Test Data.\r\n";
T_DjiDataChannelState state = {0};
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
E_DjiChannelAddress channelAddress;
USER_UTIL_UNUSED(arg);
while (1) {
osalHandler->TaskSleepMs(1000 / DATA_TRANSMISSION_TASK_FREQ);
channelAddress = DJI_CHANNEL_ADDRESS_MASTER_RC_APP;
djiStat = DjiLowSpeedDataChannel_SendData(channelAddress, dataToBeSent, sizeof(dataToBeSent));
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
USER_LOG_ERROR("send data to mobile error.");
djiStat = DjiLowSpeedDataChannel_GetSendDataState(channelAddress, &state);
if (djiStat == DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_DEBUG(
"send to mobile state: realtimeBandwidthBeforeFlowController: %d, realtimeBandwidthAfterFlowController: %d, busyState: %d.",
state.realtimeBandwidthBeforeFlowController, state.realtimeBandwidthAfterFlowController,
state.busyState);
} else {
USER_LOG_ERROR("get send to mobile channel state error.");
}
if (s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_PAYLOAD_PORT_NO1 ||
s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_PAYLOAD_PORT_NO2 ||
s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_PAYLOAD_PORT_NO3) {
channelAddress = DJI_CHANNEL_ADDRESS_EXTENSION_PORT;
djiStat = DjiLowSpeedDataChannel_SendData(channelAddress, dataToBeSent, sizeof(dataToBeSent));
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
USER_LOG_ERROR("send data to onboard computer error.");
djiStat = DjiLowSpeedDataChannel_GetSendDataState(channelAddress, &state);
if (djiStat == DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_DEBUG(
"send to onboard computer state: realtimeBandwidthBeforeFlowController: %d, realtimeBandwidthAfterFlowController: %d, busyState: %d.",
state.realtimeBandwidthBeforeFlowController, state.realtimeBandwidthAfterFlowController,
state.busyState);
} else {
USER_LOG_ERROR("get send to onboard computer channel state error.");
}
if (DjiPlatform_GetSocketHandler() != NULL) {
djiStat = DjiHighSpeedDataChannel_SendDataStreamData(dataToBeSent, sizeof(dataToBeSent));
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
USER_LOG_ERROR("send data to data stream error.");
djiStat = DjiHighSpeedDataChannel_GetDataStreamState(&state);
if (djiStat == DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_DEBUG(
"data stream state: realtimeBandwidthLimit: %d, realtimeBandwidthBeforeFlowController: %d, busyState: %d.",
state.realtimeBandwidthLimit, state.realtimeBandwidthBeforeFlowController, state.busyState);
} else {
USER_LOG_ERROR("get data stream state error.");
}
}
} else if (s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_EXTENSION_PORT) {
channelAddress = DJI_CHANNEL_ADDRESS_PAYLOAD_PORT_NO1;
djiStat = DjiLowSpeedDataChannel_SendData(channelAddress, dataToBeSent, sizeof(dataToBeSent));
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
USER_LOG_ERROR("send data to onboard computer error.");
djiStat = DjiLowSpeedDataChannel_GetSendDataState(channelAddress, &state);
if (djiStat == DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_DEBUG(
"send to onboard computer state: realtimeBandwidthBeforeFlowController: %d, realtimeBandwidthAfterFlowController: %d, busyState: %d.",
state.realtimeBandwidthBeforeFlowController, state.realtimeBandwidthAfterFlowController,
state.busyState);
} else {
USER_LOG_ERROR("get send to onboard computer channel state error.");
}
}
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
static T_DjiReturnCode ReceiveDataFromMobile(const uint8_t *data, uint16_t len)
{
char *printData = NULL;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
printData = osalHandler->Malloc(len + 1);
if (printData == NULL) {
USER_LOG_ERROR("malloc memory for printData fail.");
return DJI_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
strncpy(printData, (const char *) data, len);
printData[len] = '\0';
USER_LOG_INFO("receive data from mobile: %s, len:%d.", printData, len);
DjiTest_WidgetLogAppend("receive data: %s, len:%d.", printData, len);
osalHandler->Free(printData);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode ReceiveDataFromOnboardComputer(const uint8_t *data, uint16_t len)
{
char *printData = NULL;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
printData = osalHandler->Malloc(len + 1);
if (printData == NULL) {
USER_LOG_ERROR("malloc memory for printData fail.");
return DJI_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
strncpy(printData, (const char *) data, len);
printData[len] = '\0';
USER_LOG_INFO("receive data from onboard computer: %s, len:%d.", printData, len);
DjiTest_WidgetLogAppend("receive data: %s, len:%d.", printData, len);
osalHandler->Free(printData);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode ReceiveDataFromPayload(const uint8_t *data, uint16_t len)
{
char *printData = NULL;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
printData = osalHandler->Malloc(len + 1);
if (printData == NULL) {
USER_LOG_ERROR("malloc memory for printData fail.");
return DJI_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
strncpy(printData, (const char *) data, len);
printData[len] = '\0';
USER_LOG_INFO("receive data from payload port: %s, len:%d.", printData, len);
DjiTest_WidgetLogAppend("receive data: %s, len:%d.", printData, len);
osalHandler->Free(printData);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,51 @@
/**
********************************************************************
* @file test_data_transmission.h
* @brief This is the header file for "test_data_transmission.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_DATA_TRANSMISSION_H
#define TEST_DATA_TRANSMISSION_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_DataTransmissionStartService(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_DATA_TRANSMISSION_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,335 @@
/**
********************************************************************
* @file test_fc_subscription.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <utils/util_misc.h>
#include <math.h>
#include "test_fc_subscription.h"
#include "dji_logger.h"
#include "dji_platform.h"
#include "widget_interaction_test/test_widget_interaction.h"
/* Private constants ---------------------------------------------------------*/
#define FC_SUBSCRIPTION_TASK_FREQ (1)
#define FC_SUBSCRIPTION_TASK_STACK_SIZE (1024)
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static void *UserFcSubscription_Task(void *arg);
static T_DjiReturnCode DjiTest_FcSubscriptionReceiveQuaternionCallback(const uint8_t *data, uint16_t dataSize,
const T_DjiDataTimestamp *timestamp);
/* Private variables ---------------------------------------------------------*/
static T_DjiTaskHandle s_userFcSubscriptionThread;
static bool s_userFcSubscriptionDataShow = false;
static uint8_t s_totalSatelliteNumberUsed = 0;
static uint32_t s_userFcSubscriptionDataCnt = 0;
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_FcSubscriptionStartService(void)
{
T_DjiReturnCode djiStat;
T_DjiOsalHandler *osalHandler = NULL;
osalHandler = DjiPlatform_GetOsalHandler();
djiStat = DjiFcSubscription_Init();
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("init data subscription module error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
djiStat = DjiFcSubscription_SubscribeTopic(DJI_FC_SUBSCRIPTION_TOPIC_QUATERNION, DJI_DATA_SUBSCRIPTION_TOPIC_50_HZ,
DjiTest_FcSubscriptionReceiveQuaternionCallback);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Subscribe topic quaternion error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
} else {
USER_LOG_DEBUG("Subscribe topic quaternion success.");
}
djiStat = DjiFcSubscription_SubscribeTopic(DJI_FC_SUBSCRIPTION_TOPIC_VELOCITY, DJI_DATA_SUBSCRIPTION_TOPIC_1_HZ,
NULL);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Subscribe topic velocity error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
} else {
USER_LOG_DEBUG("Subscribe topic velocity success.");
}
djiStat = DjiFcSubscription_SubscribeTopic(DJI_FC_SUBSCRIPTION_TOPIC_GPS_POSITION, DJI_DATA_SUBSCRIPTION_TOPIC_1_HZ,
NULL);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Subscribe topic gps position error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
} else {
USER_LOG_DEBUG("Subscribe topic gps position success.");
}
djiStat = DjiFcSubscription_SubscribeTopic(DJI_FC_SUBSCRIPTION_TOPIC_GPS_DETAILS, DJI_DATA_SUBSCRIPTION_TOPIC_1_HZ,
NULL);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Subscribe topic gps details error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
} else {
USER_LOG_DEBUG("Subscribe topic gps details success.");
}
if (osalHandler->TaskCreate("user_subscription_task", UserFcSubscription_Task,
FC_SUBSCRIPTION_TASK_STACK_SIZE, NULL, &s_userFcSubscriptionThread) !=
DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("user data subscription task create error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiTest_FcSubscriptionRunSample(void)
{
T_DjiReturnCode djiStat;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
T_DjiFcSubscriptionVelocity velocity = {0};
T_DjiDataTimestamp timestamp = {0};
T_DjiFcSubscriptionGpsPosition gpsPosition = {0};
T_DjiFcSubscriptionSingleBatteryInfo singleBatteryInfo = {0};
USER_LOG_INFO("Fc subscription sample start");
s_userFcSubscriptionDataShow = true;
USER_LOG_INFO("--> Step 1: Init fc subscription module");
djiStat = DjiFcSubscription_Init();
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("init data subscription module error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
USER_LOG_INFO("--> Step 2: Subscribe the topics of quaternion, velocity and gps position");
djiStat = DjiFcSubscription_SubscribeTopic(DJI_FC_SUBSCRIPTION_TOPIC_QUATERNION, DJI_DATA_SUBSCRIPTION_TOPIC_1_HZ,
DjiTest_FcSubscriptionReceiveQuaternionCallback);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Subscribe topic quaternion error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
djiStat = DjiFcSubscription_SubscribeTopic(DJI_FC_SUBSCRIPTION_TOPIC_VELOCITY, DJI_DATA_SUBSCRIPTION_TOPIC_1_HZ,
NULL);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Subscribe topic velocity error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
djiStat = DjiFcSubscription_SubscribeTopic(DJI_FC_SUBSCRIPTION_TOPIC_GPS_POSITION, DJI_DATA_SUBSCRIPTION_TOPIC_1_HZ,
NULL);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Subscribe topic gps position error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
USER_LOG_INFO("--> Step 3: Get latest value of the subscribed topics in the next 20 seconds\r\n");
for (int i = 0; i < 20; ++i) {
osalHandler->TaskSleepMs(1000 / FC_SUBSCRIPTION_TASK_FREQ);
djiStat = DjiFcSubscription_GetLatestValueOfTopic(DJI_FC_SUBSCRIPTION_TOPIC_VELOCITY,
(uint8_t *) &velocity,
sizeof(T_DjiFcSubscriptionVelocity),
&timestamp);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get value of topic velocity error.");
} else {
USER_LOG_INFO("velocity: x = %f y = %f z = %f healthFlag = %d, timestamp ms = %d us = %d.", velocity.data.x,
velocity.data.y,
velocity.data.z, velocity.health, timestamp.millisecond, timestamp.microsecond);
}
djiStat = DjiFcSubscription_GetLatestValueOfTopic(DJI_FC_SUBSCRIPTION_TOPIC_GPS_POSITION,
(uint8_t *) &gpsPosition,
sizeof(T_DjiFcSubscriptionGpsPosition),
&timestamp);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get value of topic gps position error.");
} else {
USER_LOG_INFO("gps position: x = %d y = %d z = %d.", gpsPosition.x, gpsPosition.y, gpsPosition.z);
}
//Attention: if you want to subscribe the single battery info on M300 RTK, you need connect USB cable to
//OSDK device or use topic DJI_FC_SUBSCRIPTION_TOPIC_BATTERY_INFO instead.
djiStat = DjiFcSubscription_GetLatestValueOfTopic(DJI_FC_SUBSCRIPTION_TOPIC_BATTERY_SINGLE_INFO_INDEX1,
(uint8_t *) &singleBatteryInfo,
sizeof(T_DjiFcSubscriptionSingleBatteryInfo),
&timestamp);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get value of topic battery single info index1 error.");
} else {
USER_LOG_INFO(
"battery single info index1: capacity percent = %ld% voltage = %ldV temperature = %.2f degree.",
singleBatteryInfo.batteryCapacityPercent,
singleBatteryInfo.currentVoltage / 1000,
(dji_f32_t) singleBatteryInfo.batteryTemperature / 10);
}
djiStat = DjiFcSubscription_GetLatestValueOfTopic(DJI_FC_SUBSCRIPTION_TOPIC_BATTERY_SINGLE_INFO_INDEX2,
(uint8_t *) &singleBatteryInfo,
sizeof(T_DjiFcSubscriptionSingleBatteryInfo),
&timestamp);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get value of topic battery single info index2 error.");
} else {
USER_LOG_INFO(
"battery single info index2: capacity percent = %ld% voltage = %ldV temperature = %.2f degree.\r\n",
singleBatteryInfo.batteryCapacityPercent,
singleBatteryInfo.currentVoltage / 1000,
(dji_f32_t) singleBatteryInfo.batteryTemperature / 10);
}
}
USER_LOG_INFO("--> Step 4: Deinit fc subscription module");
djiStat = DjiFcSubscription_DeInit();
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Deinit fc subscription error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
s_userFcSubscriptionDataShow = false;
USER_LOG_INFO("Fc subscription sample end");
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiTest_FcSubscriptionDataShowTrigger(void)
{
s_userFcSubscriptionDataShow = !s_userFcSubscriptionDataShow;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiTest_FcSubscriptionGetTotalSatelliteNumber(uint8_t *number)
{
*number = s_totalSatelliteNumberUsed;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *UserFcSubscription_Task(void *arg)
{
T_DjiReturnCode djiStat;
T_DjiFcSubscriptionVelocity velocity = {0};
T_DjiDataTimestamp timestamp = {0};
T_DjiFcSubscriptionGpsPosition gpsPosition = {0};
T_DjiFcSubscriptionGpsDetails gpsDetails = {0};
T_DjiOsalHandler *osalHandler = NULL;
USER_UTIL_UNUSED(arg);
osalHandler = DjiPlatform_GetOsalHandler();
while (1) {
osalHandler->TaskSleepMs(1000 / FC_SUBSCRIPTION_TASK_FREQ);
djiStat = DjiFcSubscription_GetLatestValueOfTopic(DJI_FC_SUBSCRIPTION_TOPIC_VELOCITY,
(uint8_t *) &velocity,
sizeof(T_DjiFcSubscriptionVelocity),
&timestamp);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get value of topic velocity error.");
}
if (s_userFcSubscriptionDataShow == true) {
USER_LOG_INFO("velocity: x %f y %f z %f, healthFlag %d.", velocity.data.x, velocity.data.y,
velocity.data.z, velocity.health);
}
djiStat = DjiFcSubscription_GetLatestValueOfTopic(DJI_FC_SUBSCRIPTION_TOPIC_GPS_POSITION,
(uint8_t *) &gpsPosition,
sizeof(T_DjiFcSubscriptionGpsPosition),
&timestamp);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get value of topic gps position error.");
}
if (s_userFcSubscriptionDataShow == true) {
USER_LOG_INFO("gps position: x %d y %d z %d.", gpsPosition.x, gpsPosition.y, gpsPosition.z);
}
djiStat = DjiFcSubscription_GetLatestValueOfTopic(DJI_FC_SUBSCRIPTION_TOPIC_GPS_DETAILS,
(uint8_t *) &gpsDetails,
sizeof(T_DjiFcSubscriptionGpsDetails),
&timestamp);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get value of topic gps details error.");
}
if (s_userFcSubscriptionDataShow == true) {
USER_LOG_INFO("gps total satellite number used: %d %d %d.",
gpsDetails.gpsSatelliteNumberUsed,
gpsDetails.glonassSatelliteNumberUsed,
gpsDetails.totalSatelliteNumberUsed);
s_totalSatelliteNumberUsed = gpsDetails.totalSatelliteNumberUsed;
}
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
static T_DjiReturnCode DjiTest_FcSubscriptionReceiveQuaternionCallback(const uint8_t *data, uint16_t dataSize,
const T_DjiDataTimestamp *timestamp)
{
T_DjiFcSubscriptionQuaternion *quaternion = (T_DjiFcSubscriptionQuaternion *) data;
dji_f64_t pitch, yaw, roll;
USER_UTIL_UNUSED(dataSize);
pitch = (dji_f64_t) asinf(-2 * quaternion->q1 * quaternion->q3 + 2 * quaternion->q0 * quaternion->q2) * 57.3;
roll = (dji_f64_t) atan2f(2 * quaternion->q2 * quaternion->q3 + 2 * quaternion->q0 * quaternion->q1, -2 * quaternion->q1 * quaternion->q1 - 2 * quaternion->q2 * quaternion->q2 + 1) * 57.3;
yaw = (dji_f64_t) atan2f(2 * quaternion->q1 * quaternion->q2 + 2 * quaternion->q0 * quaternion->q3,
-2 * quaternion->q2 * quaternion->q2 - 2 * quaternion->q3 * quaternion->q3 + 1) *
57.3;
if (s_userFcSubscriptionDataShow == true) {
if (s_userFcSubscriptionDataCnt++ % DJI_DATA_SUBSCRIPTION_TOPIC_50_HZ == 0) {
USER_LOG_INFO("receive quaternion data.");
USER_LOG_INFO("timestamp: millisecond %u microsecond %u.", timestamp->millisecond,
timestamp->microsecond);
USER_LOG_INFO("quaternion: %f %f %f %f.", quaternion->q0, quaternion->q1, quaternion->q2,
quaternion->q3);
USER_LOG_INFO("euler angles: pitch = %.2f roll = %.2f yaw = %.2f.\r\n", pitch, roll, yaw);
DjiTest_WidgetLogAppend("pitch = %.2f roll = %.2f yaw = %.2f.", pitch, roll, yaw);
}
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,55 @@
/**
********************************************************************
* @file test_fc_subscription.h
* @brief This is the header file for "test_fc_subscription.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_FC_SUBSCRIPTION_H
#define TEST_FC_SUBSCRIPTION_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#include "dji_fc_subscription.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_FcSubscriptionStartService(void);
T_DjiReturnCode DjiTest_FcSubscriptionRunSample(void);
T_DjiReturnCode DjiTest_FcSubscriptionDataShowTrigger(void);
T_DjiReturnCode DjiTest_FcSubscriptionGetTotalSatelliteNumber(uint8_t *number);
#ifdef __cplusplus
}
#endif
#endif // TEST_FC_SUBSCRIPTION_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
/**
********************************************************************
* @file test_flight_control.h
* @brief This is the header file for "test_flight_control.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_FLIGHT_CONTROL_H
#define TEST_FLIGHT_CONTROL_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
typedef enum {
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_TAKE_OFF_LANDING,
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_TAKE_OFF_POSITION_CTRL_LANDING,
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_TAKE_OFF_GO_HOME_FORCE_LANDING,
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_TAKE_OFF_VELOCITY_CTRL_LANDING,
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_ARREST_FLYING,
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_SET_GET_PARAM,
} E_DjiTestFlightCtrlSampleSelect;
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_FlightControlRunSample(E_DjiTestFlightCtrlSampleSelect flightCtrlSampleSelect);
#ifdef __cplusplus
}
#endif
#endif // TEST_FLIGHT_CONTROL_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,58 @@
/**
********************************************************************
* @file test_payload_gimbal_emu.h
* @brief This is the header file for "test_payload_gimbal_emu.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_PAYLOAD_GIMBAL_EMU_H
#define TEST_PAYLOAD_GIMBAL_EMU_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#include "dji_gimbal.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_GimbalStartService(void);
T_DjiReturnCode DjiTest_GimbalDeInit(void);
T_DjiReturnCode DjiTest_GimbalRotate(E_DjiGimbalRotationMode rotationMode,
T_DjiGimbalRotationProperty rotationProperty,
T_DjiAttitude3d rotationValue); // unit if angle control: 0.1 degree, unit if speed control: 0.1 degree/s
#ifdef __cplusplus
}
#endif
#endif // TEST_PAYLOAD_GIMBAL_EMU_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,155 @@
/**
********************************************************************
* @file test_gimbal_manager.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <utils/util_misc.h>
#include <widget_interaction_test/test_widget_interaction.h>
#include "test_gimbal_manager.h"
#include "dji_platform.h"
#include "dji_logger.h"
#include "dji_gimbal_manager.h"
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
typedef enum {
DJI_TEST_GIMBAL_ROTATION,
DJI_TEST_GIMBAL_RESET,
} E_DjiTestGimbalAction;
typedef struct {
E_DjiTestGimbalAction action;
T_DjiGimbalManagerRotation rotation;
} T_DjiTestGimbalActionList;
/* Private values -------------------------------------------------------------*/
static const T_DjiTestGimbalActionList s_rotationActionList[] =
{
{.action = DJI_TEST_GIMBAL_RESET},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_RELATIVE_ANGLE, 30, 0, 0, 0.2},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_RELATIVE_ANGLE, -30, 0, 0, 0.2},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_RELATIVE_ANGLE, -30, 0, 0, 0.2},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_RELATIVE_ANGLE, 30, 0, 0, 0.2},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_RELATIVE_ANGLE, 0, 30, 0, 0.2},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_RELATIVE_ANGLE, 0, -30, 0, 0.2},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_RELATIVE_ANGLE, 0, -30, 0, 0.2},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_RELATIVE_ANGLE, 0, 30, 0, 0.2},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_RELATIVE_ANGLE, 0, 0, 4, 0.2},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_RELATIVE_ANGLE, 0, 0, -4, 0.2},
{.action = DJI_TEST_GIMBAL_RESET},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_ABSOLUTE_ANGLE, 30, 0, 0, 0.2},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_ABSOLUTE_ANGLE, -90, 0, 0, 0.5},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_ABSOLUTE_ANGLE, -60, 0, 0, 0.5},
{.action = DJI_TEST_GIMBAL_ROTATION, .rotation.rotationMode = DJI_GIMBAL_ROTATION_MODE_ABSOLUTE_ANGLE, -30, 0, 0, 0.5},
{.action = DJI_TEST_GIMBAL_RESET},
};
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_GimbalManagerRunSample(E_DjiMountPosition mountPosition, E_DjiGimbalMode gimbalMode)
{
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
T_DjiReturnCode returnCode;
T_DjiGimbalManagerRotation rotation;
USER_LOG_INFO("Gimbal manager sample start");
DjiTest_WidgetLogAppend("Gimbal manager sample start");
USER_LOG_INFO("--> Step 1: Init gimbal manager module");
DjiTest_WidgetLogAppend("--> Step 1: Init gimbal manager module");
returnCode = DjiGimbalManager_Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Init gimbal manager failed, error code: 0x%08X", returnCode);
goto out;
}
if (gimbalMode == DJI_GIMBAL_MODE_FREE) {
USER_LOG_INFO("--> Step 2: Set gimbal to free mode");
DjiTest_WidgetLogAppend("--> Step 2: Set gimbal to free mode");
} else if (gimbalMode == DJI_GIMBAL_MODE_YAW_FOLLOW) {
USER_LOG_INFO("--> Step 2: Set gimbal to yaw follow mode");
DjiTest_WidgetLogAppend("--> Step 2: Set gimbal to yaw follow mode");
}
returnCode = DjiGimbalManager_SetMode(mountPosition, gimbalMode);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Set gimbal mode failed, error code: 0x%08X", returnCode);
goto out;
}
USER_LOG_INFO("--> Step 3: Reset gimbal angles.\r\n");
returnCode = DjiGimbalManager_Reset(mountPosition);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Reset gimbal failed, error code: 0x%08X", returnCode);
}
USER_LOG_INFO("--> Step 4: Rotate gimbal to target angle by action list\r\n");
for (int i = 0; i < sizeof(s_rotationActionList) / sizeof(T_DjiTestGimbalActionList); ++i) {
if (s_rotationActionList[i].action == DJI_TEST_GIMBAL_RESET) {
USER_LOG_INFO("Target gimbal reset.\r\n");
returnCode = DjiGimbalManager_Reset(mountPosition);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Reset gimbal failed, error code: 0x%08X", returnCode);
}
osalHandler->TaskSleepMs(2000);
} else if (s_rotationActionList[i].action == DJI_TEST_GIMBAL_ROTATION) {
if (gimbalMode == DJI_GIMBAL_MODE_FREE &&
s_rotationActionList[i].rotation.rotationMode == DJI_GIMBAL_ROTATION_MODE_ABSOLUTE_ANGLE) {
continue;
}
USER_LOG_INFO("Target gimbal pry = (%.1f, %.1f, %.1f)",
s_rotationActionList[i].rotation.pitch, s_rotationActionList[i].rotation.roll,
s_rotationActionList[i].rotation.yaw);
rotation = s_rotationActionList[i].rotation;
returnCode = DjiGimbalManager_Rotate(mountPosition, rotation);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Target gimbal pry = (%.1f, %.1f, %.1f) failed, error code: 0x%08X",
s_rotationActionList[i].rotation.pitch, s_rotationActionList[i].rotation.roll,
s_rotationActionList[i].rotation.yaw,
returnCode);
}
osalHandler->TaskSleepMs(1000);
}
}
USER_LOG_INFO("--> Step 5: Deinit gimbal manager module");
DjiTest_WidgetLogAppend("--> Step 5: Deinit gimbal manager module");
returnCode = DjiGimbalManager_Deinit();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Deinit gimbal manager failed, error code: 0x%08X", returnCode);
goto out;
}
out:
USER_LOG_INFO("Gimbal manager sample end");
return returnCode;
}
/* Private functions definition-----------------------------------------------*/
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,49 @@
/**
********************************************************************
* @file test_gimbal_manager.h
* @brief This is the header file for "test_gimbal_manager.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_GIMBAL_MANAGER_H
#define TEST_GIMBAL_MANAGER_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_GimbalManagerRunSample(E_DjiMountPosition mountPosition, E_DjiGimbalMode gimbalMode);
#ifdef __cplusplus
}
#endif
#endif // TEST_GIMBAL_MANAGER_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,255 @@
/**
********************************************************************
* @file test_hms.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <widget_interaction_test/test_widget_interaction.h>
#include "test_hms.h"
#include "dji_hms.h"
#include "dji_hms_info_table.h"
#include "dji_logger.h"
#include "dji_platform.h"
#include "dji_fc_subscription.h"
/* Private constants ---------------------------------------------------------*/
#define MAX_HMS_PRINT_COUNT 150
#define MAX_BUFFER_LEN 256
#define MIN_HMS_ERROR_LEVEL 0
#define MID_HMS_ERROR_LEVEL 3
#define MAX_HMS_ERROR_LEVEL 6
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
static const char *oldReplaceAlarmIdStr = "%alarmid";
static const char *oldReplaceIndexStr = "%index";
static const char *oldReplaceComponentIndexStr = "%component_index";
/* Private functions declaration ---------------------------------------------*/
static T_DjiReturnCode DjiTest_HmsInit(void);
static T_DjiReturnCode DjiTest_HmsDeInit(void);
static T_DjiFcSubscriptionFlightStatus DjiTest_GetValueOfFlightStatus(void);
static bool DjiTest_ReplaceStr(char *buffer, uint32_t bufferMaxLen, const char *target, const char *dest);
static bool DjiTest_MarchErrCodeInfoTable(T_DjiHmsInfoTable hmsInfoTable);
static T_DjiReturnCode DjiTest_HmsInfoCallback(T_DjiHmsInfoTable hmsInfoTable);
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_HmsRunSample(void)
{
T_DjiReturnCode returnCode;
T_DjiOsalHandler *osalHandler;
USER_LOG_INFO("Hms Sample Start");
DjiTest_WidgetLogAppend("Hms Sample Start");
USER_LOG_INFO("--> Step 1: Init hms sample");
DjiTest_WidgetLogAppend("--> Step 1: Init hms sample");
returnCode = DjiTest_HmsInit();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Hms sample init error, error code:0x%08llX", returnCode);
goto out;
}
osalHandler = DjiPlatform_GetOsalHandler();
USER_LOG_INFO("--> Step 2: Register callback function of push HMS information");
DjiTest_WidgetLogAppend("--> Step 2: Register callback function of push HMS information");
returnCode = DjiHms_RegHmsInfoCallback(DjiTest_HmsInfoCallback);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Register callback function of push HMS information failed, error code:0x%08llX", returnCode);
goto out;
}
osalHandler->TaskSleepMs(10000);
out:
USER_LOG_INFO("--> Step 3: Deinit hms sample");
DjiTest_WidgetLogAppend("--> Step 3: Deinit hms sample");
returnCode = DjiTest_HmsDeInit();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Hms sample deinit error, error code:0x%08llX", returnCode);
}
USER_LOG_INFO("Hms Sample End");
DjiTest_WidgetLogAppend("Hms Sample End");
return returnCode;
}
/* Private functions definition-----------------------------------------------*/
static T_DjiReturnCode DjiTest_HmsInit(void)
{
T_DjiReturnCode returnCode;
returnCode = DjiFcSubscription_Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Hms sample init data subscription module failed, error code:0x%08llX", returnCode);
return returnCode;
}
/*! subscribe fc data */
returnCode = DjiFcSubscription_SubscribeTopic(DJI_FC_SUBSCRIPTION_TOPIC_STATUS_FLIGHT,
DJI_DATA_SUBSCRIPTION_TOPIC_10_HZ,
NULL);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("HMS sample subscribe topic flight status error, error code:0x%08llX", returnCode);
return returnCode;
}
return DjiHms_Init();
}
static T_DjiReturnCode DjiTest_HmsDeInit(void)
{
T_DjiReturnCode returnCode;
returnCode = DjiFcSubscription_DeInit();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Deinit data subscription module failed, error code:0x%08llX",
returnCode);
return returnCode;
}
return DjiHms_DeInit();
}
static T_DjiFcSubscriptionFlightStatus DjiTest_GetValueOfFlightStatus(void)
{
T_DjiReturnCode djiStat;
T_DjiFcSubscriptionFlightStatus flightStatus;
T_DjiDataTimestamp flightStatusTimestamp = {0};
djiStat = DjiFcSubscription_GetLatestValueOfTopic(DJI_FC_SUBSCRIPTION_TOPIC_STATUS_FLIGHT,
(uint8_t *) &flightStatus,
sizeof(T_DjiFcSubscriptionFlightStatus),
&flightStatusTimestamp);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get value of topic flight status failed, error code:0x%08llX", djiStat);
flightStatus = 0;
} else {
USER_LOG_DEBUG("Timestamp: millisecond %u microsecond %u.", flightStatusTimestamp.millisecond,
flightStatusTimestamp.microsecond);
USER_LOG_DEBUG("Flight status: %d.", flightStatus);
}
return flightStatus;
}
static bool DjiTest_ReplaceStr(char *buffer, uint32_t bufferMaxLen, const char *target, const char *dest)
{
char printBuffHeader[MAX_BUFFER_LEN] = {0};
uint32_t printBuffHeaderCpyCnt = 0;
char printBuffTail[MAX_BUFFER_LEN] = {0};
uint32_t printBuffTailCpyCnt = 0;
char *targetOffset = NULL;
targetOffset = strstr(buffer, target);
if (!targetOffset) {
return false;
}
printBuffHeaderCpyCnt = targetOffset - buffer;
if (printBuffHeaderCpyCnt > sizeof(printBuffHeader)) {
printBuffHeaderCpyCnt = sizeof(printBuffHeader);
}
memcpy(printBuffHeader, buffer, printBuffHeaderCpyCnt);
printBuffTailCpyCnt = strlen(targetOffset + strlen(target));
if (printBuffTailCpyCnt > sizeof(printBuffTail)) {
printBuffTailCpyCnt = sizeof(printBuffTail);
}
memcpy(printBuffTail, targetOffset + strlen(target), printBuffTailCpyCnt);
snprintf(buffer, bufferMaxLen, "%s%s%s", printBuffHeader, dest, printBuffTail);
return true;
}
static bool DjiTest_MarchErrCodeInfoTable(T_DjiHmsInfoTable hmsInfoTable)
{
char alarmIdStr[20] = {0};
char sensorIdStr[20] = {0};
char componentIdStr[20] = {0};
char printBuff[256] = {0};
const char *originalAlarmInfo = NULL;
uint8_t hmsCodeMatchFlag = 0;
if (!hmsInfoTable.hmsInfo) {
USER_LOG_ERROR("Hms info table is null");
return false;
}
for (int i = 0; i < hmsInfoTable.hmsInfoNum; i++) {
hmsCodeMatchFlag = 0;
for (int j = 0; j < sizeof(hmsErrCodeInfoTbl) / sizeof(T_DjiHmsErrCodeInfo); j++) {
if (hmsInfoTable.hmsInfo[i].errorCode == hmsErrCodeInfoTbl[j].alarmId) {
hmsCodeMatchFlag = 1;
snprintf(alarmIdStr, sizeof(alarmIdStr), "%u", hmsInfoTable.hmsInfo[i].errorCode);
//note:sensor_idx:[0,5].In order to be consistent with the display of pilot, add one.
snprintf(sensorIdStr, sizeof(sensorIdStr), "%d", hmsInfoTable.hmsInfo[i].componentIndex + 1);
snprintf(componentIdStr, sizeof(componentIdStr), "0x%02X", hmsInfoTable.hmsInfo[i].componentIndex + 1);
if (DjiTest_GetValueOfFlightStatus() == DJI_FC_SUBSCRIPTION_FLIGHT_STATUS_IN_AIR) {
originalAlarmInfo = hmsErrCodeInfoTbl[j].flyAlarmInfo;
} else {
originalAlarmInfo = hmsErrCodeInfoTbl[j].groundAlarmInfo;
}
originalAlarmInfo = hmsErrCodeInfoTbl[j].groundAlarmInfo;
if (strlen(originalAlarmInfo)) {
snprintf(printBuff, sizeof(printBuff), "%s", originalAlarmInfo);
DjiTest_ReplaceStr(printBuff, sizeof(printBuff), oldReplaceAlarmIdStr, alarmIdStr);
DjiTest_ReplaceStr(printBuff, sizeof(printBuff), oldReplaceIndexStr, sensorIdStr);
DjiTest_ReplaceStr(printBuff, sizeof(printBuff), oldReplaceComponentIndexStr, componentIdStr);
if (hmsInfoTable.hmsInfo[i].errorLevel > MIN_HMS_ERROR_LEVEL &&
hmsInfoTable.hmsInfo[i].errorLevel < MID_HMS_ERROR_LEVEL) {
USER_LOG_WARN("[ErrorCode:0x%2x] %s", hmsInfoTable.hmsInfo[i].errorCode, printBuff);
} else if (hmsInfoTable.hmsInfo[i].errorLevel >= MID_HMS_ERROR_LEVEL &&
hmsInfoTable.hmsInfo[i].errorLevel < MAX_HMS_ERROR_LEVEL) {
USER_LOG_ERROR("[ErrorCode:0x%2x] %s", hmsInfoTable.hmsInfo[i].errorCode, printBuff);
}
}
}
}
if (!hmsCodeMatchFlag) {
USER_LOG_WARN("[ErrorCode:0x%2x] There are no matching documents in the current hmsErrCodeInfoTbl for now.",
hmsInfoTable.hmsInfo[i].errorCode);
}
}
return true;
}
static T_DjiReturnCode DjiTest_HmsInfoCallback(T_DjiHmsInfoTable hmsInfoTable)
{
if (!DjiTest_MarchErrCodeInfoTable(hmsInfoTable)) {
USER_LOG_ERROR("March HMS Information failed.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (hmsInfoTable.hmsInfoNum == 0) {
USER_LOG_INFO("All systems of drone are running well now.");
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,49 @@
/**
********************************************************************
* @file test_hms.h
* @brief This is the header file for "test_hms.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_HMS_H
#define TEST_HMS_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_HmsRunSample(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_HMS_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,229 @@
/**
********************************************************************
* @file test_liveview.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <utils/util_misc.h>
#include <widget_interaction_test/test_widget_interaction.h>
#include "test_liveview.h"
#include "dji_liveview.h"
#include "dji_logger.h"
#include "dji_platform.h"
#include "dji_aircraft_info.h"
#include "time.h"
/* Private constants ---------------------------------------------------------*/
#define TEST_LIVEVIEW_STREAM_FILE_PATH_STR_MAX_SIZE 256
#define TEST_LIVEVIEW_STREAM_STROING_TIME_IN_SECONDS 20
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
static char s_fpvCameraStreamFilePath[TEST_LIVEVIEW_STREAM_FILE_PATH_STR_MAX_SIZE];
static char s_payloadCameraStreamFilePath[TEST_LIVEVIEW_STREAM_FILE_PATH_STR_MAX_SIZE];
/* Private functions declaration ---------------------------------------------*/
static void DjiTest_FpvCameraStreamCallback(E_DjiLiveViewCameraPosition position, const uint8_t *buf,
uint32_t bufLen);
static void DjiTest_PayloadCameraStreamCallback(E_DjiLiveViewCameraPosition position, const uint8_t *buf,
uint32_t bufLen);
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_LiveviewRunSample(E_DjiMountPosition mountPosition)
{
T_DjiReturnCode returnCode;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
time_t currentTime = time(NULL);
struct tm *localTime = NULL;
T_DjiAircraftInfoBaseInfo aircraftInfoBaseInfo = {0};
USER_LOG_INFO("Liveview sample start");
DjiTest_WidgetLogAppend("Liveview sample start");
returnCode = DjiAircraftInfo_GetBaseInfo(&aircraftInfoBaseInfo);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get aircraft base info error");
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
USER_LOG_INFO("--> Step 1: Init liveview module");
DjiTest_WidgetLogAppend("--> Step 1: Init liveview module");
returnCode = DjiLiveview_Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Liveview init failed, error code: 0x%08X", returnCode);
goto out;
}
USER_LOG_INFO("--> Step 2: Start h264 stream of the fpv and selected payload\r\n");
DjiTest_WidgetLogAppend("--> Step 2: Start h264 stream of the fpv and selected payload\r\n");
if (aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3E) {
//TODO: how to use on M3E
} else if (aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3T) {
//TODO: how to use on M3T
} else {
localTime = localtime(&currentTime);
sprintf(s_fpvCameraStreamFilePath, "fpv_stream_%04d%02d%02d_%02d-%02d-%02d.h264",
localTime->tm_year + 1900, localTime->tm_mon + 1, localTime->tm_mday,
localTime->tm_hour, localTime->tm_min, localTime->tm_sec);
returnCode = DjiLiveview_StartH264Stream(DJI_LIVEVIEW_CAMERA_POSITION_FPV, DJI_LIVEVIEW_CAMERA_SOURCE_DEFAULT,
DjiTest_FpvCameraStreamCallback);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Request h264 of fpv failed, error code: 0x%08X", returnCode);
goto out;
}
}
localTime = localtime(&currentTime);
sprintf(s_payloadCameraStreamFilePath, "payload%d_vis_stream_%04d%02d%02d_%02d-%02d-%02d.h264",
mountPosition, localTime->tm_year + 1900, localTime->tm_mon + 1, localTime->tm_mday,
localTime->tm_hour, localTime->tm_min, localTime->tm_sec);
returnCode = DjiLiveview_StartH264Stream((E_DjiLiveViewCameraPosition) mountPosition,
DJI_LIVEVIEW_CAMERA_SOURCE_DEFAULT,
DjiTest_PayloadCameraStreamCallback);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Request h264 of payload %d failed, error code: 0x%08X", mountPosition, returnCode);
}
for (int i = 0; i < TEST_LIVEVIEW_STREAM_STROING_TIME_IN_SECONDS; ++i) {
USER_LOG_INFO("Storing camera h264 stream, second: %d.", i + 1);
osalHandler->TaskSleepMs(1000);
}
USER_LOG_INFO("--> Step 3: Stop h264 stream of the fpv and selected payload\r\n");
DjiTest_WidgetLogAppend("--> Step 3: Stop h264 stream of the fpv and selected payload");
if (aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3E) {
//TODO: how to use on M3E
} else if (aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3T) {
//TODO: how to use on M3T
} else {
returnCode = DjiLiveview_StopH264Stream(DJI_LIVEVIEW_CAMERA_POSITION_FPV, DJI_LIVEVIEW_CAMERA_SOURCE_DEFAULT);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Request to stop h264 of fpv failed, error code: 0x%08X", returnCode);
goto out;
}
}
returnCode = DjiLiveview_StopH264Stream((E_DjiLiveViewCameraPosition) mountPosition,
DJI_LIVEVIEW_CAMERA_SOURCE_DEFAULT);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Request to stop h264 of payload %d failed, error code: 0x%08X", mountPosition, returnCode);
goto out;
}
USER_LOG_INFO("Fpv stream is saved to file: %s", s_fpvCameraStreamFilePath);
USER_LOG_INFO("Payload%d stream is saved to file: %s\r\n", mountPosition, s_payloadCameraStreamFilePath);
if (aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3T) {
USER_LOG_INFO("--> Start h264 stream of the fpv and selected payload\r\n");
localTime = localtime(&currentTime);
sprintf(s_payloadCameraStreamFilePath, "payload%d_ir_stream_%04d%02d%02d_%02d-%02d-%02d.h264",
mountPosition, localTime->tm_year + 1900, localTime->tm_mon + 1, localTime->tm_mday,
localTime->tm_hour, localTime->tm_min, localTime->tm_sec);
returnCode = DjiLiveview_StartH264Stream((E_DjiLiveViewCameraPosition) mountPosition,
DJI_LIVEVIEW_CAMERA_SOURCE_M3T_IR,
DjiTest_PayloadCameraStreamCallback);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Request h264 of payload %d failed, error code: 0x%08X", mountPosition, returnCode);
}
for (int i = 0; i < TEST_LIVEVIEW_STREAM_STROING_TIME_IN_SECONDS; ++i) {
USER_LOG_INFO("Storing camera h264 stream, second: %d.", i + 1);
osalHandler->TaskSleepMs(1000);
}
returnCode = DjiLiveview_StopH264Stream((E_DjiLiveViewCameraPosition) mountPosition,
DJI_LIVEVIEW_CAMERA_SOURCE_DEFAULT);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Request to stop h264 of payload %d failed, error code: 0x%08X", mountPosition, returnCode);
goto out;
}
}
USER_LOG_INFO("Fpv stream is saved to file: %s", s_fpvCameraStreamFilePath);
USER_LOG_INFO("Payload%d stream is saved to file: %s\r\n", mountPosition, s_payloadCameraStreamFilePath);
USER_LOG_INFO("--> Step 4: Deinit liveview module");
DjiTest_WidgetLogAppend("--> Step 4: Deinit liveview module");
returnCode = DjiLiveview_Deinit();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Liveview deinit failed, error code: 0x%08X", returnCode);
goto out;
}
out:
USER_LOG_INFO("Liveview sample end");
return returnCode;
}
/* Private functions definition-----------------------------------------------*/
static void DjiTest_FpvCameraStreamCallback(E_DjiLiveViewCameraPosition position, const uint8_t *buf,
uint32_t bufLen)
{
FILE *fp = NULL;
size_t size;
fp = fopen(s_fpvCameraStreamFilePath, "ab+");
if (fp == NULL) {
printf("fopen failed!\n");
return;
}
size = fwrite(buf, 1, bufLen, fp);
if (size != bufLen) {
fclose(fp);
return;
}
fflush(fp);
fclose(fp);
}
static void DjiTest_PayloadCameraStreamCallback(E_DjiLiveViewCameraPosition position, const uint8_t *buf,
uint32_t bufLen)
{
FILE *fp = NULL;
size_t size;
fp = fopen(s_payloadCameraStreamFilePath, "ab+");
if (fp == NULL) {
printf("fopen failed!\n");
return;
}
size = fwrite(buf, 1, bufLen, fp);
if (size != bufLen) {
fclose(fp);
return;
}
fflush(fp);
fclose(fp);
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,49 @@
/**
********************************************************************
* @file test_liveview.h
* @brief This is the header file for "test_liveview.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_LIVEVIEW_H
#define TEST_LIVEVIEW_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_LiveviewRunSample(E_DjiMountPosition mountPosition);
#ifdef __cplusplus
}
#endif
#endif // TEST_LIVEVIEW_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,833 @@
/**
********************************************************************
* @file test_mop_channel.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <utils/util_misc.h>
#include <stdio.h>
#include <utils/util_md5.h>
#include "dji_mop_channel.h"
#include "dji_logger.h"
#include "dji_platform.h"
#include "test_mop_channel.h"
/* Private constants ---------------------------------------------------------*/
#define DJI_MOP_CHANNEL_TASK_STACK_SIZE 2048
#define TEST_MOP_CHANNEL_INIT_TIMEMS (3 * 1000)
#define TEST_MOP_CHANNEL_RETRY_TIMEMS (3 * 1000)
#define TEST_MOP_CHANNEL_NORMAL_TRANSFOR_CHANNEL_ID 49152
#define TEST_MOP_CHANNEL_NORMAL_TRANSFOR_USING_RELIABLE_TRANS 0
#define TEST_MOP_CHANNEL_NORMAL_TRANSFOR_SEND_TASK_FREQ 1
#define TEST_MOP_CHANNEL_NORMAL_TRANSFOR_SEND_BUFFER (64 * 1024)
#define TEST_MOP_CHANNEL_NORMAL_TRANSFOR_RECV_BUFFER (100 * 1024)
#define TEST_MOP_CHANNEL_FILE_SERVICE_CHANNEL_ID 49153
#define TEST_MOP_CHANNEL_FILE_SERVICE_SEND_BUFFER (3 * 1024 * 1024)
#define TEST_MOP_CHANNEL_FILE_SERVICE_RECV_BUFFER (100 * 1024)
#define TEST_MOP_CHANNEL_FILE_SERVICE_CLIENT_MAX_SUPPORT_NUM 10
/* Private types -------------------------------------------------------------*/
typedef enum {
MOP_FILE_SERVICE_DOWNLOAD_IDEL = 0,
MOP_FILE_SERVICE_DOWNLOAD_REQUEST_START,
MOP_FILE_SERVICE_DOWNLOAD_FILE_INFO_SUCCESS,
MOP_FILE_SERVICE_DOWNLOAD_FILE_INFO_FAILED,
MOP_FILE_SERVICE_DOWNLOAD_DATA_SENDING,
MOP_FILE_SERVICE_DOWNLOAD_FINISHED_SUCCESS,
MOP_FILE_SERVICE_DOWNLOAD_FINISHED_FAILED,
MOP_FILE_SERVICE_DOWNLOAD_STOP,
} E_MopFileServiceDownloadState;
typedef enum {
MOP_FILE_SERVICE_UPLOAD_IDEL = 0,
MOP_FILE_SERVICE_UPLOAD_REQUEST_START,
MOP_FILE_SERVICE_UPLOAD_FILE_INFO_SUCCESS,
MOP_FILE_SERVICE_UPLOAD_FILE_INFO_FAILED,
MOP_FILE_SERVICE_UPLOAD_DATA_SENDING,
MOP_FILE_SERVICE_UPLOAD_FINISHED_SUCCESS,
MOP_FILE_SERVICE_UPLOAD_FINISHED_FAILED,
MOP_FILE_SERVICE_UPLOAD_STOP,
} E_MopFileServiceUploadState;
typedef struct {
uint8_t index;
T_DjiTaskHandle clientRecvTask;
T_DjiTaskHandle clientSendTask;
T_DjiMopChannelHandle clientHandle;
E_MopFileServiceDownloadState downloadState;
uint16_t downloadSeqNum;
E_MopFileServiceUploadState uploadState;
uint16_t uploadSeqNum;
} T_MopFileServiceClientContent;
/* Private values -------------------------------------------------------------*/
static T_DjiMopChannelHandle s_testMopChannelNormalHandle;
static T_DjiMopChannelHandle s_testMopChannelNormalOutHandle;
static T_DjiTaskHandle s_testMopChannelNormalSendTask;
static T_DjiTaskHandle s_testMopChannelNormalRecvTask;
static T_DjiSemaHandle s_testMopChannelReadySema;
static bool s_testMopChannelConnected = false;
static T_DjiTaskHandle s_fileServiceMopChannelAcceptTask;
static T_DjiMopChannelHandle s_fileServiceMopChannelHandle;
static T_MopFileServiceClientContent s_fileServiceContent[TEST_MOP_CHANNEL_FILE_SERVICE_CLIENT_MAX_SUPPORT_NUM];
/* Private functions declaration ---------------------------------------------*/
static void *DjiTest_MopChannelSendNormalTask(void *arg);
static void *DjiTest_MopChannelRecvNormalTask(void *arg);
static void *DjiTest_MopChannelFileServiceAcceptTask(void *arg);
static void *DjiTest_MopChannelFileServiceRecvTask(void *arg);
static void *DjiTest_MopChannelFileServiceSendTask(void *arg);
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_MopChannelStartService(void)
{
T_DjiReturnCode returnCode;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
returnCode = osalHandler->SemaphoreCreate(0, &s_testMopChannelReadySema);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop channel create msdk sema error, stat:0x%08llX.", returnCode);
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
returnCode = DjiMopChannel_Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop channel init error, stat:0x%08llX.", returnCode);
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
returnCode = osalHandler->TaskCreate("mop_msdk_send_task", DjiTest_MopChannelSendNormalTask,
DJI_MOP_CHANNEL_TASK_STACK_SIZE, NULL, &s_testMopChannelNormalSendTask);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop channel msdk send task create error, stat:0x%08llX.", returnCode);
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
returnCode = osalHandler->TaskCreate("mop_msdk_recv_task", DjiTest_MopChannelRecvNormalTask,
DJI_MOP_CHANNEL_TASK_STACK_SIZE, NULL, &s_testMopChannelNormalRecvTask);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop channel msdk recv task create error, stat:0x%08llX.", returnCode);
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
returnCode = osalHandler->TaskCreate("mop_msdk_accept_task", DjiTest_MopChannelFileServiceAcceptTask,
DJI_MOP_CHANNEL_TASK_STACK_SIZE, NULL, &s_fileServiceMopChannelAcceptTask);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop channel osdk recv task create error, stat:0x%08llX.", returnCode);
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
static void *DjiTest_MopChannelSendNormalTask(void *arg)
{
uint8_t *sendBuf = NULL;
uint32_t realLen = 0;
T_DjiReturnCode returnCode;
uint32_t sendDataCount = 0;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
USER_UTIL_UNUSED(arg);
osalHandler->TaskSleepMs(TEST_MOP_CHANNEL_INIT_TIMEMS);
sendBuf = osalHandler->Malloc(TEST_MOP_CHANNEL_NORMAL_TRANSFOR_SEND_BUFFER);
if (sendBuf == NULL) {
USER_LOG_ERROR("malloc send buffer error");
return NULL;
}
REWAIT:
returnCode = osalHandler->SemaphoreWait(s_testMopChannelReadySema);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop channel wait sema error, stat:0x%08llX.", returnCode);
return NULL;
}
while (1) {
if (s_testMopChannelConnected == false) {
sendDataCount = 0;
goto REWAIT;
}
sendDataCount++;
memset(sendBuf, sendDataCount, TEST_MOP_CHANNEL_NORMAL_TRANSFOR_SEND_BUFFER);
returnCode = DjiMopChannel_SendData(s_testMopChannelNormalOutHandle, sendBuf,
TEST_MOP_CHANNEL_NORMAL_TRANSFOR_SEND_BUFFER, &realLen);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop channel send data to channel error,stat:0x%08llX", returnCode);
} else {
USER_LOG_INFO("mop channel send data to channel length:%d count:%d", realLen, sendDataCount);
}
osalHandler->TaskSleepMs(1000 / TEST_MOP_CHANNEL_NORMAL_TRANSFOR_SEND_TASK_FREQ);
}
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
static void *DjiTest_MopChannelRecvNormalTask(void *arg)
{
USER_UTIL_UNUSED(arg);
uint8_t *recvBuf = NULL;
uint32_t realLen;
T_DjiReturnCode returnCode;
uint32_t recvDataCount = 0;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
osalHandler->TaskSleepMs(TEST_MOP_CHANNEL_INIT_TIMEMS);
#if TEST_MOP_CHANNEL_NORMAL_TRANSFOR_USING_RELIABLE_TRANS
returnCode = DjiMopChannel_Create(&s_testMopChannelNormalHandle, DJI_MOP_CHANNEL_TRANS_RELIABLE);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop channel create send handle error, stat:0x%08llX.", returnCode);
return NULL;
}
#else
returnCode = DjiMopChannel_Create(&s_testMopChannelNormalHandle, DJI_MOP_CHANNEL_TRANS_UNRELIABLE);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop channel create send handle error, stat:0x%08llX.", returnCode);
return NULL;
}
#endif
REBIND:
returnCode = DjiMopChannel_Bind(s_testMopChannelNormalHandle, TEST_MOP_CHANNEL_NORMAL_TRANSFOR_CHANNEL_ID);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop bind channel error :0x%08llX", returnCode);
osalHandler->TaskSleepMs(TEST_MOP_CHANNEL_RETRY_TIMEMS);
goto REBIND;
}
REACCEPT:
returnCode = DjiMopChannel_Accept(s_testMopChannelNormalHandle, &s_testMopChannelNormalOutHandle);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_WARN("mop accept channel error :0x%08llX", returnCode);
osalHandler->TaskSleepMs(TEST_MOP_CHANNEL_RETRY_TIMEMS);
goto REACCEPT;
}
USER_LOG_INFO("mop channel is connected");
recvBuf = osalHandler->Malloc(TEST_MOP_CHANNEL_NORMAL_TRANSFOR_RECV_BUFFER);
if (recvBuf == NULL) {
USER_LOG_ERROR("malloc recv buffer error");
return NULL;
}
s_testMopChannelConnected = true;
returnCode = osalHandler->SemaphorePost(s_testMopChannelReadySema);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop channel post sema error, stat:0x%08llX.", returnCode);
return NULL;
}
while (1) {
memset(recvBuf, 0, TEST_MOP_CHANNEL_NORMAL_TRANSFOR_RECV_BUFFER);
returnCode = DjiMopChannel_RecvData(s_testMopChannelNormalOutHandle, recvBuf,
TEST_MOP_CHANNEL_NORMAL_TRANSFOR_RECV_BUFFER, &realLen);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
if (returnCode == DJI_ERROR_MOP_CHANNEL_MODULE_CODE_CONNECTION_CLOSE) {
USER_LOG_INFO("mop channel is disconnected");
s_testMopChannelConnected = false;
osalHandler->TaskSleepMs(TEST_MOP_CHANNEL_RETRY_TIMEMS);
DjiMopChannel_Close(s_testMopChannelNormalOutHandle);
DjiMopChannel_Destroy(s_testMopChannelNormalOutHandle);
goto REACCEPT;
}
} else {
USER_LOG_INFO("mop channel recv data from channel length:%d count:%d", realLen, recvDataCount++);
}
}
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
static void *DjiTest_MopChannelFileServiceAcceptTask(void *arg)
{
T_DjiReturnCode returnCode;
uint8_t currentClientNum = 0;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
USER_UTIL_UNUSED(arg);
USER_LOG_DEBUG("[File-Service] Start the file service.");
returnCode = DjiMopChannel_Create(&s_fileServiceMopChannelHandle, DJI_MOP_CHANNEL_TRANS_RELIABLE);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("[File-Service] mop channel create send handle error, stat:0x%08llX.", returnCode);
return NULL;
}
REBIND:
returnCode = DjiMopChannel_Bind(s_fileServiceMopChannelHandle, TEST_MOP_CHANNEL_FILE_SERVICE_CHANNEL_ID);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("[File-Service] mop bind channel error :0x%08llX", returnCode);
osalHandler->TaskSleepMs(TEST_MOP_CHANNEL_RETRY_TIMEMS);
goto REBIND;
}
while (1) {
REACCEPT:
returnCode = DjiMopChannel_Accept(s_fileServiceMopChannelHandle,
&s_fileServiceContent[currentClientNum].clientHandle);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_WARN("[File-Service] mop accept channel error :0x%08llX", returnCode);
osalHandler->TaskSleepMs(TEST_MOP_CHANNEL_RETRY_TIMEMS);
goto REACCEPT;
}
USER_LOG_INFO("[File-Service] [Client:%d] mop channel is connected", currentClientNum);
s_fileServiceContent[currentClientNum].index = currentClientNum;
returnCode = osalHandler->TaskCreate("mop_file_service_recv_task",
DjiTest_MopChannelFileServiceRecvTask,
DJI_MOP_CHANNEL_TASK_STACK_SIZE,
&s_fileServiceContent[currentClientNum].index,
&s_fileServiceContent[currentClientNum].clientRecvTask);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop channel recv task create error, stat:0x%08llX.", returnCode);
return NULL;
}
returnCode = osalHandler->TaskCreate("mop_file_service_send_task",
DjiTest_MopChannelFileServiceSendTask,
DJI_MOP_CHANNEL_TASK_STACK_SIZE,
&s_fileServiceContent[currentClientNum].index,
&s_fileServiceContent[currentClientNum].clientSendTask);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("mop channel send task create error, stat:0x%08llX.", returnCode);
return NULL;
}
currentClientNum++;
if (currentClientNum > TEST_MOP_CHANNEL_FILE_SERVICE_CLIENT_MAX_SUPPORT_NUM) {
currentClientNum = 0;
}
}
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
static void *DjiTest_MopChannelFileServiceSendTask(void *arg)
{
T_DjiReturnCode returnCode;
uint8_t clientNum = *(uint8_t *) arg;
uint32_t sendRealLen = 0;
uint8_t *sendBuf;
MD5_CTX downloadFileMd5Ctx;
FILE *downloadFile = NULL;
uint8_t downloadFileMd5[DJI_MD5_BUFFER_LEN] = {0};
uint64_t downloadFileTotalSize = 0;
uint64_t downloadWriteLen;
uint16_t downloadPackCount = 0;
T_DjiMopChannel_FileInfo downloadFileInfo = {0};
T_DjiMopChannel_FileTransfor transforAck = {0};
T_DjiMopChannel_FileTransfor fileData = {0};
T_DjiMopChannel_FileTransfor fileInfo = {0};
uint32_t downloadStartMs = 0;
uint32_t downloadEndMs = 0;
uint32_t downloadDurationMs;
dji_f32_t downloadRate;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
char curFileDirPath[DJI_FILE_PATH_SIZE_MAX];
char tempPath[DJI_FILE_PATH_SIZE_MAX];
sendBuf = osalHandler->Malloc(TEST_MOP_CHANNEL_FILE_SERVICE_SEND_BUFFER);
if (sendBuf == NULL) {
USER_LOG_ERROR("[File-Service] [Client:%d] malloc send buffer error", clientNum);
return NULL;
}
while (1) {
switch (s_fileServiceContent[clientNum].uploadState) {
case MOP_FILE_SERVICE_UPLOAD_REQUEST_START:
transforAck.cmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_ACK;
transforAck.subcmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_ACK_OK;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum;
transforAck.dataLen = 0;
DjiMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle, (uint8_t * ) & transforAck,
UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data),
&sendRealLen);
USER_LOG_DEBUG("[File-Service] [Client:%d] upload request ack", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
break;
case MOP_FILE_SERVICE_UPLOAD_FILE_INFO_SUCCESS:
transforAck.cmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_ACK;
transforAck.subcmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_ACK_OK;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum;
transforAck.dataLen = 0;
DjiMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle, (uint8_t * ) & transforAck,
UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data),
&sendRealLen);
USER_LOG_DEBUG("[File-Service] [Client:%d] upload file info success", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
break;
case MOP_FILE_SERVICE_UPLOAD_FILE_INFO_FAILED:
transforAck.cmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_ACK;
transforAck.subcmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_ACK_REJECTED;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum;
transforAck.dataLen = 0;
DjiMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle, (uint8_t * ) & transforAck,
UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data),
&sendRealLen);
USER_LOG_ERROR("[File-Service] [Client:%d] upload file info failed", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
break;
case MOP_FILE_SERVICE_UPLOAD_FINISHED_SUCCESS:
transforAck.cmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_RESULT;
transforAck.subcmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_RESULT_OK;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum++;
transforAck.dataLen = 0;
DjiMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle,
(uint8_t * ) & transforAck,
UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data),
&sendRealLen);
USER_LOG_DEBUG("[File-Service] [Client:%d] upload finished success", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
break;
case MOP_FILE_SERVICE_UPLOAD_FINISHED_FAILED:
transforAck.cmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_RESULT;
transforAck.subcmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_RESULT_FAILED;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum++;
transforAck.dataLen = 0;
DjiMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle,
(uint8_t * ) & transforAck,
UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data),
&sendRealLen);
USER_LOG_ERROR("[File-Service] [Client:%d] upload finished failed", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
break;
case MOP_FILE_SERVICE_UPLOAD_STOP:
transforAck.cmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_STOP_ACK;
transforAck.subcmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_STOP_UPLOAD;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum++;
transforAck.dataLen = 0;
DjiMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle,
(uint8_t *) &transforAck,
UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data),
&sendRealLen);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
break;
default:
break;
}
switch (s_fileServiceContent[clientNum].downloadState) {
case MOP_FILE_SERVICE_DOWNLOAD_REQUEST_START:
transforAck.cmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_ACK;
transforAck.subcmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_ACK_OK;
transforAck.seqNum = s_fileServiceContent[clientNum].downloadSeqNum;
transforAck.dataLen = 0;
DjiMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle, (uint8_t * ) & transforAck,
UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data),
&sendRealLen);
USER_LOG_DEBUG("[File-Service] [Client:%d] download request ack", clientNum);
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_IDEL;
break;
case MOP_FILE_SERVICE_DOWNLOAD_STOP:
transforAck.cmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_STOP_ACK;
transforAck.subcmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_STOP_DOWNLOAD;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum++;
transforAck.dataLen = 0;
DjiMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle,
(uint8_t *) &transforAck,
UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data),
&sendRealLen);
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_IDEL;
break;
case MOP_FILE_SERVICE_DOWNLOAD_FILE_INFO_SUCCESS:
UtilMd5_Init(&downloadFileMd5Ctx);
osalHandler->GetTimeMs(&downloadStartMs);
if (downloadFile != NULL) {
fclose(downloadFile);
}
returnCode = DjiUserUtil_GetCurrentFileDirPath(__FILE__, DJI_FILE_PATH_SIZE_MAX, curFileDirPath);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get file current path error, stat = 0x%08llX", returnCode);
exit(1);
}
snprintf(tempPath, DJI_FILE_PATH_SIZE_MAX, "%smop_channel_test_file/mop_send_test_file.mp4", curFileDirPath);
downloadFile = fopen(tempPath, "rb");
if (downloadFile == NULL) {
USER_LOG_ERROR("[File-Service] [Client:%d] download open file error",
clientNum);
return NULL;
}
downloadFileTotalSize = 0;
while (1) {
returnCode = fseek(downloadFile, downloadFileTotalSize, SEEK_SET);
if (returnCode != 0) {
USER_LOG_ERROR(
"[File-Service] [Client:%d] mop channel fseek file data fail.", clientNum);
}
downloadWriteLen = fread(sendBuf, 1, TEST_MOP_CHANNEL_FILE_SERVICE_SEND_BUFFER,
downloadFile);
if (downloadWriteLen > 0) {
downloadFileTotalSize += downloadWriteLen;
UtilMd5_Update(&downloadFileMd5Ctx, sendBuf, downloadWriteLen);
if (downloadWriteLen < TEST_MOP_CHANNEL_FILE_SERVICE_SEND_BUFFER) {
break;
}
}
}
UtilMd5_Final(&downloadFileMd5Ctx, downloadFileMd5);
fileInfo.cmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_INFO;
fileInfo.subcmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_DOWNLOAD_REQUEST;
fileInfo.seqNum = s_fileServiceContent[clientNum].downloadSeqNum;
fileInfo.dataLen = sizeof(fileInfo) - UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data);
fileInfo.data.fileInfo.isExist = true;
downloadFileInfo.fileLength = downloadFileTotalSize;
fileInfo.data.fileInfo.fileLength = downloadFileTotalSize;
strcpy(fileInfo.data.fileInfo.fileName, "test.mp4");
memcpy(&fileInfo.data.fileInfo.md5Buf, &downloadFileMd5, sizeof(downloadFileMd5));
DjiMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle, (uint8_t *) &fileInfo,
sizeof(T_DjiMopChannel_FileTransfor),
&sendRealLen);
USER_LOG_DEBUG(
"[File-Service] [Client:%d] download ack file info exist:%d length:%d name:%s",
clientNum, fileInfo.data.fileInfo.isExist,
fileInfo.data.fileInfo.fileLength, fileInfo.data.fileInfo.fileName);
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_DATA_SENDING;
downloadFileTotalSize = 0;
downloadPackCount = 0;
break;
case MOP_FILE_SERVICE_DOWNLOAD_DATA_SENDING:
if (downloadFile == NULL) {
USER_LOG_ERROR("[File-Service] [Client:%d] download file object is NULL.");
break;
}
returnCode = fseek(downloadFile, downloadFileTotalSize, SEEK_SET);
if (returnCode != 0) {
USER_LOG_ERROR("[File-Service] [Client:%d] download fseek file data fail.",
clientNum);
break;
}
downloadWriteLen = fread(&sendBuf[UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data)],
1,
(TEST_MOP_CHANNEL_FILE_SERVICE_SEND_BUFFER -
UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data)),
downloadFile);
if (downloadWriteLen > 0) {
downloadFileTotalSize += downloadWriteLen;
downloadPackCount++;
fileData.cmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_DATA;
fileData.dataLen = downloadWriteLen;
fileData.seqNum++;
if (downloadWriteLen ==
(TEST_MOP_CHANNEL_FILE_SERVICE_SEND_BUFFER -
UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data))) {
fileData.subcmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_NORMAL;
} else {
fileData.subcmd = DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_END;
}
memcpy(sendBuf, &fileData, UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data));
returnCode = DjiMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle, sendBuf,
(downloadWriteLen +
UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data)),
&sendRealLen);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR(
"[File-Service] [Client:%d] download send file data error,stat:0x%08llX",
clientNum, returnCode);
if (returnCode == DJI_ERROR_MOP_CHANNEL_MODULE_CODE_CONNECTION_CLOSE) {
break;
}
} else {
USER_LOG_INFO(
"[File-Service] [Client:%d] download send file data length:%d count:%d total:%d percent: %.1f %%",
clientNum, sendRealLen, downloadPackCount, downloadFileTotalSize,
(dji_f32_t)(downloadFileTotalSize) * 100 / (dji_f32_t) downloadFileInfo.fileLength);
}
if (fileData.subcmd == DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_END) {
osalHandler->GetTimeMs(&downloadEndMs);
downloadDurationMs = downloadEndMs - downloadStartMs;
if (downloadDurationMs != 0) {
downloadRate = (dji_f32_t) downloadFileInfo.fileLength * 1000 /
(dji_f32_t) (downloadDurationMs);
USER_LOG_INFO(
"[File-Service] [Client:%d] download finished totalTime:%d, rate:%.2f Byte/s",
clientNum, downloadDurationMs, downloadRate);
}
}
break;
default:
break;
}
}
}
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
static void *DjiTest_MopChannelFileServiceRecvTask(void *arg)
{
T_DjiReturnCode returnCode;
uint8_t clientNum = *(uint8_t *) arg;
uint32_t recvRealLen;
uint8_t *recvBuf;
MD5_CTX uploadFileMd5Ctx;
FILE *uploadFile = NULL;
uint8_t uploadFileMd5[DJI_MD5_BUFFER_LEN] = {0};
uint32_t uploadFileTotalSize = 0;
int32_t uploadWriteLen;
T_DjiMopChannel_FileInfo uploadFileInfo = {0};
uint32_t uploadStartMs = 0;
uint32_t uploadEndMs = 0;
dji_f32_t uploadRate;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
recvBuf = osalHandler->Malloc(TEST_MOP_CHANNEL_FILE_SERVICE_RECV_BUFFER);
if (recvBuf == NULL) {
USER_LOG_ERROR("[File-Service] [Client:%d] malloc recv buffer error", clientNum);
return NULL;
}
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_IDEL;
while (1) {
returnCode = DjiMopChannel_RecvData(s_fileServiceContent[clientNum].clientHandle, recvBuf,
TEST_MOP_CHANNEL_FILE_SERVICE_RECV_BUFFER, &recvRealLen);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
osalHandler->TaskSleepMs(1000);
if (returnCode == DJI_ERROR_MOP_CHANNEL_MODULE_CODE_CONNECTION_CLOSE) {
USER_LOG_INFO("[File-Service] [Client:%d] mop channel is disconnected", clientNum);
osalHandler->TaskDestroy(s_fileServiceContent[clientNum].clientRecvTask);
DjiMopChannel_Close(s_fileServiceContent[clientNum].clientHandle);
DjiMopChannel_Destroy(s_fileServiceContent[clientNum].clientHandle);
}
} else {
if (&recvRealLen > 0) {
T_DjiMopChannel_FileTransfor *fileTransfor = (T_DjiMopChannel_FileTransfor *) recvBuf;
switch (fileTransfor->cmd) {
case DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_REQUEST:
if (fileTransfor->subcmd == DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_REQUEST_UPLOAD) {
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_REQUEST_START;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
USER_LOG_DEBUG("[File-Service] [Client:%d] upload request is ok", clientNum);
UtilMd5_Init(&uploadFileMd5Ctx);
uploadFileTotalSize = 0;
osalHandler->GetTimeMs(&uploadStartMs);
} else if (fileTransfor->subcmd == DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_REQUEST_DOWNLOAD) {
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_REQUEST_START;
s_fileServiceContent[clientNum].downloadSeqNum = fileTransfor->seqNum;
USER_LOG_DEBUG("[File-Service] [Client:%d] download request is ok", clientNum);
}
break;
case DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_DOWNLOAD_REQ:
USER_LOG_DEBUG("[File-Service] [Client:%d] download request file name:%s", clientNum,
fileTransfor->data.dwonloadReq.fileName);
if (strcmp(fileTransfor->data.dwonloadReq.fileName, "test.mp4") == 0) {
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_FILE_INFO_SUCCESS;
s_fileServiceContent[clientNum].downloadSeqNum = fileTransfor->seqNum;
} else {
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_FILE_INFO_FAILED;
s_fileServiceContent[clientNum].downloadSeqNum = fileTransfor->seqNum;
}
break;
case DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_INFO:
USER_LOG_DEBUG(
"[File-Service] [Client:%d] upload file info length:%d exist:%d name:%s seq:%d", clientNum,
fileTransfor->data.fileInfo.fileLength,
fileTransfor->data.fileInfo.isExist,
fileTransfor->data.fileInfo.fileName, fileTransfor->seqNum);
uploadFileInfo.fileLength = fileTransfor->data.fileInfo.fileLength;
memcpy(uploadFileInfo.md5Buf, fileTransfor->data.fileInfo.md5Buf,
sizeof(uploadFileInfo.md5Buf));
if (uploadFile != NULL) {
fclose(uploadFile);
}
uploadFile = fopen(fileTransfor->data.fileInfo.fileName, "wb");
if (uploadFile == NULL) {
USER_LOG_ERROR("[File-Service] [Client:%d] open file error", clientNum);
return NULL;
}
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_FILE_INFO_SUCCESS;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
break;
case DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_DATA:
if (uploadFile == NULL) {
USER_LOG_ERROR("[File-Service] [Client:%d] open file error", clientNum);
return NULL;
}
if (fileTransfor->subcmd == DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_NORMAL) {
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_DATA_SENDING;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
uploadWriteLen = fwrite(&recvBuf[UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data)], 1,
fileTransfor->dataLen, uploadFile);
if (uploadWriteLen < 0) {
USER_LOG_ERROR(
"[File-Service] [Client:%d] upload write normal data to file error, stat:%d.",
clientNum,
uploadWriteLen);
} else {
uploadFileTotalSize += uploadWriteLen;
UtilMd5_Update(&uploadFileMd5Ctx,
&recvBuf[UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data)],
fileTransfor->dataLen);
if (uploadFileInfo.fileLength != 0) {
USER_LOG_INFO(
"[File-Service] [Client:%d] upload write data to file success, len:%d percent:%.1f %%",
clientNum, uploadWriteLen,
(dji_f32_t)(uploadFileTotalSize * 100) /
(dji_f32_t) uploadFileInfo.fileLength);
}
}
} else if (fileTransfor->subcmd == DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_END) {
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_DATA_SENDING;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
uploadWriteLen = fwrite(&recvBuf[UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data)], 1,
fileTransfor->dataLen, uploadFile);
if (uploadWriteLen < 0) {
USER_LOG_ERROR(
"[File-Service] [Client:%d] upload write end data to file error, stat:%d.",
clientNum,
uploadWriteLen);
} else {
uploadFileTotalSize += uploadWriteLen;
UtilMd5_Update(&uploadFileMd5Ctx,
&recvBuf[UTIL_OFFSETOF(T_DjiMopChannel_FileTransfor, data)],
fileTransfor->dataLen);
UtilMd5_Final(&uploadFileMd5Ctx, uploadFileMd5);
osalHandler->GetTimeMs(&uploadEndMs);
if (uploadEndMs - uploadStartMs > 0) {
uploadRate = (dji_f32_t) uploadFileTotalSize * 1000 /
(dji_f32_t) (uploadEndMs - uploadStartMs);
USER_LOG_INFO(
"[File-Service] [Client:%d] upload write data to file success, len:%d percent:%.1f %%",
clientNum, uploadWriteLen,
(dji_f32_t)(uploadFileTotalSize * 100) /
(dji_f32_t) uploadFileInfo.fileLength);
USER_LOG_INFO(
"[File-Service] [Client:%d] upload file finished, totalTime:%d ms rate:%.2f Byte/s",
clientNum, (uploadEndMs - uploadStartMs), uploadRate);
}
fclose(uploadFile);
uploadFile = NULL;
if (uploadFileInfo.fileLength == uploadFileTotalSize) {
if (memcmp(uploadFileInfo.md5Buf, uploadFileMd5, sizeof(uploadFileMd5)) == 0) {
USER_LOG_DEBUG(
"[File-Service] [Client:%d] upload file md5 check success", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_FINISHED_SUCCESS;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
} else {
USER_LOG_ERROR(
"[File-Service] [Client:%d] upload file md5 check failed", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_FINISHED_FAILED;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
}
} else {
USER_LOG_ERROR(
"[File-Service] [Client:%d] upload file check file length error", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_FINISHED_FAILED;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
}
}
}
break;
case DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_RESULT:
if (fileTransfor->subcmd == DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_RESULT_OK) {
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_FINISHED_SUCCESS;
USER_LOG_DEBUG("[File-Service] [Client:%d] download file result notify success",
clientNum);
} else {
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_FINISHED_FAILED;
USER_LOG_ERROR("[File-Service] [Client:%d] download file result notify failed",
clientNum);
}
break;
case DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_STOP_REQUEST:
if (fileTransfor->subcmd == DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_STOP_UPLOAD) {
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_STOP;
USER_LOG_DEBUG("[File-Service] [Client:%d] upload file stop", clientNum);
} else if (fileTransfor->subcmd == DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_STOP_DOWNLOAD) {
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_STOP;
USER_LOG_DEBUG("[File-Service] [Client:%d] download file stop", clientNum);
}
break;
default:
USER_LOG_WARN("[File-Service] [Client:%d] recv the unknown command0x%02X",
clientNum, fileTransfor->cmd);
break;
}
}
}
}
}
#pragma GCC diagnostic pop
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,119 @@
/**
********************************************************************
* @file test_mop_channel.h
* @brief This is the header file for "test_mop_channel.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_MOP_CHANNEL_H
#define TEST_MOP_CHANNEL_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef enum {
DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_REQUEST = 0x50,
DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_ACK = 0x51,
DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_RESULT = 0x52,
DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_INFO = 0x60,
DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_DOWNLOAD_REQ = 0x61,
DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_DATA = 0x62,
DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_STOP_REQUEST = 0x63,
DJI_MOP_CHANNEL_FILE_TRANSFOR_CMD_STOP_ACK = 0x64,
} E_DjiMopChannel_FileTransforCmd;
typedef enum {
DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_REQUEST_UPLOAD = 0x00,
DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_REQUEST_DOWNLOAD = 0x01,
} E_DjiMopChannel_FileTransforRequestSubCmd;
typedef enum {
DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_ACK_OK = 0x00,
DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_ACK_REJECTED = 0x01,
} E_DjiMopChannel_FileTransforAckSubCmd;
typedef enum {
DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_RESULT_OK = 0x00,
DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_RESULT_FAILED = 0x01,
} E_DjiMopChannel_FileTransforResultSubCmd;
typedef enum {
DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_INFO_DEFAULT = 0xFF,
} E_DjiMopChannel_FileTransforFileInfoSubCmd;
typedef enum {
DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_DOWNLOAD_REQUEST = 0xFF,
} E_DjiMopChannel_FileTransforFileDownloadRequestSubCmd;
typedef enum {
DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_NORMAL = 0x00,
DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_END = 0x01,
} E_DjiMopChannel_FileTransforFileDataSubCmd;
typedef enum {
DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_STOP_UPLOAD = 0x00,
DJI_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_STOP_DOWNLOAD = 0x01,
} E_DjiMopChannel_FileTransforStopSubCmd;
#pragma pack(1)
typedef struct {
bool isExist;
uint32_t fileLength;
char fileName[32];
uint8_t md5Buf[16];
} T_DjiMopChannel_FileInfo;
typedef struct {
char fileName[32];
} T_DjiMopChannel_DwonloadReq;
typedef struct {
uint8_t cmd;
uint8_t subcmd;
uint16_t seqNum;
uint32_t dataLen;
union dataType {
T_DjiMopChannel_FileInfo fileInfo;
T_DjiMopChannel_DwonloadReq dwonloadReq;
uint8_t fileData[0];
} data;
} T_DjiMopChannel_FileTransfor;
#pragma pack()
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_MopChannelStartService(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_MOP_CHANNEL_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,174 @@
/**
********************************************************************
* @file test_payload_collaboration.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <dji_payload_camera.h>
#include "test_payload_collaboration.h"
#include "dji_aircraft_info.h"
#include "dji_typedef.h"
#include "dji_logger.h"
#include "dji_platform.h"
#include "utils/util_misc.h"
/* Private constants ---------------------------------------------------------*/
#define DJI_TEST_PAYLOAD_COLLABORATION_TASK_FREQ (1)
#define DJI_TEST_PAYLOAD_COLLABORATION_TASK_STACK_SIZE (2048)
#define DJI_TEST_PAYLOAD_COLLABORATION_PAYLOADS_IN_DRONE_MAX_COUNT (3)
/* Private types -------------------------------------------------------------*/
typedef struct {
E_DjiCameraType cameraType;
bool hasOpticalZoomSpec;
bool hasHybridZoomFocalLength;
} T_DjiTestPayloadPara;
/* Private functions declaration ---------------------------------------------*/
static void *DjiTest_PayloadCollaborationTask(void *arg);
/* Private variables ---------------------------------------------------------*/
static T_DjiTaskHandle s_payloadCollaborationThread;
static const T_DjiTestPayloadPara s_payloadPara[] = {
{DJI_CAMERA_TYPE_Z30, true, true},
{DJI_CAMERA_TYPE_XT2, true, true},
{DJI_CAMERA_TYPE_XTS, false, false},
{DJI_CAMERA_TYPE_H20, true, true},
{DJI_CAMERA_TYPE_H20T, true, true},
};
static bool s_userPayloadCollaborationDataShow = false;
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_PayloadCollaborationStartService(void)
{
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
if (osalHandler->TaskCreate("user_payload_collaboration_task", DjiTest_PayloadCollaborationTask,
DJI_TEST_PAYLOAD_COLLABORATION_TASK_STACK_SIZE,
NULL, &s_payloadCollaborationThread) !=
DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("user payload collaboration task create error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiTest_PayloadCollaborationDataShowTrigger(void)
{
s_userPayloadCollaborationDataShow = !s_userPayloadCollaborationDataShow;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *DjiTest_PayloadCollaborationTask(void *arg)
{
int i = 0;
unsigned int payloadParaIndex = 0;
T_DjiReturnCode djiStat;
E_DjiCameraType cameraType = DJI_CAMERA_TYPE_UNKNOWN;
uint16_t cameraHybridZoomFocalLength = 0;
T_DjiAircraftInfoBaseInfo aircraftBaseInfo = {0};
E_DjiMountPosition requestedPayloadMountPosition;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
T_DjiCameraOpticalZoomSpec cameraOpticalZoomSpec = {0};
USER_UTIL_UNUSED(arg);
while (1) {
osalHandler->TaskSleepMs(1000 / DJI_TEST_PAYLOAD_COLLABORATION_TASK_FREQ);
djiStat = DjiAircraftInfo_GetBaseInfo(&aircraftBaseInfo);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get aircraft information error: 0x%08llX.", djiStat);
continue;
}
for (i = 0; i < DJI_TEST_PAYLOAD_COLLABORATION_PAYLOADS_IN_DRONE_MAX_COUNT; ++i) {
requestedPayloadMountPosition =
(E_DjiMountPosition) (i + DJI_MOUNT_POSITION_PAYLOAD_PORT_NO1);
if (requestedPayloadMountPosition == aircraftBaseInfo.mountPosition)
continue;
djiStat = DjiPayloadCamera_GetCameraTypeOfPayload(requestedPayloadMountPosition, &cameraType);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
continue;
}
if (s_userPayloadCollaborationDataShow == true) {
USER_LOG_INFO("camera type of payload mounted on NO.%d gimbal connector is %d.",
requestedPayloadMountPosition, cameraType);
}
for (payloadParaIndex = 0; payloadParaIndex < UTIL_ARRAY_SIZE(s_payloadPara); ++payloadParaIndex) {
if (s_payloadPara[payloadParaIndex].cameraType == cameraType)
break;
}
if (payloadParaIndex == UTIL_ARRAY_SIZE(s_payloadPara)) {
USER_LOG_ERROR("Not find payload parameters.");
continue;
}
if (s_payloadPara[payloadParaIndex].hasOpticalZoomSpec) {
djiStat = DjiPayloadCamera_GetCameraOpticalZoomSpecOfPayload(requestedPayloadMountPosition,
&cameraOpticalZoomSpec);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get optical zoom specification error.");
}
if (s_userPayloadCollaborationDataShow == true) {
USER_LOG_INFO(
"camera optical zoom specification of payload mounted on NO.%d gimbal connector, maxFocalLength: %d, minFocalLength: %d, focalLengthStep: %d.",
requestedPayloadMountPosition, cameraOpticalZoomSpec.maxFocalLength,
cameraOpticalZoomSpec.minFocalLength, cameraOpticalZoomSpec.focalLengthStep);
}
}
if (s_payloadPara[payloadParaIndex].hasHybridZoomFocalLength) {
djiStat = DjiPayloadCamera_GetCameraHybridZoomFocalLengthOfPayload(requestedPayloadMountPosition,
&cameraHybridZoomFocalLength);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get hybrid zoom focal length error.");
}
if (s_userPayloadCollaborationDataShow == true) {
USER_LOG_INFO(
"camera hybrid zoom focal length of payload mounted on NO.%d gimbal connector, focalLength: %d.\r\n",
requestedPayloadMountPosition, cameraHybridZoomFocalLength);
}
}
}
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,53 @@
/**
********************************************************************
* @file test_payload_collaboration.h
* @brief This is the header file for "test_payload_collaboration.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_PAYLOAD_COLLABORATION_H
#define TEST_PAYLOAD_COLLABORATION_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_PayloadCollaborationStartService(void);
T_DjiReturnCode DjiTest_PayloadCollaborationDataShowTrigger(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_PAYLOAD_COLLABORATION_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,210 @@
/**
********************************************************************
* @file test_perception.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <utils/util_misc.h>
#include <widget_interaction_test/test_widget_interaction.h>
#include "test_perception.h"
#include "dji_logger.h"
#include "dji_platform.h"
/* Private constants ---------------------------------------------------------*/
#define TEST_PERCEPTION_SAVE_IMAGE_MAX_NUM 10
/* Private types -------------------------------------------------------------*/
typedef struct {
E_DjiPerceptionDirection direction;
char *name;
} T_DjiTestPerceptionDirectionName;
/* Private values -------------------------------------------------------------*/
static uint16_t s_perceptionImageCount = 0;
static const T_DjiTestPerceptionDirectionName directionName[] = {
{.direction = DJI_PERCEPTION_RECTIFY_DOWN, .name = "down"},
{.direction = DJI_PERCEPTION_RECTIFY_FRONT, .name = "front"},
{.direction = DJI_PERCEPTION_RECTIFY_REAR, .name = "rear"},
{.direction = DJI_PERCEPTION_RECTIFY_UP, .name = "up"},
{.direction = DJI_PERCEPTION_RECTIFY_LEFT, .name = "left"},
{.direction = DJI_PERCEPTION_RECTIFY_RIGHT, .name = "right"},
};
/* Private functions declaration ---------------------------------------------*/
static void DjiTest_PerceptionImageCallback(T_DjiPerceptionImageInfo imageInfo, uint8_t *imageRawBuffer,
uint32_t bufferLen);
static int32_t DjiTest_SaveImageData(char *filePath, const uint8_t *data, uint32_t len);
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_PerceptionRunSample(E_DjiPerceptionDirection direction)
{
T_DjiReturnCode returnCode;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
T_DjiPerceptionCameraParametersPacket cameraParametersetersPacket = {0};
USER_LOG_INFO("Perception sample start");
DjiTest_WidgetLogAppend("Perception sample start");
USER_LOG_INFO("--> Step 1: Init Perception module");
DjiTest_WidgetLogAppend("--> Step 1: Init Perception module");
returnCode = DjiPerception_Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Perception init failed, error code: 0x%08X", returnCode);
goto out;
}
s_perceptionImageCount = 0;
USER_LOG_INFO("--> Step 2: Get stereo camera parameters\r\n");
DjiTest_WidgetLogAppend("--> Step 2: Get stereo camera parameters\r\n");
returnCode = DjiPerception_GetStereoCameraParameters(&cameraParametersetersPacket);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get stereo camera parameters failed, error code: 0x%08X", returnCode);
goto out;
}
if (cameraParametersetersPacket.directionNum <= IMAGE_MAX_DIRECTION_NUM)
for (int i = 0; i < cameraParametersetersPacket.directionNum; i++) {
USER_LOG_INFO(" [%-05s] leftIntrinsics = {%f, %f, %f, %f, %f, %f, %f, %f, %f }",
directionName[cameraParametersetersPacket.cameraParameters[i].direction].name,
cameraParametersetersPacket.cameraParameters[i].leftIntrinsics[0],
cameraParametersetersPacket.cameraParameters[i].leftIntrinsics[1],
cameraParametersetersPacket.cameraParameters[i].leftIntrinsics[2],
cameraParametersetersPacket.cameraParameters[i].leftIntrinsics[3],
cameraParametersetersPacket.cameraParameters[i].leftIntrinsics[4],
cameraParametersetersPacket.cameraParameters[i].leftIntrinsics[5],
cameraParametersetersPacket.cameraParameters[i].leftIntrinsics[6],
cameraParametersetersPacket.cameraParameters[i].leftIntrinsics[7],
cameraParametersetersPacket.cameraParameters[i].leftIntrinsics[8]);
USER_LOG_INFO("[%-05s] rightIntrinsics = {%f, %f, %f, %f, %f, %f, %f, %f, %f }",
directionName[cameraParametersetersPacket.cameraParameters[i].direction].name,
cameraParametersetersPacket.cameraParameters[i].rightIntrinsics[0],
cameraParametersetersPacket.cameraParameters[i].rightIntrinsics[1],
cameraParametersetersPacket.cameraParameters[i].rightIntrinsics[2],
cameraParametersetersPacket.cameraParameters[i].rightIntrinsics[3],
cameraParametersetersPacket.cameraParameters[i].rightIntrinsics[4],
cameraParametersetersPacket.cameraParameters[i].rightIntrinsics[5],
cameraParametersetersPacket.cameraParameters[i].rightIntrinsics[6],
cameraParametersetersPacket.cameraParameters[i].rightIntrinsics[7],
cameraParametersetersPacket.cameraParameters[i].rightIntrinsics[8]);
USER_LOG_INFO("[%-05s] rotationLeftInRight = {%f, %f, %f, %f, %f, %f, %f, %f, %f }",
directionName[cameraParametersetersPacket.cameraParameters[i].direction].name,
cameraParametersetersPacket.cameraParameters[i].rotationLeftInRight[0],
cameraParametersetersPacket.cameraParameters[i].rotationLeftInRight[1],
cameraParametersetersPacket.cameraParameters[i].rotationLeftInRight[2],
cameraParametersetersPacket.cameraParameters[i].rotationLeftInRight[3],
cameraParametersetersPacket.cameraParameters[i].rotationLeftInRight[4],
cameraParametersetersPacket.cameraParameters[i].rotationLeftInRight[5],
cameraParametersetersPacket.cameraParameters[i].rotationLeftInRight[6],
cameraParametersetersPacket.cameraParameters[i].rotationLeftInRight[7],
cameraParametersetersPacket.cameraParameters[i].rotationLeftInRight[8]);
USER_LOG_INFO("[%-05s] translationLeftInRight = {%f, %f, %f }\r\n",
directionName[cameraParametersetersPacket.cameraParameters[i].direction].name,
cameraParametersetersPacket.cameraParameters[i].translationLeftInRight[0],
cameraParametersetersPacket.cameraParameters[i].translationLeftInRight[1],
cameraParametersetersPacket.cameraParameters[i].translationLeftInRight[2]);
osalHandler->TaskSleepMs(100);
}
USER_LOG_INFO("--> Step 3: Subscribe perception image\r\n");
DjiTest_WidgetLogAppend("--> Step 3: Subscribe perception image\r\n");
returnCode = DjiPerception_SubscribePerceptionImage(direction, DjiTest_PerceptionImageCallback);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Subscribe perception image failed, error code: 0x%08X", returnCode);
goto out;
}
osalHandler->TaskSleepMs(5000);
USER_LOG_INFO("--> Step 4: Unsubscribe perception image");
DjiTest_WidgetLogAppend("--> Step 4: Unsubscribe perception image");
returnCode = DjiPerception_UnsubscribePerceptionImage(direction);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Unsubscribe perception image failed, error code: 0x%08X", returnCode);
goto out;
}
USER_LOG_INFO("--> Step 5: Deinit Perception module");
DjiTest_WidgetLogAppend("--> Step 5: Deinit Perception module");
returnCode = DjiPerception_Deinit();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Perception deinit failed, error code: 0x%08X", returnCode);
goto out;
}
out:
USER_LOG_INFO("Perception sample end");
return returnCode;
}
/* Private functions definition-----------------------------------------------*/
static int32_t DjiTest_SaveImageData(char *filePath, const uint8_t *data, uint32_t len)
{
FILE *fp = NULL;
size_t size;
fp = fopen(filePath, "w+");
if (fp == NULL) {
return -1;
}
size = fwrite(data, 1, len, fp);
if (size != len) {
if (fp) {
fclose(fp);
}
return -1;
}
if (fp) {
fclose(fp);
}
return 0;
}
static void DjiTest_PerceptionImageCallback(T_DjiPerceptionImageInfo imageInfo, uint8_t *imageRawBuffer,
uint32_t bufferLen)
{
char fileName[256] = {0};
snprintf(fileName, sizeof(fileName), "./image_%s_%d.raw",
directionName[imageInfo.rawInfo.direction].name,
s_perceptionImageCount);
if (s_perceptionImageCount < TEST_PERCEPTION_SAVE_IMAGE_MAX_NUM) {
DjiTest_SaveImageData(fileName, imageRawBuffer, bufferLen);
USER_LOG_INFO(
"Save perception image to path: ${binary_execute_path}/image_%s_%d.raw, direction:%s, position:%d, size:%dx%d",
directionName[imageInfo.rawInfo.direction].name,
s_perceptionImageCount,
directionName[imageInfo.rawInfo.direction].name,
imageInfo.dataType,
imageInfo.rawInfo.width,
imageInfo.rawInfo.height);
s_perceptionImageCount++;
}
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,50 @@
/**
********************************************************************
* @file test_perception.h
* @brief This is the header file for "test_perception.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_PERCEPTION_H
#define TEST_PERCEPTION_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#include "dji_perception.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_PerceptionRunSample(E_DjiPerceptionDirection direction);
#ifdef __cplusplus
}
#endif
#endif // TEST_PERCEPTION_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,161 @@
/**
********************************************************************
* @file test_positioning.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <fc_subscription/test_fc_subscription.h>
#include "test_positioning.h"
#include "dji_positioning.h"
#include "dji_logger.h"
#include "utils/util_misc.h"
#include "dji_platform.h"
#include "time_sync/test_time_sync.h"
/* Private constants ---------------------------------------------------------*/
#define POSITIONING_TASK_FREQ (1)
#define POSITIONING_TASK_STACK_SIZE (1024)
#define DJI_TEST_POSITIONING_EVENT_COUNT (2)
#define DJI_TEST_TIME_INTERVAL_AMONG_EVENTS_US (200000)
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static void *DjiTest_PositioningTask(void *arg);
/* Private variables ---------------------------------------------------------*/
static T_DjiTaskHandle s_userPositioningThread;
static int32_t s_eventIndex = 0;
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_PositioningStartService(void)
{
T_DjiReturnCode djiStat;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
djiStat = DjiPositioning_Init();
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("positioning module init error.");
return djiStat;
}
DjiPositioning_SetTaskIndex(0);
if (osalHandler->TaskCreate("user_positioning_task", DjiTest_PositioningTask,
POSITIONING_TASK_STACK_SIZE, NULL, &s_userPositioningThread) !=
DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("user positioning task create error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *DjiTest_PositioningTask(void *arg)
{
int32_t i = 0;
T_DjiReturnCode djiStat;
uint64_t ppsNewestTriggerTimeUs = 0;
T_DjiPositioningEventInfo eventInfo[DJI_TEST_POSITIONING_EVENT_COUNT] = {0};
T_DjiPositioningPositionInfo positionInfo[DJI_TEST_POSITIONING_EVENT_COUNT] = {0};
T_DjiTimeSyncAircraftTime aircraftTime = {0};
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
uint8_t totalSatelliteNumber = 0;
USER_UTIL_UNUSED(arg);
while (1) {
osalHandler->TaskSleepMs(1000 / POSITIONING_TASK_FREQ);
djiStat = DjiTest_FcSubscriptionGetTotalSatelliteNumber(&totalSatelliteNumber);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get total satellite number error: 0x%08llX.", djiStat);
continue;
}
djiStat = DjiTest_TimeSyncGetNewestPpsTriggerLocalTimeUs(&ppsNewestTriggerTimeUs);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get newest pps trigger time error: 0x%08llX.", djiStat);
continue;
}
for (i = 0; i < DJI_TEST_POSITIONING_EVENT_COUNT; ++i) {
eventInfo[i].eventSetIndex = s_eventIndex;
eventInfo[i].targetPointIndex = i;
djiStat = DjiTimeSync_TransferToAircraftTime(
ppsNewestTriggerTimeUs - 1000000 - i * DJI_TEST_TIME_INTERVAL_AMONG_EVENTS_US, &aircraftTime);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("transfer to aircraft time error: 0x%08llX.", djiStat);
continue;
}
eventInfo[i].eventTime = aircraftTime;
}
djiStat = DjiPositioning_GetPositionInformationSync(DJI_TEST_POSITIONING_EVENT_COUNT, eventInfo, positionInfo);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get position information error.");
continue;
}
USER_LOG_DEBUG("request position of target points success.");
USER_LOG_DEBUG("detail position information:");
for (i = 0; i < DJI_TEST_POSITIONING_EVENT_COUNT; ++i) {
USER_LOG_DEBUG("position solution property: %d.", positionInfo[i].positionSolutionProperty);
USER_LOG_DEBUG("pitchAttitudeAngle: %d\trollAttitudeAngle: %d\tyawAttitudeAngle: %d",
positionInfo[i].uavAttitude.pitch, positionInfo[i].uavAttitude.roll,
positionInfo[i].uavAttitude.yaw);
USER_LOG_DEBUG("northPositionOffset: %d\tearthPositionOffset: %d\tdownPositionOffset: %d",
positionInfo[i].offsetBetweenMainAntennaAndTargetPoint.x,
positionInfo[i].offsetBetweenMainAntennaAndTargetPoint.y,
positionInfo[i].offsetBetweenMainAntennaAndTargetPoint.z);
USER_LOG_DEBUG("longitude: %.8f\tlatitude: %.8f\theight: %.8f",
positionInfo[i].targetPointPosition.longitude,
positionInfo[i].targetPointPosition.latitude,
positionInfo[i].targetPointPosition.height);
USER_LOG_DEBUG(
"longStandardDeviation: %.8f\tlatStandardDeviation: %.8f\thgtStandardDeviation: %.8f",
positionInfo[i].targetPointPositionStandardDeviation.longitude,
positionInfo[i].targetPointPositionStandardDeviation.latitude,
positionInfo[i].targetPointPositionStandardDeviation.height);
}
s_eventIndex++;
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,52 @@
/**
********************************************************************
* @file test_positioning.h
* @brief This is the header file for "test_positioning.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_POSITIONING_H
#define TEST_POSITIONING_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_PositioningStartService(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_POSITIONING_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,143 @@
/**
********************************************************************
* @file test_power_management.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_power_management.h"
#include "dji_logger.h"
#include "dji_aircraft_info.h"
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static T_DjiReturnCode DjiTest_PowerOffNotificationCallback(bool *powerOffPreparationFlag);
/* Private variables ---------------------------------------------------------*/
static T_DjiTestApplyHighPowerHandler s_applyHighPowerHandler;
/* Exported functions definition ---------------------------------------------*/
/**
* @brief Register handler function for applying high power. This function have to be called before calling
* DjiTest_PowerManagementInit(), except for in Linux, because DjiTest_PowerManagementInit() do not apply high power
* in Linux OS.
* @param applyHighPowerHandler: pointer to handler function for applying high power.
* @return Execution result.
*/
T_DjiReturnCode DjiTest_RegApplyHighPowerHandler(T_DjiTestApplyHighPowerHandler *applyHighPowerHandler)
{
if (applyHighPowerHandler->pinInit == NULL) {
USER_LOG_ERROR("reg apply high power handler pinInit error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (applyHighPowerHandler->pinWrite == NULL) {
USER_LOG_ERROR("reg apply high power handler pinWrite error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
memcpy(&s_applyHighPowerHandler, applyHighPowerHandler, sizeof(T_DjiTestApplyHighPowerHandler));
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/**
* @brief Initialise power management module, including apply high power (only RTOS) and register power off notification
* callback function.
* @note DJI development board 1.0 can not accept high power, so do not call this function in DJI development board
* 1.0 project.
* @return Execution result.
*/
T_DjiReturnCode DjiTest_PowerManagementStartService(void)
{
T_DjiReturnCode returnCode;
T_DjiAircraftInfoBaseInfo baseInfo = {0};
returnCode = DjiPowerManagement_Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("power management init error: 0x%08llX.", returnCode);
return returnCode;
}
returnCode = DjiAircraftInfo_GetBaseInfo(&baseInfo);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get aircraft base info error: 0x%08llX.", returnCode);
return returnCode;
}
if (baseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M300_RTK &&
(baseInfo.djiAdapterType == DJI_SDK_ADAPTER_TYPE_SKYPORT_V2 ||
baseInfo.djiAdapterType == DJI_SDK_ADAPTER_TYPE_XPORT)) {
// apply high power
if (s_applyHighPowerHandler.pinInit == NULL) {
USER_LOG_ERROR("apply high power pin init interface is NULL error");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (s_applyHighPowerHandler.pinWrite == NULL) {
USER_LOG_ERROR("apply high power pin write interface is NULL error");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
returnCode = s_applyHighPowerHandler.pinInit();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("apply high power pin init error");
return returnCode;
}
returnCode = DjiPowerManagement_RegWriteHighPowerApplyPinCallback(s_applyHighPowerHandler.pinWrite);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("register WriteHighPowerApplyPinCallback error.");
return returnCode;
}
returnCode = DjiPowerManagement_ApplyHighPowerSync();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("apply high power error");
return returnCode;
}
}
// register power off notification callback function
returnCode = DjiPowerManagement_RegPowerOffNotificationCallback(DjiTest_PowerOffNotificationCallback);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("register power off notification callback function error");
return returnCode;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
static T_DjiReturnCode DjiTest_PowerOffNotificationCallback(bool *powerOffPreparationFlag)
{
USER_LOG_INFO("aircraft will power off soon.");
*powerOffPreparationFlag = true;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,57 @@
/**
********************************************************************
* @file test_power_management.h
* @brief This is the header file for "test_power_management.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_POWER_MANAGEMENT_H
#define TEST_POWER_MANAGEMENT_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#include "dji_power_management.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
T_DjiReturnCode (*pinInit)(void);
T_DjiReturnCode (*pinWrite)(E_DjiPowerManagementPinState pinState);
} T_DjiTestApplyHighPowerHandler;
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_PowerManagementStartService(void);
T_DjiReturnCode DjiTest_RegApplyHighPowerHandler(T_DjiTestApplyHighPowerHandler *applyHighPowerHandler);
#ifdef __cplusplus
}
#endif
#endif // TEST_POWER_MANAGEMENT_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,173 @@
/**
********************************************************************
* @file test_time_sync.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <fc_subscription/test_fc_subscription.h>
#include "test_time_sync.h"
#include "dji_time_sync.h"
#include "dji_logger.h"
#include "utils/util_misc.h"
#include "dji_platform.h"
/* Private constants ---------------------------------------------------------*/
#define DJI_TEST_TIME_SYNC_TASK_FREQ (1)
#define DJI_TEST_TIME_SYNC_TASK_STACK_SIZE (1024)
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static void *DjiTest_TimeSyncTask(void *arg);
/* Private variables ---------------------------------------------------------*/
static T_DjiTestTimeSyncHandler s_timeSyncHandler;
static T_DjiTaskHandle s_timeSyncThread;
/* Exported functions definition ---------------------------------------------*/
/**
* @brief Register handler function for initialising PPS pin configure and reporting the latest local time when PPS is
* triggered. This function have to be called before calling DjiTest_TimeSyncInit().
* @param timeSyncHandler: pointer to handler function for time synchronization.
* @return Execution result.
*/
T_DjiReturnCode DjiTest_TimeSyncRegHandler(T_DjiTestTimeSyncHandler *timeSyncHandler)
{
if (timeSyncHandler->PpsSignalResponseInit == NULL) {
USER_LOG_ERROR("reg time sync handler PpsSignalResponseInit error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (timeSyncHandler->GetNewestPpsTriggerLocalTimeUs == NULL) {
USER_LOG_ERROR("reg time sync handler GetNewestPpsTriggerLocalTimeUs error");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
memcpy(&s_timeSyncHandler, timeSyncHandler, sizeof(T_DjiTestTimeSyncHandler));
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiTest_TimeSyncStartService(void)
{
T_DjiReturnCode djiStat;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
djiStat = DjiTimeSync_Init();
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("time synchronization module init error.");
return djiStat;
}
if (s_timeSyncHandler.PpsSignalResponseInit == NULL) {
USER_LOG_ERROR("time sync handler PpsSignalResponseInit interface is NULL error");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (s_timeSyncHandler.GetNewestPpsTriggerLocalTimeUs == NULL) {
USER_LOG_ERROR("time sync handler GetNewestPpsTriggerLocalTimeUs interface is NULL error");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
// users must register getNewestPpsTriggerTime callback function
djiStat = DjiTimeSync_RegGetNewestPpsTriggerTimeCallback(s_timeSyncHandler.GetNewestPpsTriggerLocalTimeUs);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("register GetNewestPpsTriggerLocalTimeUsCallback error.");
return djiStat;
}
if (osalHandler->TaskCreate("user_time_sync_task", DjiTest_TimeSyncTask,
DJI_TEST_TIME_SYNC_TASK_STACK_SIZE, NULL, &s_timeSyncThread) !=
DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("user time sync task create error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
djiStat = s_timeSyncHandler.PpsSignalResponseInit();
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("pps signal response init error");
return djiStat;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiTest_TimeSyncGetNewestPpsTriggerLocalTimeUs(uint64_t *localTimeUs)
{
if (s_timeSyncHandler.GetNewestPpsTriggerLocalTimeUs == NULL) {
USER_LOG_ERROR("GetNewestPpsTriggerLocalTimeUs null error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return s_timeSyncHandler.GetNewestPpsTriggerLocalTimeUs(localTimeUs);
}
/* Private functions definition-----------------------------------------------*/
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *DjiTest_TimeSyncTask(void *arg)
{
T_DjiReturnCode djiStat;
uint32_t currentTimeMs = 0;
T_DjiTimeSyncAircraftTime aircraftTime = {0};
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
uint8_t totalSatelliteNumber = 0;
USER_UTIL_UNUSED(arg);
while (1) {
osalHandler->TaskSleepMs(1000 / DJI_TEST_TIME_SYNC_TASK_FREQ);
djiStat = DjiTest_FcSubscriptionGetTotalSatelliteNumber(&totalSatelliteNumber);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get total satellite number error: 0x%08llX.", djiStat);
continue;
}
djiStat = osalHandler->GetTimeMs(&currentTimeMs);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get current time error: 0x%08llX.", djiStat);
continue;
}
djiStat = DjiTimeSync_TransferToAircraftTime(currentTimeMs * 1000, &aircraftTime);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("transfer to aircraft time error: 0x%08llX.", djiStat);
continue;
}
USER_LOG_DEBUG("current aircraft time is %04d-%02d-%02d %02d:%02d:%02d %d.",
aircraftTime.year, aircraftTime.month, aircraftTime.day,
aircraftTime.hour, aircraftTime.minute, aircraftTime.second, aircraftTime.microsecond);
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,57 @@
/**
********************************************************************
* @file test_time_sync.h
* @brief This is the header file for "test_time_sync.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_TIME_SYNC_H
#define TEST_TIME_SYNC_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
T_DjiReturnCode (*PpsSignalResponseInit)(void);
T_DjiReturnCode (*GetNewestPpsTriggerLocalTimeUs)(uint64_t *localTimeUs);
} T_DjiTestTimeSyncHandler;
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_TimeSyncStartService(void);
T_DjiReturnCode DjiTest_TimeSyncGetNewestPpsTriggerLocalTimeUs(uint64_t *localTimeUs);
T_DjiReturnCode DjiTest_TimeSyncRegHandler(T_DjiTestTimeSyncHandler *timeSyncHandler);
#ifdef __cplusplus
}
#endif
#endif // TEST_TIME_SYNC_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,342 @@
/**
********************************************************************
* @file test_upgrade.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <dji_logger.h>
#include <dji_platform.h>
#include <utils/util_misc.h>
#include "test_upgrade_common_file_transfer.h"
#include "test_upgrade_platform_opt.h"
#include "test_upgrade.h"
/* Private constants ---------------------------------------------------------*/
#define UPGRADE_TASK_STACK_SIZE (2048)
#define DJI_TEST_UPGRADE_TASK_FREQ (50)
#define DJI_TEST_ENTER_UPGRADE_WAIT_TIME (10) //wait 10s for enter upgrade process
#define DJI_TEST_UPGRADE_REBOOT_TIMEOUT (30) //reboot timeout 30s
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
static T_DjiUpgradeState s_upgradeState = {0};
static T_DjiMutexHandle s_upgradeStateMutex = {0};
static T_DjiTaskHandle s_upgradeProcessThread;
static T_DjiTaskHandle s_enterUpgradeModeProcessThread;
static bool s_isNeedEnterUpgradeModeProcess = false;
static bool s_isNeedReplaceProgramBeforeReboot = false;
/* Private functions declaration ---------------------------------------------*/
static T_DjiReturnCode DjiTest_EnterUpgradeMode(uint16_t *waitTime);
static T_DjiReturnCode DjiTest_CheckFirmware(void);
static T_DjiReturnCode DjiTest_StartUpgrade(void);
static T_DjiReturnCode DjiTest_FinishUpgrade(void);
static void *DjiTest_UpgradeProcessTask(void *arg);
static void *DjiTest_EnterUpgradeModeProcessTask(void *arg);
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode
DjiTest_UpgradeStartService(const T_DjiTestUpgradePlatformOpt *upgradePlatformOpt,
T_DjiTestUpgradeConfig testUpgradeConfig)
{
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
T_DjiReturnCode returnCode;
bool isUpgradeReboot = false;
T_DjiUpgradeEndInfo upgradeEndInfo = {0};
T_DjiUpgradeConfig upgradeConfig = {
.currentFirmwareVersion = testUpgradeConfig.firmwareVersion,
.firmwareTransferInfo = {
.transferType = testUpgradeConfig.transferType,
.ftpTransferInfo.port = 21,
.dcftpFileTransferOpt = {
.start = DjiTestCommonFileTransfer_Start,
.transfer = DjiTestCommonFileTransfer_Transfer,
.finish = DjiTestCommonFileTransfer_Finish,
}
}
};
s_isNeedReplaceProgramBeforeReboot = testUpgradeConfig.needReplaceProgramBeforeReboot;
T_DjiUpgradeHandler s_upgradeHandler = {
.EnterUpgradeMode = DjiTest_EnterUpgradeMode,
.CheckFirmware = DjiTest_CheckFirmware,
.StartUpgrade = DjiTest_StartUpgrade,
.FinishUpgrade = DjiTest_FinishUpgrade
};
returnCode = DjiTest_RegUpgradePlatformOpt(upgradePlatformOpt);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Reg upgrade platform opt error, return code = 0x%08llX", returnCode);
return returnCode;
}
returnCode = osalHandler->MutexCreate(&s_upgradeStateMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Create mutex error");
return returnCode;
}
returnCode = DjiTest_GetUpgradeRebootState(&isUpgradeReboot, &upgradeEndInfo);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get upgrade reboot state error");
isUpgradeReboot = false;
}
returnCode = DjiTest_CleanUpgradeRebootState();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Clean upgrade reboot state error");
}
osalHandler->MutexLock(s_upgradeStateMutex);
if (isUpgradeReboot == true) {
s_upgradeState.upgradeStage = DJI_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo = upgradeEndInfo;
} else {
s_upgradeState.upgradeStage = DJI_UPGRADE_STAGE_IDLE;
}
osalHandler->MutexUnlock(s_upgradeStateMutex);
returnCode = DjiUpgrade_Init(&upgradeConfig);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("DjiUpgrade_Init error, return code = %d", returnCode);
return returnCode;
}
returnCode = DjiUpgrade_RegHandler(&s_upgradeHandler);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("DjiUpgrade_RegHandler error, return code = %d", returnCode);
return returnCode;
}
returnCode = DjiUpgrade_EnableLocalUpgrade();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("DjiUpgrade_EnableLocalUpgrade error, return code = %d", returnCode);
return returnCode;
}
if (osalHandler->TaskCreate("upgrade_task", DjiTest_UpgradeProcessTask, UPGRADE_TASK_STACK_SIZE, NULL,
&s_upgradeProcessThread) != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Dji upgrade test task create error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (osalHandler->TaskCreate("enter_upgrade_mode_task", DjiTest_EnterUpgradeModeProcessTask, UPGRADE_TASK_STACK_SIZE,
NULL, &s_enterUpgradeModeProcessThread) !=
DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Dji upgrade test task create error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
static T_DjiReturnCode DjiTest_EnterUpgradeMode(uint16_t *waitTime)
{
// need 10s for upgrade preprocess work.
*waitTime = DJI_TEST_ENTER_UPGRADE_WAIT_TIME;
// enable is need enter upgrade mode process, the process is in DjiTest_EnterUpgradeModeProcessTask
s_isNeedEnterUpgradeModeProcess = true;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode DjiTest_CheckFirmware(void)
{
// you can do decrypt and check firmware in this stage
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode DjiTest_StartUpgrade(void)
{
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
osalHandler->MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeOngoingInfo.upgradeProgress = 0;
s_upgradeState.upgradeStage = DJI_UPGRADE_STAGE_ONGOING;
osalHandler->MutexUnlock(s_upgradeStateMutex);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode DjiTest_FinishUpgrade(void)
{
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
osalHandler->MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = DJI_UPGRADE_STAGE_IDLE;
osalHandler->MutexUnlock(s_upgradeStateMutex);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *DjiTest_EnterUpgradeModeProcessTask(void *arg)
{
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
T_DjiReturnCode returnCode;
USER_UTIL_UNUSED(arg);
while (1) {
if (s_isNeedEnterUpgradeModeProcess) {
// prepare enter upgrade mode
// you can do some thing before enter upgrade mode.
// clear upgrade program file store area
returnCode = DjiTest_CleanUpgradeProgramFileStoreArea();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Clean upgrade file dir error, please check dir permission");
}
s_isNeedEnterUpgradeModeProcess = false;
USER_LOG_INFO("Clean upgrade store area");
}
osalHandler->TaskSleepMs(1000 / DJI_TEST_UPGRADE_TASK_FREQ);
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *DjiTest_UpgradeProcessTask(void *arg)
{
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
T_DjiUpgradeState tempUpgradeState;
T_DjiUpgradeEndInfo upgradeEndInfo;
T_DjiReturnCode returnCode;
USER_UTIL_UNUSED(arg);
while (1) {
osalHandler->MutexLock(s_upgradeStateMutex);
tempUpgradeState = s_upgradeState;
osalHandler->MutexUnlock(s_upgradeStateMutex);
if (tempUpgradeState.upgradeStage == DJI_UPGRADE_STAGE_ONGOING) {
if (s_isNeedReplaceProgramBeforeReboot) {
// Step 1 : Replace old program
returnCode = DjiTest_ReplaceOldProgram();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Replace firmware error, return code = 0x%08llX", returnCode);
osalHandler->MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = DJI_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo.upgradeEndState = DJI_UPGRADE_END_STATE_UNKNOWN_ERROR;
osalHandler->MutexUnlock(s_upgradeStateMutex);
continue;
}
osalHandler->TaskSleepMs(1000);
osalHandler->MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = DJI_UPGRADE_STAGE_ONGOING;
s_upgradeState.upgradeOngoingInfo.upgradeProgress = 20;
DjiUpgrade_PushUpgradeState(&s_upgradeState);
osalHandler->MutexUnlock(s_upgradeStateMutex);
// Step 2 : Clean upgrade program file store area
returnCode = DjiTest_CleanUpgradeProgramFileStoreArea();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Clean upgrade file dir error, please check dir permission");
osalHandler->MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = DJI_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo.upgradeEndState = DJI_UPGRADE_END_STATE_UNKNOWN_ERROR;
osalHandler->MutexUnlock(s_upgradeStateMutex);
continue;
}
osalHandler->TaskSleepMs(1000);
osalHandler->MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = DJI_UPGRADE_STAGE_ONGOING;
s_upgradeState.upgradeOngoingInfo.upgradeProgress = 30;
DjiUpgrade_PushUpgradeState(&s_upgradeState);
osalHandler->MutexUnlock(s_upgradeStateMutex);
}
//attention emulation upgrade progress, user don't need this process
do {
osalHandler->TaskSleepMs(1000);
osalHandler->MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = DJI_UPGRADE_STAGE_ONGOING;
s_upgradeState.upgradeOngoingInfo.upgradeProgress += 10;
tempUpgradeState = s_upgradeState;
DjiUpgrade_PushUpgradeState(&s_upgradeState);
osalHandler->MutexUnlock(s_upgradeStateMutex);
} while (tempUpgradeState.upgradeOngoingInfo.upgradeProgress < 100);
// Step 3 : Reboot device
osalHandler->MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = DJI_UPGRADE_STAGE_DEVICE_REBOOT;
s_upgradeState.upgradeRebootInfo.rebootTimeout = DJI_TEST_UPGRADE_REBOOT_TIMEOUT;
DjiUpgrade_PushUpgradeState(&s_upgradeState);
osalHandler->MutexUnlock(s_upgradeStateMutex);
osalHandler->TaskSleepMs(1000); // sleep 1000ms to ensure push send terminal.
upgradeEndInfo.upgradeEndState = DJI_UPGRADE_END_STATE_SUCCESS;
returnCode = DjiTest_SetUpgradeRebootState(&upgradeEndInfo);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Set Upgrade reboot state error");
osalHandler->MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = DJI_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo.upgradeEndState = DJI_UPGRADE_END_STATE_UNKNOWN_ERROR;
osalHandler->MutexUnlock(s_upgradeStateMutex);
continue;
}
returnCode = DjiTest_RebootSystem();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Reboot system error");
osalHandler->MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = DJI_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo.upgradeEndState = DJI_UPGRADE_END_STATE_UNKNOWN_ERROR;
osalHandler->MutexUnlock(s_upgradeStateMutex);
continue;
}
while (1) {
osalHandler->TaskSleepMs(500);
}
} else if (s_upgradeState.upgradeStage == DJI_UPGRADE_STAGE_END) {
osalHandler->MutexLock(s_upgradeStateMutex);
DjiUpgrade_PushUpgradeState(&s_upgradeState);
osalHandler->MutexUnlock(s_upgradeStateMutex);
}
osalHandler->TaskSleepMs(500);
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,58 @@
/**
********************************************************************
* @file test_upgrade.h
* @brief This is the header file for "test_upgrade.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_UPGRADE_H
#define TEST_UPGRADE_H
/* Includes ------------------------------------------------------------------*/
#include <dji_upgrade.h>
#include "test_upgrade_platform_opt.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
T_DjiFirmwareVersion firmwareVersion;
E_DjiFirmwareTransferType transferType;
//For linux: need replace program before reboot system
//For mcu: don't need replace program before reboot system, replace program in loader
bool needReplaceProgramBeforeReboot;
} T_DjiTestUpgradeConfig;
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_UpgradeStartService(const T_DjiTestUpgradePlatformOpt *upgradePlatformOpt,
T_DjiTestUpgradeConfig testUpgradeConfig);
#ifdef __cplusplus
}
#endif
#endif
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,149 @@
/**
********************************************************************
* @file test_upgrade_common_file_transfer.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_upgrade_common_file_transfer.h"
#include "dji_logger.h"
#include <utils/util_md5.h>
#include "test_upgrade_platform_opt.h"
/* Private constants ---------------------------------------------------------*/
#define DJI_TEST_FILE_MD5_BUFFER_SIZE 256
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
static T_DjiUpgradeFileInfo s_upgradeFileInfo = {0};
static uint32_t s_alreadyTransferFileSize = 0;
/* Private functions declaration ---------------------------------------------*/
static T_DjiReturnCode DjiTestFile_GetUpgradeFileMd5(uint8_t md5[DJI_MD5_BUFFER_LEN]);
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTestCommonFileTransfer_Start(const T_DjiUpgradeFileInfo *fileInfo)
{
T_DjiReturnCode returnCode;
s_upgradeFileInfo.fileSize = 0;
memset(s_upgradeFileInfo.fileName, 0, sizeof(s_upgradeFileInfo.fileName));
s_alreadyTransferFileSize = 0;
returnCode = DjiTest_CreateUpgradeProgramFile(fileInfo);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Create upgrade program file error");
return returnCode;
}
s_upgradeFileInfo = *fileInfo;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiTestCommonFileTransfer_Transfer(const uint8_t *data, uint16_t dataLen)
{
T_DjiReturnCode returnCode;
if (s_alreadyTransferFileSize >= s_upgradeFileInfo.fileSize) {
USER_LOG_ERROR("Already transfer file size is more than file real size");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
returnCode = DjiTest_WriteUpgradeProgramFile(s_alreadyTransferFileSize, data, dataLen);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Write upgrade program file error, return code = 0x%08llX", returnCode);
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
s_alreadyTransferFileSize += dataLen;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiTestCommonFileTransfer_Finish(const uint8_t md5[DJI_MD5_BUFFER_LEN])
{
uint8_t localFileMd5[DJI_MD5_BUFFER_LEN] = {0};
T_DjiReturnCode returnCode;
if (s_alreadyTransferFileSize != s_upgradeFileInfo.fileSize) {
USER_LOG_ERROR("Transfer finish error, transfer file size is not equal");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
returnCode = DjiTestFile_GetUpgradeFileMd5(localFileMd5);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get file md5 error, return code = 0x%08llX", returnCode);
goto out;
}
if (memcmp(md5, localFileMd5, DJI_MD5_BUFFER_LEN) == 0) {
returnCode = DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
} else {
returnCode = DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
out:
DjiTest_CloseUpgradeProgramFile();
s_upgradeFileInfo.fileSize = 0;
memset(s_upgradeFileInfo.fileName, 0, sizeof(s_upgradeFileInfo.fileName));
s_alreadyTransferFileSize = 0;
return returnCode;
}
/* Private functions definition-----------------------------------------------*/
static T_DjiReturnCode DjiTestFile_GetUpgradeFileMd5(uint8_t md5[DJI_MD5_BUFFER_LEN])
{
uint8_t fileBuffer[DJI_TEST_FILE_MD5_BUFFER_SIZE] = {0};
T_DjiReturnCode returnCode;
uint32_t offset;
MD5_CTX fileMd5Ctx;
uint16_t realLen = 0;
offset = 0;
UtilMd5_Init(&fileMd5Ctx);
while (s_upgradeFileInfo.fileSize - offset > DJI_TEST_FILE_MD5_BUFFER_SIZE) {
returnCode = DjiTest_ReadUpgradeProgramFile(offset, DJI_TEST_FILE_MD5_BUFFER_SIZE,
fileBuffer, &realLen);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS || realLen != DJI_TEST_FILE_MD5_BUFFER_SIZE) {
USER_LOG_ERROR("Get file data error, return code = 0x%08llX", returnCode);
return returnCode;
}
UtilMd5_Update(&fileMd5Ctx, fileBuffer, DJI_TEST_FILE_MD5_BUFFER_SIZE);
offset += DJI_TEST_FILE_MD5_BUFFER_SIZE;
}
returnCode = DjiTest_ReadUpgradeProgramFile(offset, s_upgradeFileInfo.fileSize - offset, fileBuffer, &realLen);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS || realLen != s_upgradeFileInfo.fileSize - offset) {
USER_LOG_ERROR("Get file data error, return code = 0x%08llX", returnCode);
return returnCode;
}
UtilMd5_Update(&fileMd5Ctx, fileBuffer, s_upgradeFileInfo.fileSize - offset);
UtilMd5_Final(&fileMd5Ctx, md5);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,51 @@
/**
********************************************************************
* @file test_upgrade_common_file_transfer.h
* @brief This is the header file for "test_upgrade_common_file_transfer.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_UPGRADE_COMMON_FILE_TRANSFER_H
#define TEST_UPGRADE_COMMON_FILE_TRANSFER_H
/* Includes ------------------------------------------------------------------*/
#include <dji_upgrade.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTestCommonFileTransfer_Start(const T_DjiUpgradeFileInfo *fileInfo);
T_DjiReturnCode DjiTestCommonFileTransfer_Transfer(const uint8_t *data, uint16_t dataLen);
T_DjiReturnCode DjiTestCommonFileTransfer_Finish(const uint8_t md5[DJI_MD5_BUFFER_LEN]);
#ifdef __cplusplus
}
#endif
#endif // TEST_UPGRADE_COMMON_FILE_TRANSFER_LINUX_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,139 @@
/**
********************************************************************
* @file test_upgrade_platform_opt.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_upgrade_platform_opt.h"
#include <dji_logger.h>
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
static T_DjiTestUpgradePlatformOpt s_upgradePlatformOpt = {0};
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_RegUpgradePlatformOpt(const T_DjiTestUpgradePlatformOpt *upgradePlatformOpt)
{
if (upgradePlatformOpt->rebootSystem == NULL) {
USER_LOG_ERROR("rebootSystem callback can't be NULL");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->cleanUpgradeProgramFileStoreArea == NULL) {
USER_LOG_ERROR("cleanUpgradeProgramFileStoreArea callback can't be NULL");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->createUpgradeProgramFile == NULL) {
USER_LOG_ERROR("createUpgradeProgramFile callback can't be NULL");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->readUpgradeProgramFile == NULL) {
USER_LOG_ERROR("readUpgradeProgramFile callback can't be NULL");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->writeUpgradeProgramFile == NULL) {
USER_LOG_ERROR("writeUpgradeProgramFile callback can't be NULL");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->closeUpgradeProgramFile == NULL) {
USER_LOG_ERROR("closeUpgradeProgramFile callback can't be NULL");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->replaceOldProgram == NULL) {
USER_LOG_ERROR("replaceOldProgram callback can't be NULL");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->setUpgradeRebootState == NULL) {
USER_LOG_ERROR("setUpgradeRebootState callback can't be NULL");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->getUpgradeRebootState == NULL) {
USER_LOG_ERROR("getUpgradeRebootState callback can't be NULL");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->cleanUpgradeRebootState == NULL) {
USER_LOG_ERROR("cleanUpgradeRebootState callback can't be NULL");
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
s_upgradePlatformOpt = *upgradePlatformOpt;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiTest_RebootSystem(void)
{
return s_upgradePlatformOpt.rebootSystem();
}
T_DjiReturnCode DjiTest_CleanUpgradeProgramFileStoreArea(void)
{
return s_upgradePlatformOpt.cleanUpgradeProgramFileStoreArea();
}
T_DjiReturnCode DjiTest_CreateUpgradeProgramFile(const T_DjiUpgradeFileInfo *fileInfo)
{
return s_upgradePlatformOpt.createUpgradeProgramFile(fileInfo);
}
T_DjiReturnCode DjiTest_WriteUpgradeProgramFile(uint32_t offset, const uint8_t *data, uint16_t dataLen)
{
return s_upgradePlatformOpt.writeUpgradeProgramFile(offset, data, dataLen);
}
T_DjiReturnCode DjiTest_ReadUpgradeProgramFile(uint32_t offset, uint16_t readDataLen, uint8_t *data,
uint16_t *realLen)
{
return s_upgradePlatformOpt.readUpgradeProgramFile(offset, readDataLen, data, realLen);
}
T_DjiReturnCode DjiTest_CloseUpgradeProgramFile(void)
{
return s_upgradePlatformOpt.closeUpgradeProgramFile();
}
T_DjiReturnCode DjiTest_ReplaceOldProgram(void)
{
return s_upgradePlatformOpt.replaceOldProgram();
}
T_DjiReturnCode DjiTest_SetUpgradeRebootState(const T_DjiUpgradeEndInfo *upgradeEndInfo)
{
return s_upgradePlatformOpt.setUpgradeRebootState(upgradeEndInfo);
}
T_DjiReturnCode DjiTest_GetUpgradeRebootState(bool *isUpgradeReboot, T_DjiUpgradeEndInfo *upgradeEndInfo)
{
return s_upgradePlatformOpt.getUpgradeRebootState(isUpgradeReboot, upgradeEndInfo);
}
T_DjiReturnCode DjiTest_CleanUpgradeRebootState(void)
{
return s_upgradePlatformOpt.cleanUpgradeRebootState();
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,84 @@
/**
********************************************************************
* @file test_upgrade_platform_opt.h
* @brief This is the header file for "test_upgrade_platform_opt.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_UPGRADE_PLATFORM_OPT_H
#define TEST_UPGRADE_PLATFORM_OPT_H
#include <dji_typedef.h>
#include <dji_upgrade.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
T_DjiReturnCode (*rebootSystem)(void);
T_DjiReturnCode (*cleanUpgradeProgramFileStoreArea)(void);
T_DjiReturnCode (*createUpgradeProgramFile)(const T_DjiUpgradeFileInfo *fileInfo);
T_DjiReturnCode (*writeUpgradeProgramFile)(uint32_t offset, const uint8_t *data, uint16_t dataLen);
T_DjiReturnCode (*readUpgradeProgramFile)(uint32_t offset, uint16_t readDataLen, uint8_t *data,
uint16_t *realLen);
T_DjiReturnCode (*closeUpgradeProgramFile)(void);
T_DjiReturnCode (*replaceOldProgram)(void);
T_DjiReturnCode (*setUpgradeRebootState)(const T_DjiUpgradeEndInfo *upgradeEndInfo);
T_DjiReturnCode (*getUpgradeRebootState)(bool *isUpgradeReboot, T_DjiUpgradeEndInfo *upgradeEndInfo);
T_DjiReturnCode (*cleanUpgradeRebootState)(void);
} T_DjiTestUpgradePlatformOpt;
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_RegUpgradePlatformOpt(const T_DjiTestUpgradePlatformOpt *upgradePlatformOpt);
T_DjiReturnCode DjiTest_RebootSystem(void);
T_DjiReturnCode DjiTest_CleanUpgradeProgramFileStoreArea(void);
T_DjiReturnCode DjiTest_CreateUpgradeProgramFile(const T_DjiUpgradeFileInfo *fileInfo);
T_DjiReturnCode DjiTest_WriteUpgradeProgramFile(uint32_t offset, const uint8_t *data, uint16_t dataLen);
T_DjiReturnCode DjiTest_ReadUpgradeProgramFile(uint32_t offset, uint16_t readDataLen, uint8_t *data,
uint16_t *realLen);
T_DjiReturnCode DjiTest_CloseUpgradeProgramFile(void);
T_DjiReturnCode DjiTest_ReplaceOldProgram(void);
T_DjiReturnCode DjiTest_SetUpgradeRebootState(const T_DjiUpgradeEndInfo *upgradeEndInfo);
T_DjiReturnCode DjiTest_GetUpgradeRebootState(bool *isUpgradeReboot, T_DjiUpgradeEndInfo *upgradeEndInfo);
T_DjiReturnCode DjiTest_CleanUpgradeRebootState(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_UPGRADE_PLATFORM_OPT_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,127 @@
/**
******************************************************************************
* @file util_buffer.c
* @brief The file defines buffer related functions, including initialize, put data to buffer,
* get data from buffer and get unused count of bytes of buffer.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "util_buffer.h"
#include <string.h>
#include "util_misc.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Exported variables --------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/**
* @brief Cut buffer size to power of 2, in order to increase the convenience of get and put operating of buffer.
* @param bufSize Original buffer size.
* @return Buffer size after handling.
*/
static uint16_t UtilBuffer_CutBufSizeToPowOfTwo(uint16_t bufSize)
{
uint16_t i = 0;
while ((1 << (++i)) <= bufSize);
return (uint16_t) (1 << (--i));
}
/* Exported functions --------------------------------------------------------*/
/**
* @brief Buffer initialization.
* @param pthis Pointer to buffer structure.
* @param pBuf Pointer to data buffer.
* @param bufSize Size of data buffer.
* @return None.
*/
void UtilBuffer_Init(T_UtilBuffer *pthis, uint8_t *pBuf, uint16_t bufSize)
{
pthis->readIndex = 0;
pthis->writeIndex = 0;
pthis->bufferPtr = pBuf;
pthis->bufferSize = UtilBuffer_CutBufSizeToPowOfTwo(bufSize);
}
/**
* @brief Put a block of data into buffer.
* @param pthis Pointer to buffer structure.
* @param pData Pointer to data to be stored.
* @param dataLen Length of data to be stored.
* @return Length of data to be stored.
*/
uint16_t UtilBuffer_Put(T_UtilBuffer *pthis, const uint8_t *pData, uint16_t dataLen)
{
uint16_t writeUpLen;
dataLen = USER_UTIL_MIN(dataLen, (uint16_t) (pthis->bufferSize - pthis->writeIndex + pthis->readIndex));
//fill up data
writeUpLen = USER_UTIL_MIN(dataLen, (uint16_t) (pthis->bufferSize - (pthis->writeIndex & (pthis->bufferSize - 1))));
memcpy(pthis->bufferPtr + (pthis->writeIndex & (pthis->bufferSize - 1)), pData, writeUpLen);
//fill begin data
memcpy(pthis->bufferPtr, pData + writeUpLen, dataLen - writeUpLen);
pthis->writeIndex += dataLen;
return dataLen;
}
/**
* @brief Get a block of data from buffer.
* @param pthis Pointer to buffer structure.
* @param pData Pointer to data to be read.
* @param dataLen Length of data to be read.
* @return Length of data to be read.
*/
uint16_t UtilBuffer_Get(T_UtilBuffer *pthis, uint8_t *pData, uint16_t dataLen)
{
uint16_t readUpLen;
dataLen = USER_UTIL_MIN(dataLen, (uint16_t) (pthis->writeIndex - pthis->readIndex));
//get up data
readUpLen = USER_UTIL_MIN(dataLen, (uint16_t) (pthis->bufferSize - (pthis->readIndex & (pthis->bufferSize - 1))));
memcpy(pData, pthis->bufferPtr + (pthis->readIndex & (pthis->bufferSize - 1)), readUpLen);
//get begin data
memcpy(pData + readUpLen, pthis->bufferPtr, dataLen - readUpLen);
pthis->readIndex += dataLen;
return dataLen;
}
/**
* @brief Get unused size of buffer.
* @param pthis Pointer to buffer structure.
* @return Unused size of buffer.
*/
uint16_t UtilBuffer_GetUnusedSize(T_UtilBuffer *pthis)
{
return (uint16_t) (pthis->bufferSize - pthis->writeIndex + pthis->readIndex);
}

View File

@ -0,0 +1,59 @@
/**
******************************************************************************
* @file util_buffer.h
* @brief This is the header file for "util_buffer.c".
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef _DJI_UTIL_BUFFER_H_
#define _DJI_UTIL_BUFFER_H_
/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
/* Exported constants --------------------------------------------------------*/
/* Exported macros -----------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
//Note: not need lock for just one producer / one consumer
//need mutex to protect for multi-producer / multi-consumer
typedef struct {
uint8_t *bufferPtr;
uint16_t bufferSize;
uint16_t readIndex;
uint16_t writeIndex;
} T_UtilBuffer;
/* Exported variables --------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
void UtilBuffer_Init(T_UtilBuffer *pthis, uint8_t *pBuf, uint16_t bufSize);
uint16_t UtilBuffer_Put(T_UtilBuffer *pthis, const uint8_t *pData, uint16_t dataLen);
uint16_t UtilBuffer_Get(T_UtilBuffer *pthis, uint8_t *pData, uint16_t dataLen);
uint16_t UtilBuffer_GetUnusedSize(T_UtilBuffer *pthis);
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
#endif

View File

@ -0,0 +1,207 @@
/**
********************************************************************
* @file util_file.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#ifdef SYSTEM_ARCH_LINUX
#include "util_file.h"
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Private values ------------------------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode UtilFile_GetCreateTime(const char *filePath, T_UtilFileCreateTime *createTime)
{
struct stat st;
struct tm *fileTm;
if (filePath == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (stat(filePath, &st) != 0) {
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
fileTm = localtime(&(st.st_ctime));
if (fileTm == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
createTime->year = fileTm->tm_year + 1900 - 1980;
createTime->month = fileTm->tm_mon;
createTime->day = fileTm->tm_mday;
createTime->hour = fileTm->tm_hour;
createTime->minute = fileTm->tm_min;
createTime->second = fileTm->tm_sec;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode UtilFile_GetFileSizeByPath(const char *filePath, uint32_t *fileSize)
{
struct stat st;
if (filePath == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (stat(filePath, &st) != 0) {
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
*fileSize = st.st_size;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode UtilFile_GetFileDataByPath(const char *filePath, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
FILE *pF;
T_DjiReturnCode psdkStat;
uint32_t readRtn;
if (filePath == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
pF = fopen(filePath, "rb+");
if (pF == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (fseek(pF, offset, SEEK_SET) != 0) {
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto out;
}
readRtn = fread(data, 1, len, pF);
if (readRtn == 0 || readRtn > len) {
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto out;
}
*realLen = readRtn;
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
out:
fclose(pF);
return psdkStat;
}
T_DjiReturnCode UtilFile_Delete(const char *filePath)
{
int ret;
if (filePath == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
ret = unlink(filePath);
if (ret != 0) {
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
} else {
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
}
T_DjiReturnCode UtilFile_GetFileSize(FILE *file, uint32_t *fileSize)
{
int result;
if (file == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
long int curSeek = ftell(file);
result = fseek(file, 0L, SEEK_END);
if (result != 0) {
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
*fileSize = ftell(file);
if (curSeek < 0) {
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
result = fseek(file, curSeek, SEEK_SET);
if (result != 0) {
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode UtilFile_GetFileData(FILE *file, uint32_t offset, uint16_t len, uint8_t *data, uint16_t *realLen)
{
T_DjiReturnCode psdkStat;
uint32_t readRtn;
if (file == NULL) {
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
goto out;
}
if (fseek(file, offset, SEEK_SET) != 0) {
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto out;
}
readRtn = fread(data, 1, len, file);
if (readRtn == 0 || readRtn > len) {
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto out;
}
*realLen = readRtn;
psdkStat = DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
out:
return psdkStat;
}
/* Private functions definition-----------------------------------------------*/
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,70 @@
/**
********************************************************************
* @file util_file.h
* @brief This is the header file for "util_file.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef UTIL_FILE_H
#define UTIL_FILE_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef SYSTEM_ARCH_LINUX
/* Includes ------------------------------------------------------------------*/
#include <dji_typedef.h>
#include <stdio.h>
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
uint32_t second: 5;
uint32_t minute: 6;
uint32_t hour: 5;
uint32_t day: 5;
uint32_t month: 4;
uint32_t year: 7;
} T_UtilFileCreateTime;
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode UtilFile_GetCreateTime(const char *filePath, T_UtilFileCreateTime *createTime);
T_DjiReturnCode UtilFile_GetFileSizeByPath(const char *filePath, uint32_t *fileSize);
T_DjiReturnCode UtilFile_GetFileDataByPath(const char *filePath, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_DjiReturnCode DjiFile_Delete(const char *filePath);
T_DjiReturnCode UtilFile_GetFileSize(FILE *file, uint32_t *fileSize);
T_DjiReturnCode UtilFile_GetFileData(FILE *file, uint32_t offset, uint16_t len, uint8_t *data, uint16_t *realLen);
#ifdef __cplusplus
}
#endif
#endif
#endif // UTIL_FILE_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,238 @@
/**
********************************************************************
* @file util_md5.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
* crypto-algorithms
* =================
*
* About
* ---
* These are basic implementations of standard cryptography algorithms, written by Brad Conte (brad@bradconte.com) from
* scratch and without any cross-licensing. They exist to provide publically accessible, restriction-free implementations
* of popular cryptographic algorithms, like AES and SHA-1. These are primarily intended for educational and pragmatic
* purposes (such as comparing a specification to actual implementation code, or for building an internal application
* that computes test vectors for a product). The algorithms have been tested against standard test vectors.
* This code is released into the public domain free of any restrictions. The author requests acknowledgement if the code
* is used, but does not require it. This code is provided free of any liability and without any quality claims by the
* author.
* Note that these are *not* cryptographically secure implementations. They have no resistence to side-channel attacks
* and should not be used in contexts that need cryptographically secure implementations.
* These algorithms are not optimized for speed or space. They are primarily designed to be easy to read, although some
* basic optimization techniques have been employed.
* Building
* ---
* The source code for each algorithm will come in a pair of a source code file and a header file. There should be no
* inter-header file dependencies, no additional libraries, no platform-specific header files, or any other complicating
* matters. Compiling them should be as easy as adding the relevent source code to the project.
*
* @statement DJI has modified some symbols' name.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "util_md5.h"
/* Private constants ---------------------------------------------------------*/
#define ROTLEFT(a, b) ((a << b) | (a >> (32-b)))
#define F(x, y, z) ((x & y) | (~x & z))
#define G(x, y, z) ((x & z) | (y & ~z))
#define H(x, y, z) (x ^ y ^ z)
#define I(x, y, z) (y ^ (x | ~z))
#define FF(a, b, c, d, m, s, t) { a += F(b,c,d) + m + t; \
a = b + ROTLEFT(a,s); }
#define GG(a, b, c, d, m, s, t) { a += G(b,c,d) + m + t; \
a = b + ROTLEFT(a,s); }
#define HH(a, b, c, d, m, s, t) { a += H(b,c,d) + m + t; \
a = b + ROTLEFT(a,s); }
#define II(a, b, c, d, m, s, t) { a += I(b,c,d) + m + t; \
a = b + ROTLEFT(a,s); }
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
void UtilMd5_Transform(MD5_CTX *ctx, const BYTE *data)
{
WORD a, b, c, d, m[16], i, j;
// MD5 specifies big endian byte order, but this implementation assumes a little
// endian byte order CPU. Reverse all the bytes upon input, and re-reverse them
// on output (in md5_final()).
for (i = 0, j = 0; i < 16; ++i, j += 4) {
m[i] = (data[j]) + (data[j + 1] << 8) + (data[j + 2] << 16) + (data[j + 3] << 24);
}
a = ctx->state[0];
b = ctx->state[1];
c = ctx->state[2];
d = ctx->state[3];
FF(a, b, c, d, m[0], 7, 0xd76aa478);
FF(d, a, b, c, m[1], 12, 0xe8c7b756);
FF(c, d, a, b, m[2], 17, 0x242070db);
FF(b, c, d, a, m[3], 22, 0xc1bdceee);
FF(a, b, c, d, m[4], 7, 0xf57c0faf);
FF(d, a, b, c, m[5], 12, 0x4787c62a);
FF(c, d, a, b, m[6], 17, 0xa8304613);
FF(b, c, d, a, m[7], 22, 0xfd469501);
FF(a, b, c, d, m[8], 7, 0x698098d8);
FF(d, a, b, c, m[9], 12, 0x8b44f7af);
FF(c, d, a, b, m[10], 17, 0xffff5bb1);
FF(b, c, d, a, m[11], 22, 0x895cd7be);
FF(a, b, c, d, m[12], 7, 0x6b901122);
FF(d, a, b, c, m[13], 12, 0xfd987193);
FF(c, d, a, b, m[14], 17, 0xa679438e);
FF(b, c, d, a, m[15], 22, 0x49b40821);
GG(a, b, c, d, m[1], 5, 0xf61e2562);
GG(d, a, b, c, m[6], 9, 0xc040b340);
GG(c, d, a, b, m[11], 14, 0x265e5a51);
GG(b, c, d, a, m[0], 20, 0xe9b6c7aa);
GG(a, b, c, d, m[5], 5, 0xd62f105d);
GG(d, a, b, c, m[10], 9, 0x02441453);
GG(c, d, a, b, m[15], 14, 0xd8a1e681);
GG(b, c, d, a, m[4], 20, 0xe7d3fbc8);
GG(a, b, c, d, m[9], 5, 0x21e1cde6);
GG(d, a, b, c, m[14], 9, 0xc33707d6);
GG(c, d, a, b, m[3], 14, 0xf4d50d87);
GG(b, c, d, a, m[8], 20, 0x455a14ed);
GG(a, b, c, d, m[13], 5, 0xa9e3e905);
GG(d, a, b, c, m[2], 9, 0xfcefa3f8);
GG(c, d, a, b, m[7], 14, 0x676f02d9);
GG(b, c, d, a, m[12], 20, 0x8d2a4c8a);
HH(a, b, c, d, m[5], 4, 0xfffa3942);
HH(d, a, b, c, m[8], 11, 0x8771f681);
HH(c, d, a, b, m[11], 16, 0x6d9d6122);
HH(b, c, d, a, m[14], 23, 0xfde5380c);
HH(a, b, c, d, m[1], 4, 0xa4beea44);
HH(d, a, b, c, m[4], 11, 0x4bdecfa9);
HH(c, d, a, b, m[7], 16, 0xf6bb4b60);
HH(b, c, d, a, m[10], 23, 0xbebfbc70);
HH(a, b, c, d, m[13], 4, 0x289b7ec6);
HH(d, a, b, c, m[0], 11, 0xeaa127fa);
HH(c, d, a, b, m[3], 16, 0xd4ef3085);
HH(b, c, d, a, m[6], 23, 0x04881d05);
HH(a, b, c, d, m[9], 4, 0xd9d4d039);
HH(d, a, b, c, m[12], 11, 0xe6db99e5);
HH(c, d, a, b, m[15], 16, 0x1fa27cf8);
HH(b, c, d, a, m[2], 23, 0xc4ac5665);
II(a, b, c, d, m[0], 6, 0xf4292244);
II(d, a, b, c, m[7], 10, 0x432aff97);
II(c, d, a, b, m[14], 15, 0xab9423a7);
II(b, c, d, a, m[5], 21, 0xfc93a039);
II(a, b, c, d, m[12], 6, 0x655b59c3);
II(d, a, b, c, m[3], 10, 0x8f0ccc92);
II(c, d, a, b, m[10], 15, 0xffeff47d);
II(b, c, d, a, m[1], 21, 0x85845dd1);
II(a, b, c, d, m[8], 6, 0x6fa87e4f);
II(d, a, b, c, m[15], 10, 0xfe2ce6e0);
II(c, d, a, b, m[6], 15, 0xa3014314);
II(b, c, d, a, m[13], 21, 0x4e0811a1);
II(a, b, c, d, m[4], 6, 0xf7537e82);
II(d, a, b, c, m[11], 10, 0xbd3af235);
II(c, d, a, b, m[2], 15, 0x2ad7d2bb);
II(b, c, d, a, m[9], 21, 0xeb86d391);
ctx->state[0] += a;
ctx->state[1] += b;
ctx->state[2] += c;
ctx->state[3] += d;
}
void UtilMd5_Init(MD5_CTX *ctx)
{
ctx->datalen = 0;
ctx->bitlen = 0;
ctx->state[0] = 0x67452301;
ctx->state[1] = 0xEFCDAB89;
ctx->state[2] = 0x98BADCFE;
ctx->state[3] = 0x10325476;
}
void UtilMd5_Update(MD5_CTX *ctx, const BYTE *data, size_t len)
{
size_t i;
for (i = 0; i < len; ++i) {
ctx->data[ctx->datalen] = data[i];
ctx->datalen++;
if (ctx->datalen == 64) {
UtilMd5_Transform(ctx, ctx->data);
ctx->bitlen += 512;
ctx->datalen = 0;
}
}
}
void UtilMd5_Final(MD5_CTX *ctx, BYTE *hash)
{
size_t i;
i = ctx->datalen;
// Pad whatever data is left in the buffer.
if (ctx->datalen < 56) {
ctx->data[i++] = 0x80;
while (i < 56) {
ctx->data[i++] = 0x00;
}
} else if (ctx->datalen >= 56) {
ctx->data[i++] = 0x80;
while (i < 64) {
ctx->data[i++] = 0x00;
}
UtilMd5_Transform(ctx, ctx->data);
memset(ctx->data, 0, 56);
}
// Append to the padding the total message's length in bits and transform.
ctx->bitlen += ctx->datalen * 8;
ctx->data[56] = ctx->bitlen;
ctx->data[57] = ctx->bitlen >> 8;
ctx->data[58] = ctx->bitlen >> 16;
ctx->data[59] = ctx->bitlen >> 24;
ctx->data[60] = ctx->bitlen >> 32;
ctx->data[61] = ctx->bitlen >> 40;
ctx->data[62] = ctx->bitlen >> 48;
ctx->data[63] = ctx->bitlen >> 56;
UtilMd5_Transform(ctx, ctx->data);
// Since this implementation uses little endian byte ordering and MD uses big endian,
// reverse all the bytes when copying the final state to the output hash.
for (i = 0; i < 4; ++i) {
hash[i] = (ctx->state[0] >> (i * 8)) & 0x000000ff;
hash[i + 4] = (ctx->state[1] >> (i * 8)) & 0x000000ff;
hash[i + 8] = (ctx->state[2] >> (i * 8)) & 0x000000ff;
hash[i + 12] = (ctx->state[3] >> (i * 8)) & 0x000000ff;
}
}
/* Private functions definition-----------------------------------------------*/
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,88 @@
/**
********************************************************************
* @file util_md5.h
* @brief This is the header file for "util_md5.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
* crypto-algorithms
* =================
*
* About
* ---
* These are basic implementations of standard cryptography algorithms, written by Brad Conte (brad@bradconte.com) from
* scratch and without any cross-licensing. They exist to provide publically accessible, restriction-free implementations
* of popular cryptographic algorithms, like AES and SHA-1. These are primarily intended for educational and pragmatic
* purposes (such as comparing a specification to actual implementation code, or for building an internal application
* that computes test vectors for a product). The algorithms have been tested against standard test vectors.
* This code is released into the public domain free of any restrictions. The author requests acknowledgement if the code
* is used, but does not require it. This code is provided free of any liability and without any quality claims by the
* author.
* Note that these are *not* cryptographically secure implementations. They have no resistence to side-channel attacks
* and should not be used in contexts that need cryptographically secure implementations.
* These algorithms are not optimized for speed or space. They are primarily designed to be easy to read, although some
* basic optimization techniques have been employed.
* Building
* ---
* The source code for each algorithm will come in a pair of a source code file and a header file. There should be no
* inter-header file dependencies, no additional libraries, no platform-specific header files, or any other complicating
* matters. Compiling them should be as easy as adding the relevent source code to the project.
*
* @statement DJI has modified some symbols' name.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef UTIL_MD5_H
#define UTIL_MD5_H
/* Includes ------------------------------------------------------------------*/
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
#define MD5_BLOCK_SIZE 16 // MD5 outputs a 16 byte digest
/* Exported types ------------------------------------------------------------*/
typedef unsigned char BYTE; // 8-bit byte
typedef unsigned int WORD; // 32-bit word, change to "long" for 16-bit machines
typedef struct {
BYTE data[64];
WORD datalen;
unsigned long long bitlen;
WORD state[4];
} MD5_CTX;
/* Exported functions --------------------------------------------------------*/
void UtilMd5_Init(MD5_CTX *ctx);
void UtilMd5_Update(MD5_CTX *ctx, const BYTE *data, size_t len);
void UtilMd5_Final(MD5_CTX *ctx, BYTE *hash);
#ifdef __cplusplus
}
#endif
#endif // UTIL_MD5_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,102 @@
/**
********************************************************************
* @file util_misc.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#ifdef SYSTEM_ARCH_LINUX
#include <stdio.h>
#include "util_misc.h"
/* Private constants ---------------------------------------------------------*/
const char *baseStr = "[>>>>>>>>>>>>>---------------------------------------------------------------------------------------] 13%";
/* Private types -------------------------------------------------------------*/
/* Private values ------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiUserUtil_GetCurrentFileDirPath(const char *filePath, uint32_t pathBufferSize, char *dirPath)
{
uint32_t i = strlen(filePath) - 1;
uint32_t dirPathLen;
while (filePath[i] != '/') {
i--;
}
dirPathLen = i + 1;
if (dirPathLen + 1 > pathBufferSize) {
return DJI_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
memcpy(dirPath, filePath, dirPathLen);
dirPath[dirPathLen] = 0;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiUserUtil_RunSystemCmd(const char *systemCmdStr)
{
FILE *fp;
fp = popen(systemCmdStr, "r");
if (fp == NULL) {
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
pclose(fp);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
void DjiUserUtil_PrintProgressBar(uint16_t currentProgress, uint16_t totalProgress, char *userData)
{
for (int j = 0; j < strlen(baseStr) + strlen(userData) + 4; ++j) {
printf("\b");
}
printf("[");
for (int j = 0; j < totalProgress; ++j) {
if (j < currentProgress) {
printf("%c", '>');
} else {
printf("-");
}
}
printf("] ");
printf("%3d%%", currentProgress);
printf("%s", userData);
fflush(stdout);
}
/* Private functions definition-----------------------------------------------*/
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,58 @@
/**
********************************************************************
* @file util_misc.h
* @brief This is the header file for "util_misc.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef UTIL_MISC_H
#define UTIL_MISC_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
#define USER_UTIL_UNUSED(x) ((x) = (x))
#define USER_UTIL_MIN(a, b) (((a) < (b)) ? (a) : (b))
#define USER_UTIL_MAX(a, b) (((a) > (b)) ? (a) : (b))
#define USER_UTIL_IS_WORK_TURN(step, workfreq, taskfreq) (!((step) % (uint32_t) ((taskfreq) / (workfreq))))
#define UTIL_OFFSETOF(type, member) ((size_t) & ((type *)0 )-> member)
#define UTIL_ARRAY_SIZE(array) ((unsigned int) (sizeof(array) / sizeof((array)[0])))
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiUserUtil_GetCurrentFileDirPath(const char *filePath, uint32_t pathBufferSize, char *dirPath);
void DjiUserUtil_PrintProgressBar(uint16_t currentProgress, uint16_t totalProgress, char *userData);
T_DjiReturnCode DjiUserUtil_RunSystemCmd(const char *systemCmdStr);
#ifdef __cplusplus
}
#endif
#endif // UTIL_MISC_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,62 @@
/**
********************************************************************
* @file util_time.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#ifdef SYSTEM_ARCH_LINUX
#include "util_time.h"
#include <sys/resource.h>
#include <time.h>
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Private values ------------------------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
T_DjiRunTimeStamps DjiUtilTime_GetRunTimeStamps(void)
{
T_DjiRunTimeStamps timeStamps;
struct rusage rusage;
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
timeStamps.realUsec = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
getrusage(RUSAGE_SELF, &rusage);
timeStamps.userUsec =
(rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
timeStamps.sysUsec =
(rusage.ru_stime.tv_sec * 1000000LL) + rusage.ru_stime.tv_usec;
return timeStamps;
}
/* Private functions definition-----------------------------------------------*/
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,60 @@
/**
********************************************************************
* @file util_time.h
* @brief This is the header file for "util_time.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef DJI_UTIL_TIME_H
#define DJI_UTIL_TIME_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef SYSTEM_ARCH_LINUX
/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
uint64_t realUsec;
uint64_t userUsec;
uint64_t sysUsec;
} T_DjiRunTimeStamps;
/* Exported functions --------------------------------------------------------*/
T_DjiRunTimeStamps DjiUtilTime_GetRunTimeStamps(void);
#ifdef __cplusplus
}
#endif
#endif
#endif // DJI_DP_UTILS_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,465 @@
/**
********************************************************************
* @file test_waypoint_v2.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <widget_interaction_test/test_widget_interaction.h>
#include "test_waypoint_v2.h"
#include "dji_waypoint_v2.h"
#include "dji_fc_subscription.h"
#include "dji_logger.h"
#include "dji_platform.h"
#include "math.h"
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
typedef struct {
uint8_t eventID;
char *eventStr;
} T_DjiTestWaypointV2EventStr;
typedef struct {
uint8_t missionState;
char *stateStr;
} T_DjiTestWaypointV2StateStr;
/* Private values -------------------------------------------------------------*/
static T_DjiOsalHandler *osalHandler = NULL;
static const dji_f32_t TEST_EARTH_RADIUS = 6378137.0;
static uint32_t s_missionID = 12345;
//reference note of "T_DjiWaypointV2MissionEventPush"
static const T_DjiTestWaypointV2EventStr s_waypointV2EventStr[] = {
{.eventID = 0x01, .eventStr = "Interrupt Event"},
{.eventID = 0x02, .eventStr = "Resume Event"},
{.eventID = 0x03, .eventStr = "Stop Event"},
{.eventID = 0x10, .eventStr = "Arrival Event"},
{.eventID = 0x11, .eventStr = "Finished Event"},
{.eventID = 0x12, .eventStr = "Avoid Obstacle Event"},
{.eventID = 0x30, .eventStr = "Action Switch Event"},
{.eventID = 0xFF, .eventStr = "Unknown"}
};
//reference note of "T_DjiWaypointV2MissionStatePush"
static const T_DjiTestWaypointV2StateStr s_waypointV2StateStr[] = {
{.missionState = 0x00, .stateStr = "Ground station not start"},
{.missionState = 0x01, .stateStr = "Mission prepared"},
{.missionState = 0x02, .stateStr = "Enter mission"},
{.missionState = 0x03, .stateStr = "Execute mission"},
{.missionState = 0x04, .stateStr = "Pause Mission"},
{.missionState = 0x05, .stateStr = "Enter mission after ending pause"},
{.missionState = 0x06, .stateStr = "Exit mission"},
{.missionState = 0xFF, .stateStr = "Unknown"}
};
/* Private functions declaration ---------------------------------------------*/
uint8_t DJiTest_WaypointV2GetMissionEventIndex(uint8_t eventID);
uint8_t DjiTest_WaypointV2GetMissionStateIndex(uint8_t state);
static T_DJIWaypointV2Action *DjiTest_WaypointV2GenerateWaypointV2Actions(uint16_t actionNum);
static T_DjiWaypointV2 *DjiTest_WaypointV2GeneratePolygonWaypointV2(dji_f32_t radius, uint16_t polygonNum);
static void DjiTest_WaypointV2SetDefaultSetting(T_DjiWaypointV2 *waypointV2);
static T_DjiReturnCode DjiTest_WaypointV2UploadMission(uint16_t missionNum);
static T_DjiReturnCode DjiTest_WaypointV2EventCallback(T_DjiWaypointV2MissionEventPush eventData);
static T_DjiReturnCode DjiTest_WaypointV2StateCallback(T_DjiWaypointV2MissionStatePush stateData);
static T_DjiReturnCode DjiTest_WaypointV2Init(void);
static T_DjiReturnCode DjiTest_WaypointV2DeInit(void);
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_WaypointV2RunSample(void)
{
T_DjiReturnCode returnCode;
uint32_t timeOutMs = 1000;
uint16_t missionNum = 8;
T_DjiWaypointV2GlobalCruiseSpeed setGlobalCruiseSpeed = 0;
T_DjiWaypointV2GlobalCruiseSpeed getGlobalCruiseSpeed = 0;
USER_LOG_INFO("Waypoint V2 sample start");
DjiTest_WidgetLogAppend("Waypoint V2 sample start");
USER_LOG_INFO("--> Step 1: Init Waypoint V2 sample");
DjiTest_WidgetLogAppend("--> Step 1: Init Waypoint V2 sample");
returnCode = DjiTest_WaypointV2Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Init waypoint V2 sample failed, error code: 0x%08X", returnCode);
USER_LOG_INFO("Waypoint V2 sample end");
return returnCode;
}
USER_LOG_INFO("--> Step 2: Subscribe gps fused data");
DjiTest_WidgetLogAppend("--> Step 2: Subscribe gps fused data");
returnCode = DjiFcSubscription_SubscribeTopic(DJI_FC_SUBSCRIPTION_TOPIC_POSITION_FUSED,
DJI_DATA_SUBSCRIPTION_TOPIC_50_HZ, NULL);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Subscribe gps fused data failed, error code: 0x%08X", returnCode);
goto out;
}
USER_LOG_INFO("--> Step 3: Register waypoint V2 event and state callback\r\n");
DjiTest_WidgetLogAppend("--> Step 3: Register waypoint V2 event and state callback\r\n");
returnCode = DjiWaypointV2_RegisterMissionEventCallback(DjiTest_WaypointV2EventCallback);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Register waypoint V2 event failed, error code: 0x%08X", returnCode);
goto out;
}
returnCode = DjiWaypointV2_RegisterMissionStateCallback(DjiTest_WaypointV2StateCallback);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Register waypoint V2 state failed, error code: 0x%08X", returnCode);
goto out;
}
osalHandler->TaskSleepMs(timeOutMs);
USER_LOG_INFO("--> Step 4: Upload waypoint V2 mission\r\n");
DjiTest_WidgetLogAppend("--> Step 4: Upload waypoint V2 mission\r\n");
returnCode = DjiTest_WaypointV2UploadMission(missionNum);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Upload waypoint V2 mission failed, error code: 0x%08X", returnCode);
goto out;
}
osalHandler->TaskSleepMs(timeOutMs);
USER_LOG_INFO("--> Step 5: Start waypoint V2 mission\r\n");
DjiTest_WidgetLogAppend("--> Step 5: Start waypoint V2 mission\r\n");
returnCode = DjiWaypointV2_Start();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Start waypoint V2 mission failed, error code: 0x%08X", returnCode);
goto out;
}
osalHandler->TaskSleepMs(20 * timeOutMs);
USER_LOG_INFO("--> Step 6: Set global cruise speed\r\n");
DjiTest_WidgetLogAppend("--> Step 6: Set global cruise speed\r\n");
setGlobalCruiseSpeed = 1.5;
returnCode = DjiWaypointV2_SetGlobalCruiseSpeed(setGlobalCruiseSpeed);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Set global cruise speed failed, error code: 0x%08X", returnCode);
goto out;
}
osalHandler->TaskSleepMs(timeOutMs);
USER_LOG_INFO("--> Step 7: Get global cruise speed\r\n");
DjiTest_WidgetLogAppend("--> Step 7: Get global cruise speed\r\n");
returnCode = DjiWaypointV2_GetGlobalCruiseSpeed(&getGlobalCruiseSpeed);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get global cruise speed failed, error code: 0x%08X", returnCode);
goto out;
}
USER_LOG_INFO("Current global cruise speed is %f m/s", getGlobalCruiseSpeed);
osalHandler->TaskSleepMs(timeOutMs);
USER_LOG_INFO("--> Step 8: Pause waypoint V2 for 5 s\r\n");
DjiTest_WidgetLogAppend("--> Step 8: Pause waypoint V2 for 5 s\r\n");
returnCode = DjiWaypointV2_Pause();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Pause waypoint V2 failed, error code: 0x%08X", returnCode);
goto out;
}
osalHandler->TaskSleepMs(5 * timeOutMs);
USER_LOG_INFO("--> Step 9: Resume waypoint V2\r\n");
DjiTest_WidgetLogAppend("--> Step 9: Resume waypoint V2\r\n");
returnCode = DjiWaypointV2_Resume();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Resume waypoint V2 failed, error code: 0x%08X", returnCode);
goto out;
}
osalHandler->TaskSleepMs(50 * timeOutMs);
USER_LOG_INFO("--> Step 10: Deinit Waypoint V2 sample\r\n");
DjiTest_WidgetLogAppend("--> Step 10: Deinit Waypoint V2 sample\r\n");
out:
returnCode = DjiTest_WaypointV2DeInit();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Deinit waypoint V2 sample failed, error code: 0x%08X", returnCode);
}
USER_LOG_INFO("Waypoint V2 sample end");
DjiTest_WidgetLogAppend("Waypoint V2 sample end");
return returnCode;
}
/* Private functions definition-----------------------------------------------*/
static T_DJIWaypointV2Action *DjiTest_WaypointV2GenerateWaypointV2Actions(uint16_t actionNum)
{
T_DJIWaypointV2Action *actions = NULL;
uint16_t i;
T_DJIWaypointV2Trigger trigger = {0};
T_DJIWaypointV2SampleReachPointTriggerParam sampleReachPointTriggerParam = {0};
T_DJIWaypointV2Actuator actuator = {0};
T_DJIWaypointV2Action action = {0};
actions = osalHandler->Malloc(actionNum * sizeof(T_DJIWaypointV2Action));
if (actions == NULL) {
return NULL;
}
for (i = 0; i < actionNum; i++) {
sampleReachPointTriggerParam.waypointIndex = i;
sampleReachPointTriggerParam.terminateNum = 0;
trigger.actionTriggerType = DJI_WAYPOINT_V2_ACTION_TRIGGER_TYPE_SAMPLE_REACH_POINT;
trigger.sampleReachPointTriggerParam.terminateNum = sampleReachPointTriggerParam.terminateNum;
trigger.sampleReachPointTriggerParam.waypointIndex = sampleReachPointTriggerParam.waypointIndex;
actuator.actuatorType = DJI_WAYPOINT_V2_ACTION_ACTUATOR_TYPE_CAMERA;
actuator.actuatorIndex = 0;
actuator.cameraActuatorParam.operationType = DJI_WAYPOINT_V2_ACTION_ACTUATOR_CAMERA_OPERATION_TYPE_TAKE_PHOTO;
action.actionId = i;
memcpy(&action.actuator, &actuator, sizeof(actuator));
memcpy(&action.trigger, &trigger, sizeof(trigger));
actions[i] = action;
}
return actions;
}
static void DjiTest_WaypointV2SetDefaultSetting(T_DjiWaypointV2 *waypointV2)
{
waypointV2->waypointType = DJI_WAYPOINT_V2_FLIGHT_PATH_MODE_GO_TO_POINT_IN_STRAIGHT_AND_STOP;
waypointV2->headingMode = DJI_WAYPOINT_V2_HEADING_MODE_AUTO;
waypointV2->config.useLocalMaxVel = 0;
waypointV2->config.useLocalCruiseVel = 0;
waypointV2->dampingDistance = 40;
waypointV2->heading = 0;
waypointV2->turnMode = DJI_WAYPOINT_V2_TURN_MODE_CLOCK_WISE;
waypointV2->pointOfInterest.positionX = 0;
waypointV2->pointOfInterest.positionY = 0;
waypointV2->pointOfInterest.positionZ = 0;
waypointV2->maxFlightSpeed = 9;
waypointV2->autoFlightSpeed = 2;
}
static T_DjiWaypointV2 *DjiTest_WaypointV2GeneratePolygonWaypointV2(dji_f32_t radius, uint16_t polygonNum)
{
// Let's create a vector to store our waypoints in.
T_DjiReturnCode returnCode;
T_DjiWaypointV2 *waypointV2List = (T_DjiWaypointV2 *) osalHandler->Malloc(
(polygonNum + 2) * sizeof(T_DjiWaypointV2));
T_DjiWaypointV2 startPoint;
T_DjiWaypointV2 waypointV2;
T_DjiFcSubscriptionPositionFused positionFused = {0};
T_DjiDataTimestamp timestamp = {0};
osalHandler->TaskSleepMs(1000);
returnCode = DjiFcSubscription_GetLatestValueOfTopic(DJI_FC_SUBSCRIPTION_TOPIC_POSITION_FUSED,
(uint8_t *) &positionFused,
sizeof(T_DjiFcSubscriptionPositionFused),
&timestamp);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get value of topic GPS Fused error");
} else {
USER_LOG_DEBUG("Timestamp: millisecond %u microsecond %u.", timestamp.millisecond,
timestamp.microsecond);
USER_LOG_DEBUG("Position: %f %f %f %d.", positionFused.latitude, positionFused.longitude,
positionFused.altitude,
positionFused.visibleSatelliteNumber);
}
startPoint.latitude = positionFused.latitude;
startPoint.longitude = positionFused.longitude;
startPoint.relativeHeight = 15;
DjiTest_WaypointV2SetDefaultSetting(&startPoint);
waypointV2List[0] = startPoint;
// Iterative algorithm
for (int i = 0; i < polygonNum; i++) {
dji_f32_t angle = i * 2 * DJI_PI / polygonNum;
DjiTest_WaypointV2SetDefaultSetting(&waypointV2);
dji_f32_t X = radius * cos(angle);
dji_f32_t Y = radius * sin(angle);
waypointV2.latitude = X / TEST_EARTH_RADIUS + startPoint.latitude;
waypointV2.longitude = Y / (TEST_EARTH_RADIUS * cos(startPoint.latitude)) + startPoint.longitude;
waypointV2.relativeHeight = startPoint.relativeHeight;
waypointV2List[i + 1] = waypointV2;
}
waypointV2List[polygonNum + 1] = startPoint;
return waypointV2List;
}
uint8_t DJiTest_WaypointV2GetMissionEventIndex(uint8_t eventID)
{
uint8_t i;
for (i = 0; i < sizeof(s_waypointV2EventStr) / sizeof(T_DjiTestWaypointV2EventStr); i++) {
if (s_waypointV2EventStr[i].eventID == eventID) {
return i;
}
}
return i;
}
uint8_t DjiTest_WaypointV2GetMissionStateIndex(uint8_t state)
{
uint8_t i;
for (i = 0; i < sizeof(s_waypointV2StateStr) / sizeof(T_DjiTestWaypointV2StateStr); i++) {
if (s_waypointV2StateStr[i].missionState == state) {
return i;
}
}
return i;
}
static T_DjiReturnCode DjiTest_WaypointV2EventCallback(T_DjiWaypointV2MissionEventPush eventData)
{
if (eventData.event == 0x01) {
USER_LOG_INFO("[%s]: Mission interrupted reason is 0x%x",
s_waypointV2EventStr[DJiTest_WaypointV2GetMissionEventIndex(eventData.event)].eventStr,
eventData.data.interruptReason);
} else if (eventData.event == 0x02) {
USER_LOG_INFO("[%s]: Mission recover reason is 0x%x",
s_waypointV2EventStr[DJiTest_WaypointV2GetMissionEventIndex(eventData.event)].eventStr,
eventData.data.recoverProcess);
} else if (eventData.event == 0x03) {
USER_LOG_INFO("[%s]: Mission exit reason is 0x%x",
s_waypointV2EventStr[DJiTest_WaypointV2GetMissionEventIndex(eventData.event)].eventStr,
eventData.data.exitReason);
} else if (eventData.event == 0x10) {
USER_LOG_INFO("[%s]: Current waypoint index is %d",
s_waypointV2EventStr[DJiTest_WaypointV2GetMissionEventIndex(eventData.event)].eventStr,
eventData.data.waypointIndex);
} else if (eventData.event == 0x11) {
USER_LOG_INFO("[%s]: Current mission execute times is %d",
s_waypointV2EventStr[DJiTest_WaypointV2GetMissionEventIndex(eventData.event)].eventStr,
eventData.data.T_DjiWaypointV2MissionExecEvent.currentMissionExecTimes);
} else if (eventData.event == 0x12) {
USER_LOG_INFO("[%s]: avoid obstacle state:%d",
s_waypointV2EventStr[DJiTest_WaypointV2GetMissionEventIndex(eventData.event)].eventStr,
eventData.data.avoidState);
} else if (eventData.event == 0x30) {
USER_LOG_INFO(
"[%s]: action id:%d, pre actuator state:%d, current actuator state:%d, result:0x%08llX",
s_waypointV2EventStr[DJiTest_WaypointV2GetMissionEventIndex(eventData.event)].eventStr,
eventData.data.T_DjiWaypointV2ActionExecEvent.actionId,
eventData.data.T_DjiWaypointV2ActionExecEvent.preActuatorState,
eventData.data.T_DjiWaypointV2ActionExecEvent.curActuatorState,
eventData.data.T_DjiWaypointV2ActionExecEvent.result
);
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode DjiTest_WaypointV2StateCallback(T_DjiWaypointV2MissionStatePush stateData)
{
static uint32_t curMs = 0;
static uint32_t preMs = 0;
osalHandler->GetTimeMs(&curMs);
if (curMs - preMs >= 1000) {
preMs = curMs;
USER_LOG_INFO("[Waypoint Index:%d]: State: %s, velocity:%.2f m/s",
stateData.curWaypointIndex,
s_waypointV2StateStr[DjiTest_WaypointV2GetMissionStateIndex(stateData.state)].stateStr,
(dji_f32_t) stateData.velocity / 100);
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode DjiTest_WaypointV2Init(void)
{
T_DjiReturnCode returnCode;
osalHandler = DjiPlatform_GetOsalHandler();
if (!osalHandler) return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
returnCode = DjiFcSubscription_Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Init waypoint V2 data subscription module error, stat:0x%08llX", returnCode);
return returnCode;
}
returnCode = DjiWaypointV2_Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Init waypoint V2 module error, stat:0x%08llX", returnCode);
return returnCode;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode DjiTest_WaypointV2DeInit(void)
{
T_DjiReturnCode returnCode;
returnCode = DjiFcSubscription_DeInit();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Deinit waypoint V2 data subscription module error, stat:0x%08llX", returnCode);
return returnCode;
}
returnCode = DjiWaypointV2_Deinit();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Deinit waypoint V2 module error, stat:0x%08llX", returnCode);
return returnCode;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode DjiTest_WaypointV2UploadMission(uint16_t missionNum)
{
T_DjiReturnCode returnCode;
uint16_t polygonNum = missionNum - 2;
dji_f32_t radius = 6;
uint16_t actionNum = 5;
T_DjiWayPointV2MissionSettings missionInitSettings = {0};
T_DJIWaypointV2ActionList actionList = {NULL, 0};
/*! Generate actions*/
actionList.actions = DjiTest_WaypointV2GenerateWaypointV2Actions(actionNum);
actionList.actionNum = actionNum;
/*! Init waypoint settings*/
missionInitSettings.missionID = s_missionID + 10;
USER_LOG_DEBUG("Generate mission id:%d", missionInitSettings.missionID);
missionInitSettings.repeatTimes = 1;
missionInitSettings.finishedAction = DJI_WAYPOINT_V2_FINISHED_GO_HOME;
missionInitSettings.maxFlightSpeed = 10;
missionInitSettings.autoFlightSpeed = 2;
missionInitSettings.actionWhenRcLost = DJI_WAYPOINT_V2_MISSION_KEEP_EXECUTE_WAYPOINT_V2;
missionInitSettings.gotoFirstWaypointMode = DJI_WAYPOINT_V2_MISSION_GO_TO_FIRST_WAYPOINT_MODE_POINT_TO_POINT;
missionInitSettings.mission = DjiTest_WaypointV2GeneratePolygonWaypointV2(radius, polygonNum);
missionInitSettings.missTotalLen = missionNum;
missionInitSettings.actionList = actionList;
returnCode = DjiWaypointV2_UploadMission(&missionInitSettings);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Init waypoint V2 mission setting failed, ErrorCode:0x%lX", returnCode);
goto out;
}
out:
osalHandler->Free(actionList.actions);
return returnCode;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,49 @@
/**
********************************************************************
* @file test_waypoint_v2.h
* @brief This is the header file for "test_waypoint_v2.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_WAYPOINT_V2_H
#define TEST_WAYPOINT_V2_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_WaypointV2RunSample(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_WAYPOINT_V2_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,150 @@
/**
********************************************************************
* @file test_waypoint_v3.c
* @brief
*
* @copyright (c) 2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <utils/util_file.h>
#include <utils/util_misc.h>
#include "test_waypoint_v3.h"
#include "dji_logger.h"
#include "dji_waypoint_v3.h"
#include "waypoint_file_c/waypoint_v3_test_file_kmz.h"
/* Private constants ---------------------------------------------------------*/
#define DJI_TEST_WAYPOINT_V3_KMZ_FILE_PATH_LEN_MAX (256)
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
static T_DjiWaypointV3MissionState s_lastWaypointV3MissionState = {0};
/* Private functions declaration ---------------------------------------------*/
static T_DjiReturnCode DjiTest_WaypointV3StateCallback(T_DjiWaypointV3MissionState missionState);
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_WaypointV3RunSample(void)
{
T_DjiReturnCode returnCode;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
#ifdef SYSTEM_ARCH_LINUX
FILE *kmzFile;
uint32_t kmzFileSize = 0;
uint8_t *kmzFileBuf;
uint16_t readLen;
char curFileDirPath[DJI_TEST_WAYPOINT_V3_KMZ_FILE_PATH_LEN_MAX];
char tempPath[DJI_TEST_WAYPOINT_V3_KMZ_FILE_PATH_LEN_MAX];
returnCode = DjiWaypointV3_Init();
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Waypoint v3 init failed.");
return returnCode;
}
returnCode = DjiWaypointV3_RegMissionStateCallback(DjiTest_WaypointV3StateCallback);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Register waypoint v3 state callback failed.");
goto out;
}
returnCode = DjiUserUtil_GetCurrentFileDirPath(__FILE__, DJI_TEST_WAYPOINT_V3_KMZ_FILE_PATH_LEN_MAX,
curFileDirPath);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get file current path error, stat = 0x%08llX", returnCode);
goto out;
}
/*! Attention: suggest use the exported kmz file by DJI pilot. If use this test file, you need set the longitude as
* 113.94255, latitude as 22.57765 on DJI Assistant 2 simulator */
snprintf(tempPath, DJI_TEST_WAYPOINT_V3_KMZ_FILE_PATH_LEN_MAX, "%s/waypoint_file/waypoint_v3_test_file.kmz",
curFileDirPath);
kmzFile = fopen(tempPath, "r");
if (kmzFile == NULL) {
USER_LOG_ERROR("Open kmz file failed.");
goto out;
}
returnCode = UtilFile_GetFileSize(kmzFile, &kmzFileSize);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get kmz file size failed.");
goto out;
}
kmzFileBuf = osalHandler->Malloc(kmzFileSize);
if (kmzFileBuf == NULL) {
USER_LOG_ERROR("Malloc kmz file buf error.");
goto out;
}
readLen = fread(kmzFileBuf, 1, kmzFileSize, kmzFile);
if (readLen != kmzFileSize) {
USER_LOG_ERROR("Read kmz file data failed.");
goto out;
}
returnCode = DjiWaypointV3_UploadKmzFile(kmzFileBuf, kmzFileSize);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Upload kmz file failed.");
goto out;
}
osalHandler->Free(kmzFileBuf);
#else
returnCode = DjiWaypointV3_UploadKmzFile(waypoint_v3_test_file_kmz_fileBinaryArray,
waypoint_v3_test_file_kmz_fileSize);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Upload kmz file failed.");
goto out;
}
#endif
USER_LOG_INFO("Execute start action");
returnCode = DjiWaypointV3_Action(DJI_WAYPOINT_V3_ACTION_START);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Execute start action failed.");
goto out;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
out:
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
/* Private functions definition-----------------------------------------------*/
static T_DjiReturnCode DjiTest_WaypointV3StateCallback(T_DjiWaypointV3MissionState missionState)
{
if (s_lastWaypointV3MissionState.state == missionState.state
&& s_lastWaypointV3MissionState.currentWaypointIndex == missionState.currentWaypointIndex
&& s_lastWaypointV3MissionState.wayLineId == missionState.wayLineId) {
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
USER_LOG_INFO("Waypoint v3 mission state: %d, current waypoint index: %d, wayLine id: %d", missionState.state,
missionState.currentWaypointIndex, missionState.wayLineId);
memcpy(&s_lastWaypointV3MissionState, &missionState, sizeof(T_DjiWaypointV3MissionState));
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,49 @@
/**
********************************************************************
* @file test_waypoint_v3.h
* @brief This is the header file for "test_waypoint_v3.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_WAYPOINT_V3_H
#define TEST_WAYPOINT_V3_H
/* Includes ------------------------------------------------------------------*/
#include "dji_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_WaypointV3RunSample(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_WAYPOINT_V3_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,214 @@
/* Generated by file2c, do not edit manually */
#ifndef __waypoint_v3_test_file_kmz_h_included
#define __waypoint_v3_test_file_kmz_h_included
#include <stdint.h>
/* Contents of file waypoint_v3_test_file.kmz */
#define waypoint_v3_test_file_kmz_fileName "waypoint_v3_test_file.kmz"
#define waypoint_v3_test_file_kmz_fileSize 3186
static const uint8_t waypoint_v3_test_file_kmz_fileBinaryArray[3186] = {
0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x08, 0x08, 0x08, 0x00, 0x22, 0x6D, 0x34, 0x55, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x77, 0x70,
0x6D, 0x7A, 0x2F, 0x74, 0x65, 0x6D, 0x70, 0x6C, 0x61, 0x74, 0x65, 0x2E, 0x6B, 0x6D, 0x6C, 0xED,
0x5B, 0x4D, 0x8F, 0xDB, 0x36, 0x10, 0xBD, 0xE7, 0x57, 0x08, 0x3E, 0xB5, 0x40, 0x6A, 0x53, 0xDF,
0x52, 0xE0, 0x38, 0xD8, 0x6E, 0x3E, 0x76, 0x91, 0x4D, 0x63, 0xC4, 0x4E, 0xF7, 0x58, 0x30, 0x32,
0x6D, 0xB3, 0x2B, 0x91, 0x86, 0x44, 0xAD, 0xD7, 0x3D, 0x05, 0x28, 0x52, 0xB4, 0x40, 0x4E, 0x2D,
0x8A, 0x1E, 0x8A, 0x1E, 0x52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0x08, 0xDD, 0x90, 0xD9, 0xA9, 0x92, 0x05, 0x00, 0x00, 0xE9, 0x3F, 0x00, 0x00, 0x50, 0x4B, 0x01,
0x02, 0x14, 0x00, 0x14, 0x00, 0x08, 0x08, 0x08, 0x00, 0x22, 0x6D, 0x34, 0x55, 0x50, 0x7D, 0x0A,
0x8A, 0xCC, 0x05, 0x00, 0x00, 0xEA, 0x33, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x70, 0x6D, 0x7A, 0x2F,
0x74, 0x65, 0x6D, 0x70, 0x6C, 0x61, 0x74, 0x65, 0x2E, 0x6B, 0x6D, 0x6C, 0x50, 0x4B, 0x01, 0x02,
0x14, 0x00, 0x14, 0x00, 0x08, 0x08, 0x08, 0x00, 0x22, 0x6D, 0x34, 0x55, 0xDD, 0x90, 0xD9, 0xA9,
0x92, 0x05, 0x00, 0x00, 0xE9, 0x3F, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x06, 0x00, 0x00, 0x77, 0x70, 0x6D, 0x7A, 0x2F, 0x77,
0x61, 0x79, 0x6C, 0x69, 0x6E, 0x65, 0x73, 0x2E, 0x77, 0x70, 0x6D, 0x6C, 0x50, 0x4B, 0x05, 0x06,
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x7F, 0x00, 0x00, 0x00, 0xDD, 0x0B, 0x00, 0x00,
0x00, 0x00
};
#endif /* __waypoint_v3_test_file_kmz_h_included */

View File

@ -0,0 +1,58 @@
/**
********************************************************************
* @file file_binary_array_list_en.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "file_binary_array_list_en.h"
#include "widget_file_c/en_big_screen/icon_button1_png.h"
#include "widget_file_c/en_big_screen/icon_button2_png.h"
#include "widget_file_c/en_big_screen/icon_list_item1_png.h"
#include "widget_file_c/en_big_screen/icon_list_item2_png.h"
#include "widget_file_c/en_big_screen/icon_scale_png.h"
#include "widget_file_c/en_big_screen/icon_switch_select_png.h"
#include "widget_file_c/en_big_screen/icon_switch_unselect_png.h"
#include "widget_file_c/en_big_screen/widget_config_json.h"
/* Private constants ---------------------------------------------------------*/
/* Export types -------------------------------------------------------------*/
// English language file binary array list
static T_DjiWidgetFileBinaryArray s_EnWidgetFileBinaryArrayList[] = {
{widget_config_json_fileName, widget_config_json_fileSize, widget_config_json_fileBinaryArray},
{icon_button1_png_fileName, icon_button1_png_fileSize, icon_button1_png_fileBinaryArray},
{icon_button2_png_fileName, icon_button2_png_fileSize, icon_button2_png_fileBinaryArray},
{icon_list_item1_png_fileName, icon_list_item1_png_fileSize, icon_list_item1_png_fileBinaryArray},
{icon_list_item2_png_fileName, icon_list_item2_png_fileSize, icon_list_item2_png_fileBinaryArray},
{icon_scale_png_fileName, icon_scale_png_fileSize, icon_scale_png_fileBinaryArray},
{icon_switch_select_png_fileName, icon_switch_select_png_fileSize, icon_switch_select_png_fileBinaryArray},
{icon_switch_unselect_png_fileName, icon_switch_unselect_png_fileSize, icon_switch_unselect_png_fileBinaryArray}
};
/* Export values -------------------------------------------------------------*/
uint32_t g_EnBinaryArrayCount = sizeof(s_EnWidgetFileBinaryArrayList) / sizeof(T_DjiWidgetFileBinaryArray);
T_DjiWidgetFileBinaryArray * g_EnFileBinaryArrayList = s_EnWidgetFileBinaryArrayList;
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,57 @@
/**
********************************************************************
* @file file_binary_array_list_en.h
* @brief This is the header file for "file_binary_array_list_en.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef FILE_BINARY_ARRAY_LIST_EN_H
#define FILE_BINARY_ARRAY_LIST_EN_H
#include <stdint.h>
#include <dji_widget.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
extern uint32_t g_EnBinaryArrayCount;
extern T_DjiWidgetFileBinaryArray * g_EnFileBinaryArrayList;
#ifdef __cplusplus
}
#endif
#endif // FILE_BINARY_ARRAY_LIST_EN_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,251 @@
/**
********************************************************************
* @file test_widget.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_widget.h"
#include <dji_widget.h>
#include <dji_logger.h>
#include "../utils/util_misc.h"
#include <dji_platform.h>
#include <stdio.h>
#include "dji_sdk_config.h"
#include "file_binary_array_list_en.h"
/* Private constants ---------------------------------------------------------*/
#define WIDGET_DIR_PATH_LEN_MAX (256)
#define WIDGET_TASK_STACK_SIZE (2048)
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static void *DjiTest_WidgetTask(void *arg);
static T_DjiReturnCode DjiTestWidget_SetWidgetValue(E_DjiWidgetType widgetType, uint32_t index, int32_t value,
void *userData);
static T_DjiReturnCode DjiTestWidget_GetWidgetValue(E_DjiWidgetType widgetType, uint32_t index, int32_t *value,
void *userData);
/* Private values ------------------------------------------------------------*/
static T_DjiTaskHandle s_widgetTestThread;
static bool s_isWidgetFileDirPathConfigured = false;
static char s_widgetFileDirPath[DJI_FILE_PATH_SIZE_MAX] = {0};
static const T_DjiWidgetHandlerListItem s_widgetHandlerList[] = {
{0, DJI_WIDGET_TYPE_BUTTON, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{1, DJI_WIDGET_TYPE_LIST, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{2, DJI_WIDGET_TYPE_SWITCH, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{3, DJI_WIDGET_TYPE_SCALE, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{4, DJI_WIDGET_TYPE_BUTTON, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{5, DJI_WIDGET_TYPE_SCALE, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{6, DJI_WIDGET_TYPE_INT_INPUT_BOX, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{7, DJI_WIDGET_TYPE_SWITCH, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{8, DJI_WIDGET_TYPE_LIST, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
};
static const char *s_widgetTypeNameArray[] = {
"Unknown",
"Button",
"Switch",
"Scale",
"List",
"Int input box"
};
static const uint32_t s_widgetHandlerListCount = sizeof(s_widgetHandlerList) / sizeof(T_DjiWidgetHandlerListItem);
static int32_t s_widgetValueList[sizeof(s_widgetHandlerList) / sizeof(T_DjiWidgetHandlerListItem)] = {0};
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_WidgetStartService(void)
{
T_DjiReturnCode djiStat;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
//Step 1 : Init DJI Widget
djiStat = DjiWidget_Init();
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Dji test widget init error, stat = 0x%08llX", djiStat);
return djiStat;
}
#ifdef SYSTEM_ARCH_LINUX
//Step 2 : Set UI Config (Linux environment)
char curFileDirPath[WIDGET_DIR_PATH_LEN_MAX];
char tempPath[WIDGET_DIR_PATH_LEN_MAX];
djiStat = DjiUserUtil_GetCurrentFileDirPath(__FILE__, WIDGET_DIR_PATH_LEN_MAX, curFileDirPath);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get file current path error, stat = 0x%08llX", djiStat);
return djiStat;
}
if (s_isWidgetFileDirPathConfigured == true) {
snprintf(tempPath, WIDGET_DIR_PATH_LEN_MAX, "%swidget_file/en_big_screen", s_widgetFileDirPath);
} else {
snprintf(tempPath, WIDGET_DIR_PATH_LEN_MAX, "%swidget_file/en_big_screen", curFileDirPath);
}
//set default ui config path
djiStat = DjiWidget_RegDefaultUiConfigByDirPath(tempPath);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Add default widget ui config error, stat = 0x%08llX", djiStat);
return djiStat;
}
//set ui config for English language
djiStat = DjiWidget_RegUiConfigByDirPath(DJI_MOBILE_APP_LANGUAGE_ENGLISH,
DJI_MOBILE_APP_SCREEN_TYPE_BIG_SCREEN,
tempPath);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Add widget ui config error, stat = 0x%08llX", djiStat);
return djiStat;
}
//set ui config for Chinese language
if (s_isWidgetFileDirPathConfigured == true) {
snprintf(tempPath, WIDGET_DIR_PATH_LEN_MAX, "%swidget_file/cn_big_screen", s_widgetFileDirPath);
} else {
snprintf(tempPath, WIDGET_DIR_PATH_LEN_MAX, "%swidget_file/cn_big_screen", curFileDirPath);
}
djiStat = DjiWidget_RegUiConfigByDirPath(DJI_MOBILE_APP_LANGUAGE_CHINESE,
DJI_MOBILE_APP_SCREEN_TYPE_BIG_SCREEN,
tempPath);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Add widget ui config error, stat = 0x%08llX", djiStat);
return djiStat;
}
#else
//Step 2 : Set UI Config (RTOS environment)
T_DjiWidgetBinaryArrayConfig enWidgetBinaryArrayConfig = {
.binaryArrayCount = g_EnBinaryArrayCount,
.fileBinaryArrayList = g_EnFileBinaryArrayList
};
//set default ui config
djiStat = DjiWidget_RegDefaultUiConfigByBinaryArray(&enWidgetBinaryArrayConfig);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Add default widget ui config error, stat = 0x%08llX", djiStat);
return djiStat;
}
#endif
//Step 3 : Set widget handler list
djiStat = DjiWidget_RegHandlerList(s_widgetHandlerList, s_widgetHandlerListCount);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Set widget handler list error, stat = 0x%08llX", djiStat);
return djiStat;
}
//Step 4 : Run widget api sample task
if (osalHandler->TaskCreate("user_widget_task", DjiTest_WidgetTask, WIDGET_TASK_STACK_SIZE, NULL,
&s_widgetTestThread) != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Dji widget test task create error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiTest_WidgetSetConfigFilePath(const char *path)
{
memset(s_widgetFileDirPath, 0, sizeof(s_widgetFileDirPath));
memcpy(s_widgetFileDirPath, path, USER_UTIL_MIN(strlen(path), sizeof(s_widgetFileDirPath) - 1));
s_isWidgetFileDirPathConfigured = true;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
__attribute__((weak)) void DjiTest_WidgetLogAppend(const char *fmt, ...)
{
}
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#pragma GCC diagnostic ignored "-Wformat"
#endif
/* Private functions definition-----------------------------------------------*/
static void *DjiTest_WidgetTask(void *arg)
{
char message[DJI_WIDGET_FLOATING_WINDOW_MSG_MAX_LEN];
uint32_t sysTimeMs = 0;
T_DjiReturnCode djiStat;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
USER_UTIL_UNUSED(arg);
while (1) {
djiStat = osalHandler->GetTimeMs(&sysTimeMs);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get system time ms error, stat = 0x%08llX", djiStat);
}
#ifndef USER_FIRMWARE_MAJOR_VERSION
snprintf(message, DJI_WIDGET_FLOATING_WINDOW_MSG_MAX_LEN, "System time : %u ms", sysTimeMs);
#else
snprintf(message, DJI_WIDGET_FLOATING_WINDOW_MSG_MAX_LEN,
"System time : %u ms\r\nVersion: v%02d.%02d.%02d.%02d\r\nBuild time: %s %s", sysTimeMs,
USER_FIRMWARE_MAJOR_VERSION, USER_FIRMWARE_MINOR_VERSION,
USER_FIRMWARE_MODIFY_VERSION, USER_FIRMWARE_DEBUG_VERSION,
__DATE__, __TIME__);
#endif
djiStat = DjiWidgetFloatingWindow_ShowMessage(message);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Floating window show message error, stat = 0x%08llX", djiStat);
}
osalHandler->TaskSleepMs(1000);
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
static T_DjiReturnCode DjiTestWidget_SetWidgetValue(E_DjiWidgetType widgetType, uint32_t index, int32_t value,
void *userData)
{
USER_UTIL_UNUSED(userData);
USER_LOG_INFO("Set widget value, widgetType = %s, widgetIndex = %d ,widgetValue = %d",
s_widgetTypeNameArray[widgetType], index, value);
s_widgetValueList[index] = value;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode DjiTestWidget_GetWidgetValue(E_DjiWidgetType widgetType, uint32_t index, int32_t *value,
void *userData)
{
USER_UTIL_UNUSED(userData);
USER_UTIL_UNUSED(widgetType);
*value = s_widgetValueList[index];
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,51 @@
/**
********************************************************************
* @file test_widget.h
* @brief This is the header file for "test_widget.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_WIDGET_H
#define TEST_WIDGET_H
/* Includes ------------------------------------------------------------------*/
#include <dji_typedef.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_WidgetStartService(void);
T_DjiReturnCode DjiTest_WidgetSetConfigFilePath(const char *path);
__attribute__((weak)) void DjiTest_WidgetLogAppend(const char *fmt, ...);
#ifdef __cplusplus
}
#endif
#endif // TEST_WIDGET_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,758 @@
/**
********************************************************************
* @file test_widget_speaker.c
* @brief
*
* @copyright (c) 2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#ifdef SYSTEM_ARCH_LINUX
#include "test_widget_speaker.h"
#include "dji_logger.h"
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include "utils/util_misc.h"
#include "utils/util_md5.h"
#include <dji_aircraft_info.h>
#ifdef OPUS_INSTALLED
#include <opus/opus.h>
#endif
/* Private constants ---------------------------------------------------------*/
#define WIDGET_SPEAKER_TASK_STACK_SIZE (2048)
/*! Attention: replace your audio device name here. */
#define WIDGET_SPEAKER_USB_AUDIO_DEVICE_NAME "alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo"
#define WIDGET_SPEAKER_AUDIO_OPUS_FILE_NAME "test_audio.opus"
#define WIDGET_SPEAKER_AUDIO_PCM_FILE_NAME "test_audio.pcm"
#define WIDGET_SPEAKER_TTS_FILE_NAME "test_tts.txt"
#define WIDGET_SPEAKER_TTS_OUTPUT_FILE_NAME "tts_audio.wav"
#define WIDGET_SPEAKER_TTS_FILE_MAX_SIZE (3000)
/* The frame size is hardcoded for this sample code but it doesn't have to be */
#define WIDGET_SPEAKER_AUDIO_OPUS_MAX_PACKET_SIZE (3 * 1276)
#define WIDGET_SPEAKER_AUDIO_OPUS_MAX_FRAME_SIZE (6 * 960)
#define WIDGET_SPEAKER_AUDIO_OPUS_SAMPLE_RATE (16000)
#define WIDGET_SPEAKER_AUDIO_OPUS_CHANNELS (1)
#define WIDGET_SPEAKER_AUDIO_OPUS_DECODE_FRAME_SIZE_8KBPS (40)
#define WIDGET_SPEAKER_AUDIO_OPUS_DECODE_BITRATE_8KBPS (8000)
/* The speaker initialization parameters */
#define WIDGET_SPEAKER_DEFAULT_VOLUME (30)
#define EKHO_INSTALLED (1)
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
static T_DjiWidgetSpeakerHandler s_speakerHandler = {0};
static T_DjiMutexHandle s_speakerMutex = {0};
static T_DjiWidgetSpeakerState s_speakerState = {0};
static T_DjiTaskHandle s_widgetSpeakerTestThread;
static FILE *s_audioFile = NULL;
static FILE *s_ttsFile = NULL;
static bool s_isDecodeFinished = true;
static uint16_t s_decodeBitrate = 0;
/* Private functions declaration ---------------------------------------------*/
static void SetSpeakerState(E_DjiWidgetSpeakerState speakerState);
static T_DjiReturnCode GetSpeakerState(T_DjiWidgetSpeakerState *speakerState);
static T_DjiReturnCode SetWorkMode(E_DjiWidgetSpeakerWorkMode workMode);
static T_DjiReturnCode SetPlayMode(E_DjiWidgetSpeakerPlayMode playMode);
static T_DjiReturnCode StartPlay(void);
static T_DjiReturnCode StopPlay(void);
static T_DjiReturnCode SetVolume(uint8_t volume);
static T_DjiReturnCode ReceiveTtsData(E_DjiWidgetTransmitDataEvent event,
uint32_t offset, uint8_t *buf, uint16_t size);
static T_DjiReturnCode ReceiveAudioData(E_DjiWidgetTransmitDataEvent event,
uint32_t offset, uint8_t *buf, uint16_t size);
static void *DjiTest_WidgetSpeakerTask(void *arg);
static uint32_t DjiTest_GetVoicePlayProcessId(void);
static uint32_t DjiTest_KillVoicePlayProcess(uint32_t pid);
static T_DjiReturnCode DjiTest_DecodeAudioData(void);
static T_DjiReturnCode DjiTest_PlayAudioData(void);
static T_DjiReturnCode DjiTest_PlayTtsData(void);
static T_DjiReturnCode DjiTest_CheckFileMd5Sum(const char *path, uint8_t *buf, uint16_t size);
/* Exported functions definition ---------------------------------------------*/
T_DjiReturnCode DjiTest_WidgetSpeakerStartService(void)
{
T_DjiReturnCode returnCode;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
s_speakerHandler.GetSpeakerState = GetSpeakerState;
s_speakerHandler.SetWorkMode = SetWorkMode;
s_speakerHandler.StartPlay = StartPlay;
s_speakerHandler.StopPlay = StopPlay;
s_speakerHandler.SetPlayMode = SetPlayMode;
s_speakerHandler.SetVolume = SetVolume;
s_speakerHandler.ReceiveTtsData = ReceiveTtsData;
s_speakerHandler.ReceiveVoiceData = ReceiveAudioData;
returnCode = osalHandler->MutexCreate(&s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Create speaker mutex error: 0x%08llX", returnCode);
return returnCode;
}
returnCode = DjiWidget_RegSpeakerHandler(&s_speakerHandler);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Register speaker handler error: 0x%08llX", returnCode);
return returnCode;
}
returnCode = osalHandler->MutexLock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("lock mutex error: 0x%08llX.", returnCode);
return returnCode;
}
s_speakerState.state = DJI_WIDGET_SPEAKER_STATE_IDEL;
s_speakerState.workMode = DJI_WIDGET_SPEAKER_WORK_MODE_VOICE;
s_speakerState.playMode = DJI_WIDGET_SPEAKER_PLAY_MODE_SINGLE_PLAY;
returnCode = osalHandler->MutexUnlock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("unlock mutex error: 0x%08llX.", returnCode);
return returnCode;
}
returnCode = SetVolume(WIDGET_SPEAKER_DEFAULT_VOLUME);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Set speaker volume error: 0x%08llX", returnCode);
return returnCode;
}
if (osalHandler->TaskCreate("user_widget_speaker_task", DjiTest_WidgetSpeakerTask, WIDGET_SPEAKER_TASK_STACK_SIZE,
NULL,
&s_widgetSpeakerTestThread) != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Dji widget speaker test task create error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
static uint32_t DjiTest_GetVoicePlayProcessId(void)
{
FILE *fp;
char cmdStr[128];
uint32_t pid;
int ret;
snprintf(cmdStr, 128, "pgrep ffplay");
fp = popen(cmdStr, "r");
if (fp == NULL) {
USER_LOG_ERROR("fp is null.");
return 0;
}
ret = fscanf(fp, "%u", &pid);
if (ret <= 0) {
pid = 0;
goto out;
}
out:
pclose(fp);
return pid;
}
static uint32_t DjiTest_KillVoicePlayProcess(uint32_t pid)
{
FILE *fp;
char cmdStr[128];
snprintf(cmdStr, 128, "kill %d", pid);
fp = popen(cmdStr, "r");
if (fp == NULL) {
USER_LOG_ERROR("fp is null.");
return 0;
}
pclose(fp);
return pid;
}
static T_DjiReturnCode DjiTest_DecodeAudioData(void)
{
#ifdef OPUS_INSTALLED
FILE *fin;
FILE *fout;
OpusDecoder *decoder;
opus_int16 out[WIDGET_SPEAKER_AUDIO_OPUS_MAX_FRAME_SIZE * WIDGET_SPEAKER_AUDIO_OPUS_CHANNELS];
uint8_t cbits[WIDGET_SPEAKER_AUDIO_OPUS_MAX_PACKET_SIZE];
int32_t nbBytes;
int32_t err;
/*! Attention: you can use "ffmpeg -i xxx.mp3 -ar 16000 -ac 1 out.wav" and use opus-tools to generate opus file for test */
fin = fopen(WIDGET_SPEAKER_AUDIO_OPUS_FILE_NAME, "r");
if (fin == NULL) {
fprintf(stderr, "failed to open input file: %s\n", strerror(errno));
return EXIT_FAILURE;
}
/* Create a new decoder state. */
decoder = opus_decoder_create(WIDGET_SPEAKER_AUDIO_OPUS_SAMPLE_RATE, WIDGET_SPEAKER_AUDIO_OPUS_CHANNELS, &err);
if (err < 0) {
fprintf(stderr, "failed to create decoder: %s\n", opus_strerror(err));
return EXIT_FAILURE;
}
fout = fopen(WIDGET_SPEAKER_AUDIO_PCM_FILE_NAME, "w");
if (fout == NULL) {
fprintf(stderr, "failed to open output file: %s\n", strerror(errno));
return EXIT_FAILURE;
}
while (1) {
int i;
unsigned char pcm_bytes[WIDGET_SPEAKER_AUDIO_OPUS_MAX_FRAME_SIZE * WIDGET_SPEAKER_AUDIO_OPUS_CHANNELS * 2];
int frame_size;
/* Read a 16 bits/sample audio frame. */
nbBytes = fread(cbits, 1, s_decodeBitrate / WIDGET_SPEAKER_AUDIO_OPUS_DECODE_BITRATE_8KBPS *
WIDGET_SPEAKER_AUDIO_OPUS_DECODE_FRAME_SIZE_8KBPS, fin);
if (feof(fin))
break;
/* Decode the data. In this example, frame_size will be constant because
the encoder is using a constant frame size. However, that may not
be the case for all encoders, so the decoder must always check
the frame size returned. */
frame_size = opus_decode(decoder, cbits, nbBytes, out, WIDGET_SPEAKER_AUDIO_OPUS_MAX_FRAME_SIZE, 0);
if (frame_size < 0) {
fprintf(stderr, "decoder failed: %s\n", opus_strerror(frame_size));
return EXIT_FAILURE;
}
USER_LOG_DEBUG("decode data to file: %d\r\n", frame_size * WIDGET_SPEAKER_AUDIO_OPUS_CHANNELS);
/* Convert to little-endian ordering. */
for (i = 0; i < WIDGET_SPEAKER_AUDIO_OPUS_CHANNELS * frame_size; i++) {
pcm_bytes[2 * i] = out[i] & 0xFF;
pcm_bytes[2 * i + 1] = (out[i] >> 8) & 0xFF;
}
/* Write the decoded audio to file. */
fwrite(pcm_bytes, sizeof(short), frame_size * WIDGET_SPEAKER_AUDIO_OPUS_CHANNELS, fout);
}
/*Destroy the encoder state*/
opus_decoder_destroy(decoder);
fclose(fin);
fclose(fout);
USER_LOG_INFO("Decode Finished...");
s_isDecodeFinished = true;
#endif
return EXIT_SUCCESS;
}
static T_DjiReturnCode DjiTest_PlayAudioData(void)
{
char cmdStr[128];
memset(cmdStr, 0, sizeof(cmdStr));
USER_LOG_INFO("Start Playing...");
snprintf(cmdStr, sizeof(cmdStr), "ffplay -nodisp -autoexit -ar 16000 -ac 1 -f s16le -i %s 2>/dev/null",
WIDGET_SPEAKER_AUDIO_PCM_FILE_NAME);
return DjiUserUtil_RunSystemCmd(cmdStr);
}
static T_DjiReturnCode DjiTest_PlayTtsData(void)
{
FILE *txtFile;
uint8_t data[WIDGET_SPEAKER_TTS_FILE_MAX_SIZE] = {0};
int32_t readLen;
char cmdStr[WIDGET_SPEAKER_TTS_FILE_MAX_SIZE + 128];
T_DjiAircraftInfoBaseInfo aircraftInfoBaseInfo;
T_DjiReturnCode returnCode;
returnCode = DjiAircraftInfo_GetBaseInfo(&aircraftInfoBaseInfo);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get aircraft base info error");
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
if (aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3E ||
aircraftInfoBaseInfo.aircraftType == DJI_AIRCRAFT_TYPE_M3T) {
return DjiTest_PlayAudioData();
} else {
txtFile = fopen(WIDGET_SPEAKER_TTS_FILE_NAME, "r");
if (txtFile == NULL) {
fprintf(stderr, "failed to open input file: %s\n", strerror(errno));
return EXIT_FAILURE;
}
readLen = fread(data, 1, WIDGET_SPEAKER_TTS_FILE_MAX_SIZE, txtFile);
if (readLen <= 0) {
USER_LOG_ERROR("Read tts file failed, error code: %d", readLen);
fclose(txtFile);
return DJI_ERROR_SYSTEM_MODULE_CODE_NOT_FOUND;
}
fclose(txtFile);
USER_LOG_INFO("Read tts file success, len: %d", readLen);
USER_LOG_INFO("Content: %s", data);
memset(cmdStr, 0, sizeof(cmdStr));
SetSpeakerState(DJI_WIDGET_SPEAKER_STATE_IN_TTS_CONVERSION);
#if EKHO_INSTALLED
/*! Attention: you can use other tts opensource function to convert txt to speech, example used ekho v7.5 */
snprintf(cmdStr, sizeof(cmdStr), " ekho %s -s 20 -p 20 -a 100 -o %s", data,
WIDGET_SPEAKER_TTS_OUTPUT_FILE_NAME);
#else
USER_LOG_WARN(
"Ekho is not installed, please visit https://www.eguidedog.net/ekho.php to install it or use other TTS tools to convert audio");
#endif
DjiUserUtil_RunSystemCmd(cmdStr);
SetSpeakerState(DJI_WIDGET_SPEAKER_STATE_PLAYING);
USER_LOG_INFO("Start TTS Playing...");
memset(cmdStr, 0, sizeof(cmdStr));
snprintf(cmdStr, sizeof(cmdStr), "ffplay -nodisp -autoexit -ar 16000 -ac 1 -f s16le -i %s 2>/dev/null",
WIDGET_SPEAKER_TTS_OUTPUT_FILE_NAME);
return DjiUserUtil_RunSystemCmd(cmdStr);
}
}
static T_DjiReturnCode DjiTest_CheckFileMd5Sum(const char *path, uint8_t *buf, uint16_t size)
{
MD5_CTX md5Ctx;
uint32_t readFileTotalSize = 0;
uint16_t readLen;
T_DjiReturnCode returnCode;
uint8_t readBuf[1024];
uint8_t md5Sum[16];
FILE *file = NULL;;
UtilMd5_Init(&md5Ctx);
file = fopen(path, "rb");
if (file == NULL) {
USER_LOG_ERROR("Open tts file error.");
}
while (1) {
returnCode = fseek(file, readFileTotalSize, SEEK_SET);
if (returnCode != 0) {
USER_LOG_INFO("fseek file error");
}
readLen = fread(readBuf, 1, sizeof(readBuf), file);
if (readLen > 0) {
readFileTotalSize += readLen;
UtilMd5_Update(&md5Ctx, readBuf, readLen);
}
if (feof(file))
break;
}
UtilMd5_Final(&md5Ctx, md5Sum);
fclose(file);
if (size == sizeof(md5Sum)) {
if (memcmp(md5Sum, buf, sizeof(md5Sum)) == 0) {
USER_LOG_INFO("MD5 sum check success");
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
} else {
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
} else {
USER_LOG_ERROR("MD5 sum length error");
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static void SetSpeakerState(E_DjiWidgetSpeakerState speakerState)
{
T_DjiReturnCode returnCode;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
returnCode = osalHandler->MutexLock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("lock mutex error: 0x%08llX.", returnCode);
}
s_speakerState.state = speakerState;
returnCode = osalHandler->MutexUnlock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("unlock mutex error: 0x%08llX.", returnCode);
}
}
static T_DjiReturnCode GetSpeakerState(T_DjiWidgetSpeakerState *speakerState)
{
T_DjiReturnCode returnCode;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
returnCode = osalHandler->MutexLock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("lock mutex error: 0x%08llX.", returnCode);
return returnCode;
}
*speakerState = s_speakerState;
returnCode = osalHandler->MutexUnlock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("unlock mutex error: 0x%08llX.", returnCode);
return returnCode;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode SetWorkMode(E_DjiWidgetSpeakerWorkMode workMode)
{
T_DjiReturnCode returnCode;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
returnCode = osalHandler->MutexLock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("lock mutex error: 0x%08llX.", returnCode);
return returnCode;
}
USER_LOG_INFO("Set widget speaker work mode: %d", workMode);
s_speakerState.workMode = workMode;
returnCode = osalHandler->MutexUnlock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("unlock mutex error: 0x%08llX.", returnCode);
return returnCode;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode SetPlayMode(E_DjiWidgetSpeakerPlayMode playMode)
{
T_DjiReturnCode returnCode;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
returnCode = osalHandler->MutexLock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("lock mutex error: 0x%08llX.", returnCode);
return returnCode;
}
USER_LOG_INFO("Set widget speaker play mode: %d", playMode);
s_speakerState.playMode = playMode;
returnCode = osalHandler->MutexUnlock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("unlock mutex error: 0x%08llX.", returnCode);
return returnCode;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode StartPlay(void)
{
uint32_t pid;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
pid = DjiTest_GetVoicePlayProcessId();
if (pid != 0) {
DjiTest_KillVoicePlayProcess(pid);
}
osalHandler->TaskSleepMs(5);
USER_LOG_INFO("Start widget speaker play");
SetSpeakerState(DJI_WIDGET_SPEAKER_STATE_PLAYING);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode StopPlay(void)
{
T_DjiReturnCode returnCode;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
uint32_t pid;
returnCode = osalHandler->MutexLock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("lock mutex error: 0x%08llX.", returnCode);
return returnCode;
}
USER_LOG_INFO("Stop widget speaker play");
s_speakerState.state = DJI_WIDGET_SPEAKER_STATE_IDEL;
pid = DjiTest_GetVoicePlayProcessId();
if (pid != 0) {
DjiTest_KillVoicePlayProcess(pid);
}
returnCode = osalHandler->MutexUnlock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("unlock mutex error: 0x%08llX.", returnCode);
return returnCode;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode SetVolume(uint8_t volume)
{
T_DjiReturnCode returnCode;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
char cmdStr[128];
int32_t ret = 0;
float realVolume;
returnCode = osalHandler->MutexLock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("lock mutex error: 0x%08llX.", returnCode);
return returnCode;
}
realVolume = 1.5f * (float) volume;
s_speakerState.volume = volume;
USER_LOG_INFO("Set widget speaker volume: %d", volume);
#ifdef PLATFORM_ARCH_x86_64
snprintf(cmdStr, sizeof(cmdStr), "pactl list | grep %s -q", WIDGET_SPEAKER_USB_AUDIO_DEVICE_NAME);
ret = system(cmdStr);
if (ret == DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
memset(cmdStr, 0, sizeof(cmdStr));
snprintf(cmdStr, sizeof(cmdStr), "pactl set-sink-volume %s %d%%", WIDGET_SPEAKER_USB_AUDIO_DEVICE_NAME,
(int32_t) realVolume);
returnCode = DjiUserUtil_RunSystemCmd(cmdStr);
if (returnCode < 0) {
USER_LOG_ERROR("Set widget speaker volume error: %d", ret);
}
} else {
USER_LOG_WARN("No audio device found, please add audio device and init speaker volume here!!!");
}
#else
USER_LOG_WARN("No audio device found, please add audio device and init speaker volume here!!!");
#endif
returnCode = osalHandler->MutexUnlock(s_speakerMutex);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("unlock mutex error: 0x%08llX.", returnCode);
return returnCode;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode ReceiveTtsData(E_DjiWidgetTransmitDataEvent event,
uint32_t offset, uint8_t *buf, uint16_t size)
{
uint16_t writeLen;
T_DjiReturnCode returnCode;
if (event == DJI_WIDGET_TRANSMIT_DATA_EVENT_START) {
USER_LOG_INFO("Create tts file.");
s_ttsFile = fopen(WIDGET_SPEAKER_TTS_FILE_NAME, "wb");
if (s_ttsFile == NULL) {
USER_LOG_ERROR("Open tts file error.");
}
if (s_speakerState.state != DJI_WIDGET_SPEAKER_STATE_PLAYING) {
SetSpeakerState(DJI_WIDGET_SPEAKER_STATE_TRANSMITTING);
}
} else if (event == DJI_WIDGET_TRANSMIT_DATA_EVENT_TRANSMIT) {
USER_LOG_INFO("Transmit tts file, offset: %d, size: %d", offset, size);
if (s_ttsFile != NULL) {
fseek(s_ttsFile, offset, SEEK_SET);
writeLen = fwrite(buf, 1, size, s_ttsFile);
if (writeLen != size) {
USER_LOG_ERROR("Write tts file error %d", writeLen);
}
}
if (s_speakerState.state != DJI_WIDGET_SPEAKER_STATE_PLAYING) {
SetSpeakerState(DJI_WIDGET_SPEAKER_STATE_TRANSMITTING);
}
} else if (event == DJI_WIDGET_TRANSMIT_DATA_EVENT_FINISH) {
USER_LOG_INFO("Close tts file.");
if (s_ttsFile != NULL) {
fclose(s_ttsFile);
}
returnCode = DjiTest_CheckFileMd5Sum(WIDGET_SPEAKER_TTS_FILE_NAME, buf, size);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("File md5 sum check failed");
}
if (s_speakerState.state != DJI_WIDGET_SPEAKER_STATE_PLAYING) {
SetSpeakerState(DJI_WIDGET_SPEAKER_STATE_IDEL);
}
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode ReceiveAudioData(E_DjiWidgetTransmitDataEvent event,
uint32_t offset, uint8_t *buf, uint16_t size)
{
uint16_t writeLen;
T_DjiReturnCode returnCode;
T_DjiWidgetTransDataContent transDataContent = {0};
if (event == DJI_WIDGET_TRANSMIT_DATA_EVENT_START) {
s_isDecodeFinished = false;
USER_LOG_INFO("Create voice file.");
s_audioFile = fopen(WIDGET_SPEAKER_AUDIO_OPUS_FILE_NAME, "wb");
if (s_audioFile == NULL) {
USER_LOG_ERROR("Create tts file error.");
}
if (s_speakerState.state != DJI_WIDGET_SPEAKER_STATE_PLAYING) {
SetSpeakerState(DJI_WIDGET_SPEAKER_STATE_TRANSMITTING);
}
memcpy(&transDataContent, buf, size);
s_decodeBitrate = transDataContent.transDataStartContent.fileDecodeBitrate;
USER_LOG_INFO("Create voice file: %s, decoder bitrate: %d.", transDataContent.transDataStartContent.fileName,
transDataContent.transDataStartContent.fileDecodeBitrate);
} else if (event == DJI_WIDGET_TRANSMIT_DATA_EVENT_TRANSMIT) {
USER_LOG_INFO("Transmit voice file, offset: %d, size: %d", offset, size);
if (s_audioFile != NULL) {
fseek(s_audioFile, offset, SEEK_SET);
writeLen = fwrite(buf, 1, size, s_audioFile);
if (writeLen != size) {
USER_LOG_ERROR("Write tts file error %d", writeLen);
}
}
if (s_speakerState.state != DJI_WIDGET_SPEAKER_STATE_PLAYING) {
SetSpeakerState(DJI_WIDGET_SPEAKER_STATE_TRANSMITTING);
}
} else if (event == DJI_WIDGET_TRANSMIT_DATA_EVENT_FINISH) {
USER_LOG_INFO("Close voice file.");
if (s_audioFile != NULL) {
fclose(s_audioFile);
}
returnCode = DjiTest_CheckFileMd5Sum(WIDGET_SPEAKER_AUDIO_OPUS_FILE_NAME, buf, size);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("File md5 sum check failed");
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
if (s_speakerState.state != DJI_WIDGET_SPEAKER_STATE_PLAYING) {
SetSpeakerState(DJI_WIDGET_SPEAKER_STATE_IDEL);
}
DjiTest_DecodeAudioData();
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *DjiTest_WidgetSpeakerTask(void *arg)
{
T_DjiReturnCode djiReturnCode;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
USER_UTIL_UNUSED(arg);
while (1) {
osalHandler->TaskSleepMs(10);
if (s_speakerState.state == DJI_WIDGET_SPEAKER_STATE_PLAYING) {
if (s_speakerState.playMode == DJI_WIDGET_SPEAKER_PLAY_MODE_LOOP_PLAYBACK) {
if (s_speakerState.workMode == DJI_WIDGET_SPEAKER_WORK_MODE_VOICE) {
USER_LOG_DEBUG("Waiting opus decoder finished...");
while (s_isDecodeFinished == false) {
osalHandler->TaskSleepMs(1);
}
djiReturnCode = DjiTest_PlayAudioData();
if (djiReturnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Play audio data failed, error: 0x%08llX.", djiReturnCode);
}
} else {
djiReturnCode = DjiTest_PlayTtsData();
if (djiReturnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Play tts data failed, error: 0x%08llX.", djiReturnCode);
}
}
osalHandler->TaskSleepMs(1000);
} else {
if (s_speakerState.workMode == DJI_WIDGET_SPEAKER_WORK_MODE_VOICE) {
USER_LOG_DEBUG("Waiting opus decoder finished...");
while (s_isDecodeFinished == false) {
osalHandler->TaskSleepMs(1);
}
djiReturnCode = DjiTest_PlayAudioData();
if (djiReturnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Play audio data failed, error: 0x%08llX.", djiReturnCode);
}
} else {
djiReturnCode = DjiTest_PlayTtsData();
if (djiReturnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Play tts data failed, error: 0x%08llX.", djiReturnCode);
}
}
djiReturnCode = osalHandler->MutexLock(s_speakerMutex);
if (djiReturnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("lock mutex error: 0x%08llX.", djiReturnCode);
}
if (s_speakerState.playMode == DJI_WIDGET_SPEAKER_PLAY_MODE_SINGLE_PLAY) {
s_speakerState.state = DJI_WIDGET_SPEAKER_STATE_IDEL;
}
djiReturnCode = osalHandler->MutexUnlock(s_speakerMutex);
if (djiReturnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("unlock mutex error: 0x%08llX.", djiReturnCode);
}
}
}
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,53 @@
/**
********************************************************************
* @file test_widget_speaker.h
* @brief This is the header file for "test_widget_speaker.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_WIDGET_SPEAKER_H
#define TEST_WIDGET_SPEAKER_H
/* Includes ------------------------------------------------------------------*/
#include "dji_widget.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef SYSTEM_ARCH_LINUX
/* Exported constants --------------------------------------------------------*/
T_DjiReturnCode DjiTest_WidgetSpeakerStartService(void);
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
#endif
#ifdef __cplusplus
}
#endif
#endif // TEST_WIDGET_SPEAKER_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,148 @@
{
"version": {
"major": 1,
"minor": 0
},
"main_interface": {
"floating_window": {
"is_enable": true
},
"speaker": {
"is_enable_tts": true,
"is_enable_voice": true
},
"widget_list": [
{
"widget_index": 0,
"widget_type": "button",
"widget_name": "按钮",
"icon_file_set": {
"icon_file_name_selected": "icon_button1.png",
"icon_file_name_unselected": "icon_button1.png"
},
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 0
}
},
{
"widget_index": 1,
"widget_type": "list",
"widget_name": "列表",
"list_item": [
{
"item_name": "选项_1",
"icon_file_set": {
"icon_file_name_selected": "icon_list_item1.png",
"icon_file_name_unselected": "icon_list_item1.png"
}
},
{
"item_name": "选项_2",
"icon_file_set": {
"icon_file_name_selected": "icon_list_item2.png",
"icon_file_name_unselected": "icon_list_item2.png"
}
}
],
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 1
}
},
{
"widget_index": 2,
"widget_type": "switch",
"widget_name": "开关",
"icon_file_set": {
"icon_file_name_selected": "icon_switch_select.png",
"icon_file_name_unselected": "icon_switch_unselect.png"
},
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 2
}
},
{
"widget_index": 3,
"widget_type": "scale",
"widget_name": "范围条",
"icon_file_set": {
"icon_file_name_selected": "icon_scale.png",
"icon_file_name_unselected": "icon_scale.png"
},
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 3,
"button_value_step_length": 5
}
}
]
},
"config_interface": {
"text_input_box": {
"widget_name": "文本输入框",
"placeholder_text": "请输入消息",
"is_enable": true
},
"widget_list": [
{
"widget_index": 4,
"widget_type": "button",
"widget_name": "按钮 4",
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 4
}
},
{
"widget_index": 5,
"widget_type": "scale",
"widget_name": "范围条 5",
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 5,
"button_value_step_length": 5
}
},
{
"widget_index": 6,
"widget_type": "int_input_box",
"widget_name": "整形值输入框 6",
"int_input_box_hint": "unit:s"
},
{
"widget_index": 7,
"widget_type": "switch",
"widget_name": "开关 7",
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 7
}
},
{
"widget_index": 8,
"widget_type": "list",
"widget_name": "列表 8",
"list_item": [
{
"item_name": "选项 1"
},
{
"item_name": "选项 2"
},
{
"item_name": "选项 3"
},
{
"item_name": "选项 4"
}
],
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 8
}
}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,148 @@
{
"version": {
"major": 1,
"minor": 0
},
"main_interface": {
"floating_window": {
"is_enable": true
},
"speaker": {
"is_enable_tts": true,
"is_enable_voice": true
},
"widget_list": [
{
"widget_index": 0,
"widget_type": "button",
"widget_name": "Button",
"icon_file_set": {
"icon_file_name_selected": "icon_button1.png",
"icon_file_name_unselected": "icon_button1.png"
},
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 0
}
},
{
"widget_index": 1,
"widget_type": "list",
"widget_name": "List",
"list_item": [
{
"item_name": "Item_1",
"icon_file_set": {
"icon_file_name_selected": "icon_list_item1.png",
"icon_file_name_unselected": "icon_list_item1.png"
}
},
{
"item_name": "Item_2",
"icon_file_set": {
"icon_file_name_selected": "icon_list_item2.png",
"icon_file_name_unselected": "icon_list_item2.png"
}
}
],
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 1
}
},
{
"widget_index": 2,
"widget_type": "switch",
"widget_name": "Switch",
"icon_file_set": {
"icon_file_name_selected": "icon_switch_select.png",
"icon_file_name_unselected": "icon_switch_unselect.png"
},
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 2
}
},
{
"widget_index": 3,
"widget_type": "scale",
"widget_name": "Scale",
"icon_file_set": {
"icon_file_name_selected": "icon_scale.png",
"icon_file_name_unselected": "icon_scale.png"
},
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 3,
"button_value_step_length": 5
}
}
]
},
"config_interface": {
"text_input_box": {
"widget_name": "TextInputBox",
"placeholder_text": "Please input message",
"is_enable": true
},
"widget_list": [
{
"widget_index": 4,
"widget_type": "button",
"widget_name": "Button 4",
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 4
}
},
{
"widget_index": 5,
"widget_type": "scale",
"widget_name": "Scale 5",
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 5,
"button_value_step_length": 5
}
},
{
"widget_index": 6,
"widget_type": "int_input_box",
"widget_name": "Integer Input Box 6",
"int_input_box_hint": "unit:s"
},
{
"widget_index": 7,
"widget_type": "switch",
"widget_name": "Switch 7",
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 7
}
},
{
"widget_index": 8,
"widget_type": "list",
"widget_name": "List 8",
"list_item": [
{
"item_name": "Item 1"
},
{
"item_name": "Item 2"
},
{
"item_name": "Item 3"
},
{
"item_name": "Item 4"
}
],
"customize_rc_buttons_config": {
"is_enable": true,
"mapping_config_display_order": 8
}
}
]
}
}

View File

@ -0,0 +1,148 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_button1_png_h_included
#define __icon_button1_png_h_included
#include <stdint.h>
/* Contents of file icon_button1.png */
#define icon_button1_png_fileName "icon_button1.png"
#define icon_button1_png_fileSize 2137
static const uint8_t icon_button1_png_fileBinaryArray[2137] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
0x08, 0x13, 0x49, 0x44, 0x41, 0x54, 0x78, 0x01, 0xED, 0x9D, 0x3D, 0x6F, 0x14, 0x47, 0x18, 0xC7,
0xCF, 0x6F, 0x98, 0x84, 0x18, 0x04, 0xB2, 0xD2, 0x44, 0x89, 0x84, 0x15, 0x0B, 0x24, 0x8B, 0x86,
0x32, 0x1F, 0xC0, 0x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x1E,
0x8F, 0xDB, 0xD1, 0xF4, 0x5C, 0xB8, 0xB8, 0xFF, 0xA8, 0xB5, 0x43, 0xB8, 0x45, 0xF7, 0x16, 0x8F,
0xC7, 0xED, 0xDC, 0xE6, 0x7F, 0xAF, 0x38, 0x18, 0xCE, 0x87, 0x25, 0x84, 0x3F, 0x00, 0x00, 0x00,
0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
};
#endif /* __icon_button1_png_h_included */

View File

@ -0,0 +1,147 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_button2_png_h_included
#define __icon_button2_png_h_included
#include <stdint.h>
/* Contents of file icon_button2.png */
#define icon_button2_png_fileName "icon_button2.png"
#define icon_button2_png_fileSize 2114
static const uint8_t icon_button2_png_fileBinaryArray[2114] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
0x07, 0xFC, 0x49, 0x44, 0x41, 0x54, 0x78, 0x01, 0xED, 0x9D, 0x3D, 0x6F, 0x14, 0x47, 0x18, 0xC7,
0xCF, 0x36, 0xC6, 0x24, 0xC4, 0x20, 0x90, 0x95, 0x26, 0x4A, 0x24, 0xAC, 0x58, 0x20, 0x21, 0x1A,
0xCA, 0x7C, 0x00, 0x40, 0x8A, 0xF2, 0x31, 0x80, 0x9A, 0x02, 0x85, 0xA0, 0x54, 0x51, 0x0A, 0xA8,
0x53, 0x05, 0xBE, 0x00, 0x25, 0x85, 0x53, 0x80, 0xD2, 0xA6, 0x8A, 0x28, 0x23, 0x41, 0x83, 0x95,
0x14, 0x96, 0x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x16, 0x0B, 0x60, 0xCD, 0xBB, 0x49, 0xFF, 0xE3,
0x39, 0x76, 0x4A, 0x0F, 0x0E, 0x49, 0xF1, 0x05, 0x00, 0x8F, 0x43, 0xAC, 0xC0, 0xCB, 0x5A, 0x53,
0x48, 0x87, 0x1D, 0xBE, 0xEE, 0x33, 0xE6, 0x45, 0x19, 0x5E, 0xB2, 0x02, 0x9D, 0x5A, 0x8D, 0x11,
0xD3, 0xE0, 0x23, 0x06, 0xA6, 0x32, 0x36, 0xCD, 0xDA, 0xED, 0x02, 0x2E, 0x1B, 0xCF, 0xD1, 0xE2,
0xBA, 0x64, 0x03, 0xC4, 0x02, 0xBE, 0x04, 0x90, 0xD5, 0xA9, 0xA0, 0x9E, 0x66, 0x18, 0xD1, 0x36,
0xF0, 0xCC, 0x4E, 0x81, 0xA6, 0x42, 0xC4, 0x75, 0xCD, 0xD7, 0x1C, 0xEA, 0x5D, 0x4C, 0x82, 0xCB,
0xBD, 0xAB, 0x5C, 0x65, 0xD5, 0x1F, 0xDB, 0x01, 0x01, 0xE8, 0x24, 0x09, 0xAA, 0x6C, 0xDA, 0x56,
0xD5, 0x1E, 0x26, 0x76, 0xF0, 0x47, 0xD8, 0xC9, 0xC5, 0x7D, 0x0B, 0x3C, 0xD5, 0xB4, 0x3D, 0x6D,
0x0B, 0x53, 0x62, 0x90, 0xA1, 0x21, 0xF9, 0x91, 0xF6, 0xA7, 0xF5, 0x64, 0x78, 0x29, 0x5C, 0xDA,
0x7E, 0xD8, 0xEA, 0x31, 0xDC, 0xAA, 0x7B, 0x4B, 0xFB, 0xD3, 0x7A, 0x39, 0xE7, 0x7F, 0xF1, 0x70,
0x18, 0xCE, 0xAA, 0xDB, 0xB2, 0x97, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42,
0x60, 0x82
};
#endif /* __icon_button2_png_h_included */

View File

@ -0,0 +1,174 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_list_item1_png_h_included
#define __icon_list_item1_png_h_included
#include <stdint.h>
/* Contents of file icon_list_item1.png */
#define icon_list_item1_png_fileName "icon_list_item1.png"
#define icon_list_item1_png_fileSize 2556
static const uint8_t icon_list_item1_png_fileBinaryArray[2556] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
0x09, 0xB6, 0x49, 0x44, 0x41, 0x54, 0x78, 0x01, 0xED, 0x9D, 0x4B, 0x68, 0x14, 0x49, 0x18, 0xC7,
0x2B, 0xC9, 0x26, 0x46, 0xB3, 0x9A, 0xB8, 0x6A, 0x7C, 0xC1, 0x62, 0x2E, 0x6A, 0x50, 0x04, 0x89,
0x28, 0x22, 0x88, 0x08, 0x2E, 0x01, 0x41, 0x51, 0x41, 0x0F, 0x1E, 0x3C, 0x88, 0x37, 0x1F, 0xE0,
0x12, 0xF1, 0xA2, 0x07, 0xBD, 0x99, 0xC3, 0xFA, 0x3A, 0x09, 0x1E, 0x3C, 0x78, 0x50, 0x50, 0x51,
0x10, 0xDC, 0x0D, 0x78, 0x8A, 0x07, 0xD1, 0xF8, 0xC6, 0x9B, 0xE0, 0x1E, 0x7C, 0x67, 0x91, 0x2C,
0x79, 0x98, 0x87, 0x66, 0xEB, 0x5F, 0x99, 0x7F, 0x6F, 0x75, 0x4D, 0x4D, 0x66, 0x7A, 0x3A, 0xFD,
0x98, 0x99, 0xFA, 0xA0, 0xE6, 0xAB, 0xC7, 0x57, 0x55, 0x5D, 0xBF, 0xAF, 0xAB, 0xBA, 0x67, 0xBA,
0x66, 0xA6, 0x4A, 0xE4, 0x96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0x8D,
0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
};
#endif /* __icon_list_item1_png_h_included */

View File

@ -0,0 +1,176 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_list_item2_png_h_included
#define __icon_list_item2_png_h_included
#include <stdint.h>
/* Contents of file icon_list_item2.png */
#define icon_list_item2_png_fileName "icon_list_item2.png"
#define icon_list_item2_png_fileSize 2578
static const uint8_t icon_list_item2_png_fileBinaryArray[2578] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
0x09, 0xCC, 0x49, 0x44, 0x41, 0x54, 0x78, 0x01, 0xED, 0x9D, 0x59, 0x68, 0x14, 0x49, 0x18, 0xC7,
0xBF, 0x1C, 0x26, 0x1B, 0xB3, 0x6E, 0xE2, 0xAA, 0xF1, 0x24, 0x1A, 0x11, 0xE2, 0x7A, 0xA0, 0x10,
0x51, 0x44, 0x41, 0xF1, 0x61, 0x09, 0x28, 0x22, 0x2A, 0xE2, 0x83, 0xA2, 0x22, 0xA2, 0x3E, 0x2F,
0xAB, 0xA0, 0x20, 0x88, 0x20, 0xE8, 0x2A, 0xFB, 0xEA, 0x8B, 0x88, 0xE0, 0x93, 0x17, 0xE2, 0x85,
0xEB, 0x3E, 0xA8, 0xB8, 0xA0, 0x08, 0x8B, 0xE2, 0x01, 0xE2, 0x83, 0xB8, 0x88, 0x77, 0x44, 0x13,
0x93, 0x68, 0xEE, 0xAD, 0x7F, 0x65, 0xFE, 0x6D, 0x75, 0x4D, 0x4F, 0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 0xC1, 0x80, 0xE0, 0x19, 0x27, 0x17, 0xD6,
0xA1, 0xD7, 0xF9, 0x26, 0x4C, 0x56, 0xA4, 0xB7, 0xCB, 0xEC, 0x34, 0xEB, 0xD1, 0xC7, 0x2B, 0x67,
0xBD, 0x7C, 0xF1, 0x3E, 0x90, 0x01, 0x93, 0xB2, 0xCB, 0xED, 0xB4, 0x6E, 0xF2, 0x3F, 0x8E, 0x2C,
0xA9, 0xB8, 0x4D, 0x0C, 0xA3, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42,
0x60, 0x82
};
#endif /* __icon_list_item2_png_h_included */

View File

@ -0,0 +1,167 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_scale_png_h_included
#define __icon_scale_png_h_included
#include <stdint.h>
/* Contents of file icon_scale.png */
#define icon_scale_png_fileName "icon_scale.png"
#define icon_scale_png_fileSize 2440
static const uint8_t icon_scale_png_fileBinaryArray[2440] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
0x09, 0x42, 0x49, 0x44, 0x41, 0x54, 0x78, 0x01, 0xED, 0x9D, 0x3D, 0x6C, 0x14, 0x47, 0x18, 0x86,
0xC7, 0x7F, 0xB1, 0x63, 0x62, 0x40, 0x60, 0x59, 0xA0, 0x28, 0x41, 0x58, 0x71, 0x65, 0xD1, 0x20,
0x04, 0x28, 0xA2, 0x43, 0x4A, 0x13, 0x22, 0x6A, 0x6A, 0x0A, 0x6A, 0x90, 0x50, 0x08, 0xA4, 0x8A,
0x82, 0x80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0xAF, 0x25, 0xCB, 0x05,
0xEE, 0xA6, 0xA9, 0xBF, 0x59, 0xCD, 0xE5, 0x45, 0x1A, 0x5E, 0x8A, 0x05, 0xDA, 0x8F, 0xB5, 0x8F,
0x98, 0x26, 0x3E, 0x5C, 0x60, 0x4A, 0x13, 0xFB, 0x41, 0x4B, 0x8D, 0x96, 0x1B, 0xC5, 0x6E, 0x9D,
0xCD, 0x0A, 0xBB, 0x59, 0xBF, 0x12, 0x88, 0x15, 0xF8, 0x12, 0x40, 0xB1, 0x66, 0x05, 0xDB, 0x7E,
0xC0, 0x27, 0x79, 0x35, 0x6B, 0xB6, 0x0F, 0xD4, 0x17, 0xC2, 0xDD, 0x56, 0x7D, 0xD5, 0x61, 0xBB,
0x17, 0x4D, 0x70, 0xE9, 0xBB, 0xD2, 0xF5, 0x62, 0x95, 0xBB, 0x71, 0x8D, 0x00, 0x14, 0x62, 0x82,
0xAA, 0xD8, 0xCF, 0xAB, 0x97, 0x9F, 0x54, 0xEC, 0xC1, 0x3F, 0xC9, 0x48, 0xAE, 0xF4, 0x5B, 0xE0,
0xD9, 0xF4, 0xF3, 0xFD, 0xBC, 0xA4, 0x8A, 0x0B, 0x32, 0xC9, 0xF0, 0xFE, 0xF8, 0xE5, 0xFE, 0xB6,
0xB7, 0x7B, 0x2A, 0x9C, 0x9F, 0xBF, 0xD9, 0xB6, 0x5D, 0xB8, 0xF5, 0xFA, 0xE6, 0x97, 0xFB, 0xDB,
0x69, 0x9D, 0xFF, 0x01, 0xE6, 0xF9, 0x19, 0xD7, 0x4A, 0xC7, 0x0D, 0x5C, 0x00, 0x00, 0x00, 0x00,
0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
};
#endif /* __icon_scale_png_h_included */

View File

@ -0,0 +1,173 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_switch_select_png_h_included
#define __icon_switch_select_png_h_included
#include <stdint.h>
/* Contents of file icon_switch_select.png */
#define icon_switch_select_png_fileName "icon_switch_select.png"
#define icon_switch_select_png_fileSize 2529
static const uint8_t icon_switch_select_png_fileBinaryArray[2529] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
0x09, 0x9B, 0x49, 0x44, 0x41, 0x54, 0x78, 0x01, 0xED, 0x9D, 0x5B, 0x6C, 0x54, 0x45, 0x18, 0xC7,
0xA7, 0xDB, 0x1B, 0xB7, 0x52, 0xA3, 0x05, 0x8A, 0x04, 0x42, 0xAB, 0x25, 0x26, 0x05, 0xD3, 0x34,
0x88, 0x11, 0x21, 0x26, 0xC6, 0x88, 0xD7, 0x68, 0xA2, 0xBC, 0x11, 0x12, 0x9F, 0x48, 0x78, 0x23,
0x82, 0xC6, 0xC6, 0x04, 0x83, 0xC6, 0x04, 0x13, 0x13, 0x0D, 0xD1, 0x04, 0x9F, 0x7C, 0x20, 0x86,
0x04, 0x1F, 0x78, 0xA8, 0x68, 0x50, 0xF1, 0x86, 0x18, 0x45, 0x50, 0x04, 0x34, 0xA4, 0x81, 0x72,
0x91, 0x42, 0xA1, 0x2A, 0xB4, 0x5C, 0x4A, 0xBB, 0x17, 0xBF, 0xFF, 0xE9, 0xFE, 0x4F, 0xA6, 0xB3,
0x67, 0xBB, 0xEC, 0xE9, 0xB9, 0x74, 0xBB, 0xF3, 0x25, 0xDF, 0xCE, 0x7D, 0xCE, 0x99, 0xDF, 0x37,
0xF3, 0xCD, 0xEE, 0x9E, 0x73, 0x76, 0x2B, 0xD4, 0xD8, 0x52, 0x61, 0x14, 0x9B, 0x69, 0xA3, 0x58,
0x15, 0x2A, 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 0xD2, 0x81, 0xEB, 0x71, 0xB4, 0x9F, 0xAC, 0xA2,
0xF3, 0x42, 0x1C, 0xBC, 0x18, 0x12, 0xB4, 0x19, 0xB2, 0x0E, 0x99, 0x3A, 0x7D, 0xE8, 0xC0, 0x18,
0x47, 0x68, 0x2A, 0x5D, 0x0D, 0xDD, 0x0D, 0x43, 0xBD, 0xCD, 0x64, 0x85, 0x3D, 0xD6, 0xB8, 0x1C,
0x88, 0x59, 0xF8, 0x34, 0x00, 0x43, 0xAE, 0x0A, 0xA4, 0x4D, 0x45, 0x9F, 0xC8, 0xCB, 0xF1, 0xD9,
0x26, 0x50, 0xD3, 0x10, 0x7A, 0x9A, 0xED, 0xD9, 0x06, 0xE9, 0x72, 0x14, 0xC2, 0xC5, 0xD8, 0x19,
0xF7, 0x0A, 0x59, 0xAE, 0x87, 0x39, 0x06, 0x40, 0x21, 0x84, 0x50, 0x19, 0x9A, 0x79, 0x5E, 0xF9,
0x4E, 0xC3, 0x32, 0x7C, 0x71, 0x66, 0x72, 0x76, 0xDC, 0x04, 0x8F, 0xA4, 0x99, 0x6F, 0xE6, 0x39,
0x4D, 0x74, 0x90, 0x4E, 0x86, 0xF1, 0x62, 0x96, 0x9B, 0x69, 0xA3, 0xBA, 0x6B, 0x38, 0x33, 0x7F,
0xB2, 0xA5, 0x75, 0xB8, 0x5E, 0x63, 0x33, 0xCB, 0xCD, 0xB4, 0xDB, 0xE6, 0x7F, 0x62, 0xCE, 0x22,
0x70, 0x90, 0xCB, 0xAB, 0x5B, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60,
0x82
};
#endif /* __icon_switch_select_png_h_included */

View File

@ -0,0 +1,172 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_switch_unselect_png_h_included
#define __icon_switch_unselect_png_h_included
#include <stdint.h>
/* Contents of file icon_switch_unselect.png */
#define icon_switch_unselect_png_fileName "icon_switch_unselect.png"
#define icon_switch_unselect_png_fileSize 2514
static const uint8_t icon_switch_unselect_png_fileBinaryArray[2514] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
0x09, 0x8C, 0x49, 0x44, 0x41, 0x54, 0x78, 0x01, 0xED, 0x9D, 0x49, 0x68, 0x54, 0x49, 0x1C, 0xC6,
0x2B, 0x8B, 0x93, 0x68, 0x12, 0x77, 0x07, 0x64, 0x54, 0x30, 0x4E, 0x14, 0x8D, 0x51, 0x11, 0x0F,
0xA2, 0x20, 0x8A, 0x30, 0x07, 0x43, 0xF0, 0xE2, 0x51, 0x6F, 0x82, 0x5E, 0x45, 0x64, 0x88, 0x0C,
0x08, 0xE3, 0x5C, 0xBC, 0x29, 0x03, 0x42, 0xBC, 0x78, 0x10, 0x41, 0x14, 0x41, 0x21, 0x03, 0x32,
0x8C, 0x37, 0xF7, 0x51, 0x71, 0x21, 0xEE, 0x18, 0x26, 0xEE, 0xB8, 0x8E, 0xEB, 0x24, 0x9A, 0x64,
0xFE, 0x5F, 0xD9, 0xDF, 0xA3, 0xBA, 0x7A, 0x7F, 0x76, 0xBD, 0xEE, 0x97, 0xAE, 0x3F, 0x54, 0x6A,
0xAF, 0xEA, 0xF7, 0xFB, 0x6A, 0x49, 0xBF, 0xAD, 0xAB, 0x54, 0x76, 0xAB, 0xB2, 0xB2, 0xED, 0xB8,
0x95, 0xAD, 0x72, 0xE5, 0xDB, 0xE5, 0xE3, 0x1A, 0x1F, 0xCE, 0xF1, 0xC1, 0xED, 0x7C, 0x3B, 0x1E,
0x54, 0xCF, 0x04, 0x8C, 0xE9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C, 0x99, 0xEA, 0x36, 0x4C, 0x60, 0x0C,
0xC3, 0xB7, 0x1D, 0x97, 0x1A, 0x8E, 0x78, 0xFA, 0x66, 0x9D, 0x91, 0x0A, 0x3B, 0xDB, 0x71, 0x69,
0x88, 0x09, 0xF8, 0x14, 0x80, 0x3E, 0x67, 0x05, 0xE2, 0xB6, 0x43, 0x9B, 0x48, 0x4B, 0x59, 0xB3,
0x6D, 0xA0, 0xB6, 0x10, 0x66, 0x9C, 0xF5, 0x59, 0x07, 0xF1, 0x4A, 0x34, 0xC2, 0xC5, 0xB1, 0x33,
0x9C, 0xCE, 0x67, 0xBE, 0xE9, 0xA7, 0x08, 0x80, 0x4C, 0x18, 0xA1, 0xD2, 0xB7, 0xD3, 0xD2, 0xA5,
0xEB, 0x8A, 0x15, 0xF8, 0x47, 0x8F, 0xE4, 0xC4, 0x71, 0x13, 0x3C, 0xA2, 0x76, 0xBA, 0x9D, 0xA6,
0xAB, 0x98, 0x20, 0x75, 0x82, 0xF5, 0xC7, 0xCE, 0xB7, 0xE3, 0x56, 0xF1, 0x40, 0x38, 0x3B, 0x7D,
0xA4, 0xC5, 0x4D, 0xB8, 0xE9, 0x8E, 0xCD, 0xCE, 0xB7, 0xE3, 0x41, 0x9D, 0xFF, 0x01, 0xB2, 0x15,
0x34, 0x9A, 0xBC, 0x3E, 0x46, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42,
0x60, 0x82
};
#endif /* __icon_switch_unselect_png_h_included */

View File

@ -0,0 +1,252 @@
/* Generated by file2c, do not edit manually */
#ifndef __widget_config_json_h_included
#define __widget_config_json_h_included
#include <stdint.h>
/* Contents of file widget_config.json */
#define widget_config_json_fileName "widget_config.json"
#define widget_config_json_fileSize 3801
static const uint8_t widget_config_json_fileBinaryArray[3801] = {
0x7B, 0x0A, 0x20, 0x20, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x22, 0x3A, 0x20, 0x7B,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6D, 0x61, 0x6A, 0x6F, 0x72, 0x22, 0x3A, 0x20, 0x31, 0x2C,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6D, 0x69, 0x6E, 0x6F, 0x72, 0x22, 0x3A, 0x20, 0x30, 0x0A,
0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x22, 0x6D, 0x61, 0x69, 0x6E, 0x5F, 0x69, 0x6E, 0x74,
0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x22,
0x66, 0x6C, 0x6F, 0x61, 0x74, 0x69, 0x6E, 0x67, 0x5F, 0x77, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x22,
0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F, 0x65, 0x6E,
0x61, 0x62, 0x6C, 0x65, 0x22, 0x3A, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x70, 0x65, 0x61, 0x6B, 0x65, 0x72, 0x22,
0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F, 0x65, 0x6E,
0x61, 0x62, 0x6C, 0x65, 0x5F, 0x74, 0x74, 0x73, 0x22, 0x3A, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2C,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F, 0x65, 0x6E, 0x61, 0x62, 0x6C,
0x65, 0x5F, 0x76, 0x6F, 0x69, 0x63, 0x65, 0x22, 0x3A, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65,
0x74, 0x5F, 0x6C, 0x69, 0x73, 0x74, 0x22, 0x3A, 0x20, 0x5B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67,
0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x30, 0x2C, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79,
0x70, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x22, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E,
0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x42, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x22, 0x2C, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69,
0x6C, 0x65, 0x5F, 0x73, 0x65, 0x74, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F,
0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x3A, 0x20,
0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x31, 0x2E, 0x70, 0x6E,
0x67, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69,
0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x75, 0x6E,
0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x3A, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E,
0x5F, 0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x31, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x22, 0x63, 0x75, 0x73, 0x74, 0x6F, 0x6D, 0x69, 0x7A, 0x65, 0x5F, 0x72, 0x63, 0x5F, 0x62,
0x75, 0x74, 0x74, 0x6F, 0x6E, 0x73, 0x5F, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x22, 0x3A, 0x20,
0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F,
0x65, 0x6E, 0x61, 0x62, 0x6C, 0x65, 0x22, 0x3A, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6D, 0x61, 0x70, 0x70, 0x69, 0x6E,
0x67, 0x5F, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x5F, 0x64, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79,
0x5F, 0x6F, 0x72, 0x64, 0x65, 0x72, 0x22, 0x3A, 0x20, 0x30, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77,
0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x31, 0x2C,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74,
0x5F, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x6C, 0x69, 0x73, 0x74, 0x22, 0x2C, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F,
0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x4C, 0x69, 0x73, 0x74, 0x22, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6C, 0x69, 0x73, 0x74, 0x5F, 0x69, 0x74, 0x65,
0x6D, 0x22, 0x3A, 0x20, 0x5B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69,
0x74, 0x65, 0x6D, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x49, 0x74, 0x65, 0x6D,
0x5F, 0x31, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x73, 0x65, 0x74, 0x22,
0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D,
0x65, 0x5F, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x3A, 0x20, 0x22, 0x69, 0x63,
0x6F, 0x6E, 0x5F, 0x6C, 0x69, 0x73, 0x74, 0x5F, 0x69, 0x74, 0x65, 0x6D, 0x31, 0x2E, 0x70, 0x6E,
0x67, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D,
0x65, 0x5F, 0x75, 0x6E, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x3A, 0x20, 0x22,
0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x6C, 0x69, 0x73, 0x74, 0x5F, 0x69, 0x74, 0x65, 0x6D, 0x31, 0x2E,
0x70, 0x6E, 0x67, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6D, 0x5F, 0x6E, 0x61,
0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x49, 0x74, 0x65, 0x6D, 0x5F, 0x32, 0x22, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E,
0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x73, 0x65, 0x74, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F,
0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x73, 0x65, 0x6C, 0x65,
0x63, 0x74, 0x65, 0x64, 0x22, 0x3A, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x6C, 0x69, 0x73,
0x74, 0x5F, 0x69, 0x74, 0x65, 0x6D, 0x32, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x2C, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F,
0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x75, 0x6E, 0x73, 0x65,
0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x3A, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x6C,
0x69, 0x73, 0x74, 0x5F, 0x69, 0x74, 0x65, 0x6D, 0x32, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x5D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x75, 0x73,
0x74, 0x6F, 0x6D, 0x69, 0x7A, 0x65, 0x5F, 0x72, 0x63, 0x5F, 0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E,
0x73, 0x5F, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F, 0x65, 0x6E, 0x61, 0x62, 0x6C,
0x65, 0x22, 0x3A, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x6D, 0x61, 0x70, 0x70, 0x69, 0x6E, 0x67, 0x5F, 0x63, 0x6F, 0x6E,
0x66, 0x69, 0x67, 0x5F, 0x64, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x5F, 0x6F, 0x72, 0x64, 0x65,
0x72, 0x22, 0x3A, 0x20, 0x31, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74,
0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x32, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65,
0x22, 0x3A, 0x20, 0x22, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D,
0x65, 0x22, 0x3A, 0x20, 0x22, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x22, 0x2C, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65,
0x5F, 0x73, 0x65, 0x74, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61,
0x6D, 0x65, 0x5F, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x3A, 0x20, 0x22, 0x69,
0x63, 0x6F, 0x6E, 0x5F, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x5F, 0x73, 0x65, 0x6C, 0x65, 0x63,
0x74, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D,
0x65, 0x5F, 0x75, 0x6E, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x3A, 0x20, 0x22,
0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x5F, 0x75, 0x6E, 0x73, 0x65,
0x6C, 0x65, 0x63, 0x74, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x75,
0x73, 0x74, 0x6F, 0x6D, 0x69, 0x7A, 0x65, 0x5F, 0x72, 0x63, 0x5F, 0x62, 0x75, 0x74, 0x74, 0x6F,
0x6E, 0x73, 0x5F, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F, 0x65, 0x6E, 0x61, 0x62,
0x6C, 0x65, 0x22, 0x3A, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6D, 0x61, 0x70, 0x70, 0x69, 0x6E, 0x67, 0x5F, 0x63, 0x6F,
0x6E, 0x66, 0x69, 0x67, 0x5F, 0x64, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x5F, 0x6F, 0x72, 0x64,
0x65, 0x72, 0x22, 0x3A, 0x20, 0x32, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65,
0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x33, 0x2C, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70,
0x65, 0x22, 0x3A, 0x20, 0x22, 0x73, 0x63, 0x61, 0x6C, 0x65, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D,
0x65, 0x22, 0x3A, 0x20, 0x22, 0x53, 0x63, 0x61, 0x6C, 0x65, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F,
0x73, 0x65, 0x74, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D,
0x65, 0x5F, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x3A, 0x20, 0x22, 0x69, 0x63,
0x6F, 0x6E, 0x5F, 0x73, 0x63, 0x61, 0x6C, 0x65, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66,
0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x75, 0x6E, 0x73, 0x65, 0x6C, 0x65, 0x63,
0x74, 0x65, 0x64, 0x22, 0x3A, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x73, 0x63, 0x61, 0x6C,
0x65, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D,
0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x75, 0x73, 0x74, 0x6F,
0x6D, 0x69, 0x7A, 0x65, 0x5F, 0x72, 0x63, 0x5F, 0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x73, 0x5F,
0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F, 0x65, 0x6E, 0x61, 0x62, 0x6C, 0x65, 0x22,
0x3A, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x22, 0x6D, 0x61, 0x70, 0x70, 0x69, 0x6E, 0x67, 0x5F, 0x63, 0x6F, 0x6E, 0x66, 0x69,
0x67, 0x5F, 0x64, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x5F, 0x6F, 0x72, 0x64, 0x65, 0x72, 0x22,
0x3A, 0x20, 0x33, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x5F, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x73, 0x74, 0x65,
0x70, 0x5F, 0x6C, 0x65, 0x6E, 0x67, 0x74, 0x68, 0x22, 0x3A, 0x20, 0x35, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x5D, 0x0A, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x22, 0x63, 0x6F, 0x6E,
0x66, 0x69, 0x67, 0x5F, 0x69, 0x6E, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x22, 0x3A, 0x20,
0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x65, 0x78, 0x74, 0x5F, 0x69, 0x6E, 0x70, 0x75,
0x74, 0x5F, 0x62, 0x6F, 0x78, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22,
0x54, 0x65, 0x78, 0x74, 0x49, 0x6E, 0x70, 0x75, 0x74, 0x42, 0x6F, 0x78, 0x22, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x6C, 0x61, 0x63, 0x65, 0x68, 0x6F, 0x6C, 0x64, 0x65,
0x72, 0x5F, 0x74, 0x65, 0x78, 0x74, 0x22, 0x3A, 0x20, 0x22, 0x50, 0x6C, 0x65, 0x61, 0x73, 0x65,
0x20, 0x69, 0x6E, 0x70, 0x75, 0x74, 0x20, 0x6D, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2C,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F, 0x65, 0x6E, 0x61, 0x62, 0x6C,
0x65, 0x22, 0x3A, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6C, 0x69, 0x73, 0x74,
0x22, 0x3A, 0x20, 0x5B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64,
0x65, 0x78, 0x22, 0x3A, 0x20, 0x34, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3A, 0x20, 0x22,
0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20,
0x22, 0x42, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x20, 0x34, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x75, 0x73, 0x74, 0x6F, 0x6D, 0x69, 0x7A, 0x65, 0x5F, 0x72,
0x63, 0x5F, 0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x73, 0x5F, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67,
0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
0x69, 0x73, 0x5F, 0x65, 0x6E, 0x61, 0x62, 0x6C, 0x65, 0x22, 0x3A, 0x20, 0x74, 0x72, 0x75, 0x65,
0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6D, 0x61, 0x70,
0x70, 0x69, 0x6E, 0x67, 0x5F, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x5F, 0x64, 0x69, 0x73, 0x70,
0x6C, 0x61, 0x79, 0x5F, 0x6F, 0x72, 0x64, 0x65, 0x72, 0x22, 0x3A, 0x20, 0x34, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A,
0x20, 0x35, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64,
0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x73, 0x63, 0x61, 0x6C,
0x65, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64,
0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x53, 0x63, 0x61, 0x6C,
0x65, 0x20, 0x35, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63,
0x75, 0x73, 0x74, 0x6F, 0x6D, 0x69, 0x7A, 0x65, 0x5F, 0x72, 0x63, 0x5F, 0x62, 0x75, 0x74, 0x74,
0x6F, 0x6E, 0x73, 0x5F, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F, 0x65, 0x6E, 0x61,
0x62, 0x6C, 0x65, 0x22, 0x3A, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6D, 0x61, 0x70, 0x70, 0x69, 0x6E, 0x67, 0x5F, 0x63,
0x6F, 0x6E, 0x66, 0x69, 0x67, 0x5F, 0x64, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x5F, 0x6F, 0x72,
0x64, 0x65, 0x72, 0x22, 0x3A, 0x20, 0x35, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x22, 0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x5F, 0x76, 0x61, 0x6C, 0x75, 0x65,
0x5F, 0x73, 0x74, 0x65, 0x70, 0x5F, 0x6C, 0x65, 0x6E, 0x67, 0x74, 0x68, 0x22, 0x3A, 0x20, 0x35,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65,
0x78, 0x22, 0x3A, 0x20, 0x36, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x69,
0x6E, 0x74, 0x5F, 0x69, 0x6E, 0x70, 0x75, 0x74, 0x5F, 0x62, 0x6F, 0x78, 0x22, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E,
0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x49, 0x6E, 0x74, 0x65, 0x67, 0x65, 0x72, 0x20, 0x49,
0x6E, 0x70, 0x75, 0x74, 0x20, 0x42, 0x6F, 0x78, 0x20, 0x36, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6E, 0x74, 0x5F, 0x69, 0x6E, 0x70, 0x75, 0x74, 0x5F,
0x62, 0x6F, 0x78, 0x5F, 0x68, 0x69, 0x6E, 0x74, 0x22, 0x3A, 0x20, 0x22, 0x75, 0x6E, 0x69, 0x74,
0x3A, 0x73, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69,
0x64, 0x67, 0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x37, 0x2C, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F,
0x74, 0x79, 0x70, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x22, 0x2C,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74,
0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x20,
0x37, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x75, 0x73,
0x74, 0x6F, 0x6D, 0x69, 0x7A, 0x65, 0x5F, 0x72, 0x63, 0x5F, 0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E,
0x73, 0x5F, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F, 0x65, 0x6E, 0x61, 0x62, 0x6C,
0x65, 0x22, 0x3A, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x6D, 0x61, 0x70, 0x70, 0x69, 0x6E, 0x67, 0x5F, 0x63, 0x6F, 0x6E,
0x66, 0x69, 0x67, 0x5F, 0x64, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x5F, 0x6F, 0x72, 0x64, 0x65,
0x72, 0x22, 0x3A, 0x20, 0x37, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74,
0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x38, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65,
0x22, 0x3A, 0x20, 0x22, 0x6C, 0x69, 0x73, 0x74, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22,
0x3A, 0x20, 0x22, 0x4C, 0x69, 0x73, 0x74, 0x20, 0x38, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x6C, 0x69, 0x73, 0x74, 0x5F, 0x69, 0x74, 0x65, 0x6D, 0x22, 0x3A,
0x20, 0x5B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6D,
0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x49, 0x74, 0x65, 0x6D, 0x20, 0x31, 0x22,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6D, 0x5F, 0x6E, 0x61, 0x6D, 0x65,
0x22, 0x3A, 0x20, 0x22, 0x49, 0x74, 0x65, 0x6D, 0x20, 0x32, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x22, 0x69, 0x74, 0x65, 0x6D, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x49,
0x74, 0x65, 0x6D, 0x20, 0x33, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65,
0x6D, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x49, 0x74, 0x65, 0x6D, 0x20, 0x34,
0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x22, 0x63, 0x75, 0x73, 0x74, 0x6F, 0x6D, 0x69, 0x7A, 0x65, 0x5F, 0x72, 0x63, 0x5F, 0x62,
0x75, 0x74, 0x74, 0x6F, 0x6E, 0x73, 0x5F, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x22, 0x3A, 0x20,
0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F,
0x65, 0x6E, 0x61, 0x62, 0x6C, 0x65, 0x22, 0x3A, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6D, 0x61, 0x70, 0x70, 0x69, 0x6E,
0x67, 0x5F, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x5F, 0x64, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79,
0x5F, 0x6F, 0x72, 0x64, 0x65, 0x72, 0x22, 0x3A, 0x20, 0x38, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x5D, 0x0A, 0x20, 0x20, 0x7D, 0x0A, 0x7D, 0x0A
};
#endif /* __widget_config_json_h_included */

View File

@ -0,0 +1,58 @@
/**
********************************************************************
* @file file_binary_array_list_en.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "file_binary_array_list_en.h"
#include "widget_file_c/en_big_screen/icon_button1_png.h"
#include "widget_file_c/en_big_screen/icon_button2_png.h"
#include "widget_file_c/en_big_screen/icon_list_item1_png.h"
#include "widget_file_c/en_big_screen/icon_list_item2_png.h"
#include "widget_file_c/en_big_screen/icon_scale_png.h"
#include "widget_file_c/en_big_screen/icon_switch_select_png.h"
#include "widget_file_c/en_big_screen/icon_switch_unselect_png.h"
#include "widget_file_c/en_big_screen/widget_config_json.h"
/* Private constants ---------------------------------------------------------*/
/* Export types -------------------------------------------------------------*/
// English language file binary array list
static T_DjiWidgetFileBinaryArray s_EnWidgetFileBinaryArrayList[] = {
{widget_config_json_fileName, widget_config_json_fileSize, widget_config_json_fileBinaryArray},
{icon_button1_png_fileName, icon_button1_png_fileSize, icon_button1_png_fileBinaryArray},
{icon_button2_png_fileName, icon_button2_png_fileSize, icon_button2_png_fileBinaryArray},
{icon_list_item1_png_fileName, icon_list_item1_png_fileSize, icon_list_item1_png_fileBinaryArray},
{icon_list_item2_png_fileName, icon_list_item2_png_fileSize, icon_list_item2_png_fileBinaryArray},
{icon_scale_png_fileName, icon_scale_png_fileSize, icon_scale_png_fileBinaryArray},
{icon_switch_select_png_fileName, icon_switch_select_png_fileSize, icon_switch_select_png_fileBinaryArray},
{icon_switch_unselect_png_fileName, icon_switch_unselect_png_fileSize, icon_switch_unselect_png_fileBinaryArray}
};
/* Export values -------------------------------------------------------------*/
uint32_t g_testEnBinaryArrayCount = sizeof(s_EnWidgetFileBinaryArrayList) / sizeof(T_DjiWidgetFileBinaryArray);
T_DjiWidgetFileBinaryArray * g_testEnFileBinaryArrayList = s_EnWidgetFileBinaryArrayList;
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,57 @@
/**
********************************************************************
* @file file_binary_array_list_en.h
* @brief This is the header file for "file_binary_array_list_en.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef FILE_BINARY_ARRAY_LIST_EN_H
#define FILE_BINARY_ARRAY_LIST_EN_H
#include <stdint.h>
#include <dji_widget.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
extern uint32_t g_testEnBinaryArrayCount;
extern T_DjiWidgetFileBinaryArray * g_testEnFileBinaryArrayList;
#ifdef __cplusplus
}
#endif
#endif // FILE_BINARY_ARRAY_LIST_EN_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,577 @@
/**
********************************************************************
* @file test_widget_interaction.c
* @brief
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_widget_interaction.h"
#include <dji_widget.h>
#include <dji_logger.h>
#include "../utils/util_misc.h"
#include <dji_platform.h>
#include <stdio.h>
#include <waypoint_v2/test_waypoint_v2.h>
#include <hms/test_hms.h>
#include <gimbal_manager/test_gimbal_manager.h>
#include <camera_manager/test_camera_manager.h>
#include <flight_control/test_flight_control.h>
#include <fc_subscription/test_fc_subscription.h>
#include <dji_perception.h>
#include "liveview/test_liveview.h"
#include "perception/test_perception.h"
#include "file_binary_array_list_en.h"
#include <stdarg.h>
#include "dji_aircraft_info.h"
#include "dji_core.h"
#include <payload_collaboration/test_payload_collaboration.h>
#include <waypoint_v3/test_waypoint_v3.h>
#include "dji_sdk_config.h"
/* Private constants ---------------------------------------------------------*/
#define WIDGET_DIR_PATH_LEN_MAX (256)
#define WIDGET_TASK_STACK_SIZE (2048)
#define WIDGET_LOG_STRING_MAX_SIZE (40)
#define WIDGET_LOG_LINE_MAX_NUM (5)
/* Private types -------------------------------------------------------------*/
typedef enum {
E_DJI_SAMPLE_INDEX_FC_SUBSCRIPTION = 0,
E_DJI_SAMPLE_INDEX_WAYPOINT_V2 = 1,
E_DJI_SAMPLE_INDEX_WAYPOINT_V3 = 2,
E_DJI_SAMPLE_INDEX_FLIGHT_CONTROL_TAKE_OFF_LANDING = 3,
E_DJI_SAMPLE_INDEX_FLIGHT_CONTROL_TAKE_OFF_POSITION_CTRL_LANDING = 4,
E_DJI_SAMPLE_INDEX_FLIGHT_CONTROL_TAKE_OFF_GO_HOME_FORCE_LANDING = 5,
E_DJI_SAMPLE_INDEX_FLIGHT_CONTROL_TAKE_OFF_VELOCITY_CTRL_LANDING = 6,
E_DJI_SAMPLE_INDEX_FLIGHT_CONTROL_ARREST_FLYING = 7,
E_DJI_SAMPLE_INDEX_FLIGHT_CONTROL_SET_GET_PARAM = 8,
E_DJI_SAMPLE_INDEX_HMS = 9,
E_DJI_SAMPLE_INDEX_GIMBAL_MANAGER_FREE_MODE = 10,
E_DJI_SAMPLE_INDEX_GIMBAL_MANAGER_YAW_FOLLOW_MODE = 11,
E_DJI_SAMPLE_INDEX_LIVEVIEW = 12,
E_DJI_SAMPLE_INDEX_PERCEPTION = 13,
E_DJI_SAMPLE_INDEX_SWITCH_ALIAS = 14,
E_DJI_SAMPLE_INDEX_CAMMGR_SHUTTER_SPEED = 15,
E_DJI_SAMPLE_INDEX_CAMMGR_APERTURE = 16,
E_DJI_SAMPLE_INDEX_CAMMGR_EV = 17,
E_DJI_SAMPLE_INDEX_CAMMGR_ISO = 18,
E_DJI_SAMPLE_INDEX_CAMMGR_FOCUS_POINT = 19,
E_DJI_SAMPLE_INDEX_CAMMGR_TAP_ZOOM = 20,
E_DJI_SAMPLE_INDEX_CAMMGR_OPTICAL_ZOOM = 21,
E_DJI_SAMPLE_INDEX_CAMMGR_SINGLE_PHOTO = 22,
E_DJI_SAMPLE_INDEX_CAMMGR_AEB_PHOTO = 23,
E_DJI_SAMPLE_INDEX_CAMMGR_BURST_PHOTO = 24,
E_DJI_SAMPLE_INDEX_CAMMGR_INTERVAL_PHOTO = 25,
E_DJI_SAMPLE_INDEX_CAMMGR_RECORDER_VIDEO = 26,
E_DJI_SAMPLE_INDEX_CAMMGR_MEDIA_DOWNLOAD = 27,
E_DJI_SAMPLE_INDEX_UNKNOWN = 0xFF,
} E_DjiExtensionPortSampleIndex;
typedef struct {
bool valid;
char content[WIDGET_LOG_STRING_MAX_SIZE];
} T_DjiTestWidgetLog;
/* Private functions declaration ---------------------------------------------*/
static void *DjiTest_WidgetTask(void *arg);
static void *DjiTest_WidgetInteractionTask(void *arg);
static T_DjiReturnCode DjiTestWidget_SetWidgetValue(E_DjiWidgetType widgetType, uint32_t index, int32_t value,
void *userData);
static T_DjiReturnCode DjiTestWidget_GetWidgetValue(E_DjiWidgetType widgetType, uint32_t index, int32_t *value,
void *userData);
static T_DjiReturnCode DjiTestWidget_TriggerChangeAlias(void);
/* Private values ------------------------------------------------------------*/
static T_DjiTaskHandle s_widgetTestThread;
static T_DjiTaskHandle s_widgetInteractionTestThread;
static E_DjiExtensionPortSampleIndex s_extensionPortSampleIndex = E_DJI_SAMPLE_INDEX_FC_SUBSCRIPTION;
static bool s_isallowRunFlightControlSample = false;
static bool s_isSampleStart = false;
static E_DjiMountPosition s_mountPosition = DJI_MOUNT_POSITION_PAYLOAD_PORT_NO1;
static T_DjiTestWidgetLog s_djiTestWidgetLog[WIDGET_LOG_LINE_MAX_NUM] = {0};
static T_DjiAircraftInfoBaseInfo s_aircraftInfoBaseInfo = {0};
static bool s_isAliasChanged = false;
static const T_DjiWidgetHandlerListItem s_widgetHandlerList[] = {
{0, DJI_WIDGET_TYPE_BUTTON, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{1, DJI_WIDGET_TYPE_LIST, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{2, DJI_WIDGET_TYPE_SWITCH, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{3, DJI_WIDGET_TYPE_SCALE, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{4, DJI_WIDGET_TYPE_BUTTON, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{5, DJI_WIDGET_TYPE_SCALE, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{6, DJI_WIDGET_TYPE_INT_INPUT_BOX, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{7, DJI_WIDGET_TYPE_SWITCH, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{8, DJI_WIDGET_TYPE_LIST, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{9, DJI_WIDGET_TYPE_LIST, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
{10, DJI_WIDGET_TYPE_BUTTON, DjiTestWidget_SetWidgetValue, DjiTestWidget_GetWidgetValue, NULL},
};
static const char *s_widgetTypeNameArray[] = {
"Unknown",
"Button",
"Switch",
"Scale",
"List",
"Int input box"
};
static const uint32_t s_widgetHandlerListCount = sizeof(s_widgetHandlerList) / sizeof(T_DjiWidgetHandlerListItem);
static int32_t s_widgetValueList[sizeof(s_widgetHandlerList) / sizeof(T_DjiWidgetHandlerListItem)] = {0};
static bool s_isWidgetFileDirPathConfigured = false;
static char s_widgetFileDirPath[DJI_FILE_PATH_SIZE_MAX] = {0};
/* Exported functions definition ---------------------------------------------*/
void DjiTest_WidgetLogAppend(const char *fmt, ...)
{
va_list args;
char string[WIDGET_LOG_STRING_MAX_SIZE];
int32_t i;
va_start(args, fmt);
vsnprintf(string, WIDGET_LOG_STRING_MAX_SIZE, fmt, args);
va_end(args);
for (i = 0; i < WIDGET_LOG_LINE_MAX_NUM; ++i) {
if (s_djiTestWidgetLog[i].valid == false) {
s_djiTestWidgetLog[i].valid = true;
strcpy(s_djiTestWidgetLog[i].content, string);
break;
}
}
if (i == WIDGET_LOG_LINE_MAX_NUM) {
for (i = 0; i < WIDGET_LOG_LINE_MAX_NUM - 1; i++) {
strcpy(s_djiTestWidgetLog[i].content, s_djiTestWidgetLog[i + 1].content);
}
strcpy(s_djiTestWidgetLog[WIDGET_LOG_LINE_MAX_NUM - 1].content, string);
}
}
T_DjiReturnCode DjiTest_WidgetInteractionStartService(void)
{
T_DjiReturnCode djiStat;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
//Step 1 : Init DJI Widget
djiStat = DjiWidget_Init();
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Dji test widget init error, stat = 0x%08llX", djiStat);
return djiStat;
}
#ifdef SYSTEM_ARCH_LINUX_DISABLEED
//Step 2 : Set UI Config (Linux environment)
char curFileDirPath[WIDGET_DIR_PATH_LEN_MAX];
char tempPath[WIDGET_DIR_PATH_LEN_MAX];
djiStat = DjiUserUtil_GetCurrentFileDirPath(__FILE__, WIDGET_DIR_PATH_LEN_MAX, curFileDirPath);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get file current path error, stat = 0x%08llX", djiStat);
return djiStat;
}
if (s_isWidgetFileDirPathConfigured == true) {
snprintf(tempPath, WIDGET_DIR_PATH_LEN_MAX, "%swidget_file/en_big_screen", s_widgetFileDirPath);
} else {
snprintf(tempPath, WIDGET_DIR_PATH_LEN_MAX, "%swidget_file/en_big_screen", curFileDirPath);
}
//set default ui config path
djiStat = DjiWidget_RegDefaultUiConfigByDirPath(tempPath);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Add default widget ui config error, stat = 0x%08llX", djiStat);
return djiStat;
}
//set ui config for English language
// djiStat = DjiWidget_RegUiConfigByDirPath(DJI_MOBILE_APP_LANGUAGE_ENGLISH,
// DJI_MOBILE_APP_SCREEN_TYPE_BIG_SCREEN,
// tempPath);
// if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
// USER_LOG_ERROR("Add widget ui config error, stat = 0x%08llX", djiStat);
// return djiStat;
// }
//
// //set ui config for Chinese language
// if (s_isWidgetFileDirPathConfigured == true) {
// snprintf(tempPath, WIDGET_DIR_PATH_LEN_MAX, "%swidget_file/cn_big_screen", s_widgetFileDirPath);
// } else {
// snprintf(tempPath, WIDGET_DIR_PATH_LEN_MAX, "%swidget_file/cn_big_screen", curFileDirPath);
// }
//
// djiStat = DjiWidget_RegUiConfigByDirPath(DJI_MOBILE_APP_LANGUAGE_CHINESE,
// DJI_MOBILE_APP_SCREEN_TYPE_BIG_SCREEN,
// tempPath);
// if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
// USER_LOG_ERROR("Add widget ui config error, stat = 0x%08llX", djiStat);
// return djiStat;
// }
#else
//Step 2 : Set UI Config (RTOS environment)
T_DjiWidgetBinaryArrayConfig enWidgetBinaryArrayConfig = {
.binaryArrayCount = g_testEnBinaryArrayCount,
.fileBinaryArrayList = g_testEnFileBinaryArrayList
};
//set default ui config
djiStat = DjiWidget_RegDefaultUiConfigByBinaryArray(&enWidgetBinaryArrayConfig);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Add default widget ui config error, stat = 0x%08llX", djiStat);
return djiStat;
}
#endif
//Step 3 : Set widget handler list
djiStat = DjiWidget_RegHandlerList(s_widgetHandlerList, s_widgetHandlerListCount);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Set widget handler list error, stat = 0x%08llX", djiStat);
return djiStat;
}
//Step 4 : Run widget api sample task
if (osalHandler->TaskCreate("user_widget_task", DjiTest_WidgetTask, WIDGET_TASK_STACK_SIZE, NULL,
&s_widgetTestThread) != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Dji widget test task create error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (osalHandler->TaskCreate("user_widget_task", DjiTest_WidgetInteractionTask, WIDGET_TASK_STACK_SIZE, NULL,
&s_widgetInteractionTestThread) != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Dji widget test task create error.");
return DJI_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_DjiReturnCode DjiTest_WidgetInteractionSetConfigFilePath(const char *path)
{
memset(s_widgetFileDirPath, 0, sizeof(s_widgetFileDirPath));
memcpy(s_widgetFileDirPath, path, USER_UTIL_MIN(strlen(path), sizeof(s_widgetFileDirPath) - 1));
s_isWidgetFileDirPathConfigured = true;
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#pragma GCC diagnostic ignored "-Wformat"
#endif
/* Private functions definition-----------------------------------------------*/
static void *DjiTest_WidgetTask(void *arg)
{
char message[DJI_WIDGET_FLOATING_WINDOW_MSG_MAX_LEN];
uint32_t sysTimeMs = 0;
T_DjiReturnCode djiStat;
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
USER_UTIL_UNUSED(arg);
while (1) {
djiStat = osalHandler->GetTimeMs(&sysTimeMs);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Get system time ms error, stat = 0x%08llX", djiStat);
}
#ifndef USER_FIRMWARE_MAJOR_VERSION
snprintf(message, DJI_WIDGET_FLOATING_WINDOW_MSG_MAX_LEN,
"System time : %u ms \r\n%s \r\n%s \r\n%s \r\n%s \r\n%s \r\n",
sysTimeMs,
s_djiTestWidgetLog[0].content,
s_djiTestWidgetLog[1].content,
s_djiTestWidgetLog[2].content,
s_djiTestWidgetLog[3].content,
s_djiTestWidgetLog[4].content);
#else
snprintf(message, DJI_WIDGET_FLOATING_WINDOW_MSG_MAX_LEN,
"System time : %u ms\r\nVersion: v%02d.%02d.%02d.%02d\r\nBuild time: %s %s", sysTimeMs,
USER_FIRMWARE_MAJOR_VERSION, USER_FIRMWARE_MINOR_VERSION,
USER_FIRMWARE_MODIFY_VERSION, USER_FIRMWARE_DEBUG_VERSION,
__DATE__, __TIME__);
#endif
djiStat = DjiWidgetFloatingWindow_ShowMessage(message);
if (djiStat != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Floating window show message error, stat = 0x%08llX", djiStat);
}
osalHandler->TaskSleepMs(200);
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#pragma GCC diagnostic ignored "-Wformat"
#endif
static void *DjiTest_WidgetInteractionTask(void *arg)
{
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
T_DjiReturnCode returnCode;
returnCode = DjiAircraftInfo_GetBaseInfo(&s_aircraftInfoBaseInfo);
if (returnCode != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("get aircraft base info error");
return NULL;
}
while (1) {
osalHandler->TaskSleepMs(100);
if (s_isSampleStart != true) {
continue;
}
osalHandler->TaskSleepMs(500);
s_isSampleStart = false;
printf("\r\n");
USER_LOG_INFO("--------------------------------------------------------------------------------------------->");
DjiTest_WidgetLogAppend("-> Sample Start");
if (s_aircraftInfoBaseInfo.mountPosition == DJI_MOUNT_POSITION_EXTENSION_PORT) {
switch (s_extensionPortSampleIndex) {
case E_DJI_SAMPLE_INDEX_WAYPOINT_V2:
if (s_isallowRunFlightControlSample == true) {
DjiTest_WaypointV2RunSample();
} else {
DjiTest_WidgetLogAppend("Please turn on the 'unlock flight control restrictions'");
USER_LOG_WARN("Please turn on the 'unlock flight control restrictions' switch.");
}
break;
case E_DJI_SAMPLE_INDEX_WAYPOINT_V3:
if (s_isallowRunFlightControlSample == true) {
DjiTest_WaypointV3RunSample();
} else {
DjiTest_WidgetLogAppend("Please turn on the 'unlock flight control restrictions'");
USER_LOG_WARN("Please turn on the 'unlock flight control restrictions' switch.");
}
break;
case E_DJI_SAMPLE_INDEX_FLIGHT_CONTROL_TAKE_OFF_LANDING:
if (s_isallowRunFlightControlSample == true) {
DjiTest_FlightControlRunSample(E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_TAKE_OFF_LANDING);
} else {
USER_LOG_WARN("Please turn on the 'unlock flight control restrictions' switch.");
}
break;
case E_DJI_SAMPLE_INDEX_FLIGHT_CONTROL_TAKE_OFF_POSITION_CTRL_LANDING:
if (s_isallowRunFlightControlSample == true) {
DjiTest_FlightControlRunSample(
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_TAKE_OFF_POSITION_CTRL_LANDING);
} else {
USER_LOG_WARN("Please turn on the 'unlock flight control restrictions' switch.");
}
break;
case E_DJI_SAMPLE_INDEX_FLIGHT_CONTROL_TAKE_OFF_GO_HOME_FORCE_LANDING:
if (s_isallowRunFlightControlSample == true) {
DjiTest_FlightControlRunSample(
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_TAKE_OFF_GO_HOME_FORCE_LANDING);
} else {
USER_LOG_WARN("Please turn on the 'unlock flight control restrictions' switch.");
}
break;
case E_DJI_SAMPLE_INDEX_FLIGHT_CONTROL_TAKE_OFF_VELOCITY_CTRL_LANDING:
if (s_isallowRunFlightControlSample == true) {
DjiTest_FlightControlRunSample(
E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_TAKE_OFF_VELOCITY_CTRL_LANDING);
} else {
USER_LOG_WARN("Please turn on the 'unlock flight control restrictions' switch.");
}
break;
case E_DJI_SAMPLE_INDEX_FLIGHT_CONTROL_ARREST_FLYING:
if (s_isallowRunFlightControlSample == true) {
DjiTest_FlightControlRunSample(E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_ARREST_FLYING);
} else {
USER_LOG_WARN("Please turn on the 'unlock flight control restrictions' switch.");
}
break;
case E_DJI_SAMPLE_INDEX_FLIGHT_CONTROL_SET_GET_PARAM:
DjiTest_FlightControlRunSample(E_DJI_TEST_FLIGHT_CTRL_SAMPLE_SELECT_SET_GET_PARAM);
break;
case E_DJI_SAMPLE_INDEX_FC_SUBSCRIPTION:
DjiTest_FcSubscriptionRunSample();
break;
case E_DJI_SAMPLE_INDEX_GIMBAL_MANAGER_FREE_MODE:
DjiTest_GimbalManagerRunSample(s_mountPosition, DJI_GIMBAL_MODE_FREE);
break;
case E_DJI_SAMPLE_INDEX_GIMBAL_MANAGER_YAW_FOLLOW_MODE:
DjiTest_GimbalManagerRunSample(s_mountPosition, DJI_GIMBAL_MODE_YAW_FOLLOW);
break;
case E_DJI_SAMPLE_INDEX_HMS:
DjiTest_HmsRunSample();
break;
case E_DJI_SAMPLE_INDEX_LIVEVIEW:
#ifdef SYSTEM_ARCH_LINUX
DjiTest_LiveviewRunSample(s_mountPosition);
#else
USER_LOG_WARN("This feature does not support RTOS platform.");
#endif
break;
case E_DJI_SAMPLE_INDEX_PERCEPTION:
#ifdef SYSTEM_ARCH_LINUX
DjiTest_PerceptionRunSample(DJI_PERCEPTION_RECTIFY_FRONT);
#else
USER_LOG_WARN("This feature does not support RTOS platform.");
#endif
break;
case E_DJI_SAMPLE_INDEX_SWITCH_ALIAS:
DjiTestWidget_TriggerChangeAlias();
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_SHUTTER_SPEED:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_SHUTTER_SPEED);
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_APERTURE:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_APERTURE);
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_EV:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_EV);
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_ISO:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_ISO);
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_FOCUS_POINT:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_FOCUS_POINT);
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_TAP_ZOOM:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_TAP_ZOOM_POINT);
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_OPTICAL_ZOOM:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SET_CAMERA_ZOOM_PARAM);
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_SINGLE_PHOTO:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SHOOT_SINGLE_PHOTO);
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_AEB_PHOTO:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SHOOT_AEB_PHOTO);
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_BURST_PHOTO:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SHOOT_BURST_PHOTO);
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_INTERVAL_PHOTO:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_SHOOT_INTERVAL_PHOTO);
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_RECORDER_VIDEO:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_RECORD_VIDEO);
break;
case E_DJI_SAMPLE_INDEX_CAMMGR_MEDIA_DOWNLOAD:
DjiTest_CameraManagerRunSample(s_mountPosition,
E_DJI_TEST_CAMERA_MANAGER_SAMPLE_SELECT_DOWNLOAD_AND_DELETE_MEDIA_FILE);
break;
default:
break;
}
} else {
USER_LOG_WARN("Can't support on payload port.");
break;
}
USER_LOG_INFO("--------------------------------------------------------------------------------------------->");
DjiTest_WidgetLogAppend("-> Sample End");
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
static T_DjiReturnCode DjiTestWidget_SetWidgetValue(E_DjiWidgetType widgetType, uint32_t index, int32_t value,
void *userData)
{
USER_UTIL_UNUSED(userData);
DjiTest_WidgetLogAppend("SetWidget type:%s index:%d value:%d",
s_widgetTypeNameArray[widgetType], index, value);
USER_LOG_INFO("Set widget value, widgetType = %s, widgetIndex = %d ,widgetValue = %d",
s_widgetTypeNameArray[widgetType], index, value);
s_widgetValueList[index] = value;
if (widgetType == DJI_WIDGET_TYPE_SWITCH && index == 7) {
s_isallowRunFlightControlSample = value;
}
if (widgetType == DJI_WIDGET_TYPE_LIST && index == 8) {
s_mountPosition = value + 1;
}
if (widgetType == DJI_WIDGET_TYPE_LIST && index == 9) {
s_extensionPortSampleIndex = value;
}
if (widgetType == DJI_WIDGET_TYPE_BUTTON && index == 10) {
if (value == 1) {
s_isSampleStart = true;
}
}
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode DjiTestWidget_GetWidgetValue(E_DjiWidgetType widgetType, uint32_t index, int32_t *value,
void *userData)
{
USER_UTIL_UNUSED(userData);
USER_UTIL_UNUSED(widgetType);
*value = s_widgetValueList[index];
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_DjiReturnCode DjiTestWidget_TriggerChangeAlias(void)
{
USER_LOG_INFO("Payload alias sample start");
if (s_isAliasChanged == false) {
DjiCore_SetAlias("測試test!@#$%^&*()");
USER_LOG_INFO("Set payload alias to '測試test!@#$%^&*()' ");
s_isAliasChanged = true;
} else {
DjiCore_SetAlias("PSDK_APPALIAS");
USER_LOG_INFO("Set payload alias to 'PSDK_APPALIAS' ");
s_isAliasChanged = false;
}
USER_LOG_INFO("Payload alias sample end");
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,54 @@
/**
********************************************************************
* @file test_widget_interaction.h
* @brief This is the header file for "test_widget_interaction.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2021 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_WIDGET_INTERACTION_H
#define TEST_WIDGET_INTERACTION_H
/* Includes ------------------------------------------------------------------*/
#include <dji_typedef.h>
//by zz
#define SYSTEM_ARCH_LINUX_DISABLEED
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_DjiReturnCode DjiTest_WidgetInteractionStartService(void);
T_DjiReturnCode DjiTest_WidgetInteractionSetConfigFilePath(const char *path);
void DjiTest_WidgetLogAppend(const char *fmt, ...);
#ifdef __cplusplus
}
#endif
#endif // TEST_WIDGET_INTERACTION_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

Some files were not shown because too many files have changed in this diff Show More