12 #ifndef ONBOARDSDK_DJI_ADVANCED_SENSING_PROTOCOL_H 13 #define ONBOARDSDK_DJI_ADVANCED_SENSING_PROTOCOL_H 35 class AdvancedSensingProtocol :
public ProtocolBase
41 SELECT_IMG_CMD_ID = 0x00,
42 PROCESS_IMG_CMD_ID = 0x01,
43 SELECT_VGA_IMG_CMD_ID = 0x31,
44 PROCESS_VGA_CMD_ID = 0x2F,
47 enum VisionSensorDirection
65 AdvancedSensingProtocol();
68 ~AdvancedSensingProtocol();
72 void init(HardDriver* Driver, MMU* mmuPtr,
bool userCallbackThread =
false);
75 static const uint8_t SOF1 = 0x55;
76 static const uint8_t SOF2 = 0xaa;
79 static const int USB_MAXRECV = 5*(2+1)*240*320 + 12 + 8 + 200;
84 int formatProtocol(uint8_t *dst, uint8_t cmd_id,
85 uint8_t *data, uint32_t data_size);
87 int send(
void *cmd,
void *data, uint16_t data_len);
90 int sendInterface(
void *in_cmd_container);
92 int sendData(uint8_t *buf);
94 int sendWithLen(
void *data,
int data_len);
118 bool appHandler(
void *protocolHeader);
122 int crcHeadCheck(uint8_t* pMsg,
size_t nLen);
124 int crcTailCheck(uint8_t* pMsg,
size_t nLen);
136 #endif //ONBOARDSDK_DJI_ADVANCED_SENSING_PROTOCOL_H Serial device driver abstraction. Provided as an abstract class. Please inherit and implement for ind...
Data protection and thread management abstract classes.
Abstract protocol implementation for DJI OSDK.
struct DJI::OSDK::ACK::StereoVGAImgData StereoVGAImgData
This struct captures PushData when subscribe to VGA images.
handle array of characters
Definition: commondatarangehandler.h:14
All DJI OSDK ACK parsing.
Thread safety and data protection for DJI Onboard SDK on linux platforms.
struct DJI::OSDK::ACK::StereoImgData StereoImgData
This struct captures PushData when subscribe to QVGA images.