NEW: add the M30T model stp and esp32 toolchain support
Signed-off-by: DJI-Martin <DJI-Martin@dji.com>
This commit is contained in:
@ -206,4 +206,4 @@ static void LiveviewConvertH264ToRgbCallback(E_DjiLiveViewCameraPosition positio
|
||||
}
|
||||
}
|
||||
|
||||
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/
|
||||
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/
|
@ -90,37 +90,6 @@ void DjiUser_RunCameraStreamViewSample()
|
||||
USER_LOG_ERROR("Get file current path error, stat = 0x%08llX", returnCode);
|
||||
}
|
||||
|
||||
cout << "Please enter the type of camera stream you want to view\n\n"
|
||||
<< "--> [f] Fpv Camera\n"
|
||||
<< "--> [m] Main Camera\n"
|
||||
<< "--> [v] Vice Camera\n"
|
||||
<< "--> [t] Top Camera\n"
|
||||
<< endl;
|
||||
cin >> cameraIndexChar;
|
||||
|
||||
switch (cameraIndexChar) {
|
||||
case 'f':
|
||||
case 'F':
|
||||
liveviewSample->StartFpvCameraStream(&DjiUser_ShowRgbImageCallback, &fpvName);
|
||||
break;
|
||||
case 'm':
|
||||
case 'M':
|
||||
liveviewSample->StartMainCameraStream(&DjiUser_ShowRgbImageCallback, &mainName);
|
||||
break;
|
||||
case 'v':
|
||||
case 'V':
|
||||
liveviewSample->StartViceCameraStream(&DjiUser_ShowRgbImageCallback, &viceName);
|
||||
break;
|
||||
case 't':
|
||||
case 'T':
|
||||
liveviewSample->StartTopCameraStream(&DjiUser_ShowRgbImageCallback, &topName);
|
||||
break;
|
||||
default:
|
||||
cout << "No camera selected";
|
||||
delete liveviewSample;
|
||||
return;
|
||||
}
|
||||
|
||||
cout << "Please choose the stream demo you want to run\n\n"
|
||||
<< "--> [0] Normal RGB image display\n"
|
||||
<< "--> [1] Binary image display\n"
|
||||
@ -148,6 +117,33 @@ void DjiUser_RunCameraStreamViewSample()
|
||||
return;
|
||||
}
|
||||
|
||||
cout << "Please enter the type of camera stream you want to view\n\n"
|
||||
<< "--> [0] Fpv Camera\n"
|
||||
<< "--> [1] Main Camera\n"
|
||||
<< "--> [2] Vice Camera\n"
|
||||
<< "--> [3] Top Camera\n"
|
||||
<< endl;
|
||||
cin >> cameraIndexChar;
|
||||
|
||||
switch (cameraIndexChar) {
|
||||
case '0':
|
||||
liveviewSample->StartFpvCameraStream(&DjiUser_ShowRgbImageCallback, &fpvName);
|
||||
break;
|
||||
case '1':
|
||||
liveviewSample->StartMainCameraStream(&DjiUser_ShowRgbImageCallback, &mainName);
|
||||
break;
|
||||
case '2':
|
||||
liveviewSample->StartViceCameraStream(&DjiUser_ShowRgbImageCallback, &viceName);
|
||||
break;
|
||||
case '3':
|
||||
liveviewSample->StartTopCameraStream(&DjiUser_ShowRgbImageCallback, &topName);
|
||||
break;
|
||||
default:
|
||||
cout << "No camera selected";
|
||||
delete liveviewSample;
|
||||
return;
|
||||
}
|
||||
|
||||
cout << "Please enter the 'q' or 'Q' to quit camera stream view\n"
|
||||
<< endl;
|
||||
|
||||
@ -159,20 +155,16 @@ void DjiUser_RunCameraStreamViewSample()
|
||||
}
|
||||
|
||||
switch (cameraIndexChar) {
|
||||
case 'f':
|
||||
case 'F':
|
||||
case '0':
|
||||
liveviewSample->StopFpvCameraStream();
|
||||
break;
|
||||
case 'm':
|
||||
case 'M':
|
||||
case '1':
|
||||
liveviewSample->StopMainCameraStream();
|
||||
break;
|
||||
case 'v':
|
||||
case 'V':
|
||||
case '2':
|
||||
liveviewSample->StopViceCameraStream();
|
||||
break;
|
||||
case 't':
|
||||
case 'T':
|
||||
case '3':
|
||||
liveviewSample->StopTopCameraStream();
|
||||
break;
|
||||
default:
|
||||
|
@ -42,7 +42,7 @@
|
||||
#define DJI_LOG_FOLDER_NAME "Logs"
|
||||
#define DJI_LOG_PATH_MAX_SIZE (128)
|
||||
#define DJI_LOG_FOLDER_NAME_MAX_SIZE (32)
|
||||
#define DJI_LOG_SYSTEM_CMD_MAX_SIZE (64)
|
||||
#define DJI_SYSTEM_CMD_STR_MAX_SIZE (64)
|
||||
#define DJI_LOG_MAX_COUNT (10)
|
||||
|
||||
#define USER_UTIL_UNUSED(x) ((x) = (x))
|
||||
@ -290,7 +290,7 @@ T_DjiReturnCode Application::DjiUser_LocalWriteFsInit(const char *path)
|
||||
{
|
||||
T_DjiReturnCode djiReturnCode = DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
||||
char filePath[DJI_LOG_PATH_MAX_SIZE];
|
||||
char systemCmd[DJI_LOG_SYSTEM_CMD_MAX_SIZE];
|
||||
char systemCmd[DJI_SYSTEM_CMD_STR_MAX_SIZE];
|
||||
char folderName[DJI_LOG_FOLDER_NAME_MAX_SIZE];
|
||||
time_t currentTime = time(nullptr);
|
||||
struct tm *localTime = localtime(¤tTime);
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
/* Private constants ---------------------------------------------------------*/
|
||||
#define UART_DEV_NAME_STR_SIZE (128)
|
||||
#define DJI_SYSTEM_CMD_MAX_SIZE (64)
|
||||
#define DJI_SYSTEM_CMD_STR_MAX_SIZE (64)
|
||||
#define DJI_SYSTEM_RESULT_STR_MAX_SIZE (128)
|
||||
|
||||
/* Private types -------------------------------------------------------------*/
|
||||
@ -48,7 +48,7 @@ T_DjiReturnCode HalUart_Init(E_DjiHalUartNum uartNum, uint32_t baudRate, T_DjiUa
|
||||
struct flock lock;
|
||||
T_DjiReturnCode returnCode = DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
|
||||
char uartName[UART_DEV_NAME_STR_SIZE];
|
||||
char systemCmd[DJI_SYSTEM_CMD_MAX_SIZE];
|
||||
char systemCmd[DJI_SYSTEM_CMD_STR_MAX_SIZE];
|
||||
char *ret = NULL;
|
||||
char lineBuf[DJI_SYSTEM_RESULT_STR_MAX_SIZE] = {0};
|
||||
FILE *fp;
|
||||
|
@ -178,8 +178,8 @@ T_DjiReturnCode HalUsbBulk_ReadData(T_DjiUsbBulkHandle usbBulkHandle, uint8_t *b
|
||||
T_DjiReturnCode HalUsbBulk_GetDeviceInfo(T_DjiHalUsbBulkDeviceInfo *deviceInfo)
|
||||
{
|
||||
//attention: need confirm your usb config in device mode.
|
||||
deviceInfo->vid = 0x7020;
|
||||
deviceInfo->pid = 0x9055;
|
||||
deviceInfo->vid = 0x0955;
|
||||
deviceInfo->pid = 0x7020;
|
||||
|
||||
deviceInfo->bulkChannelNum = 2;
|
||||
|
||||
|
Reference in New Issue
Block a user