From 103086b1a448cec58eb1fbcffe4911adaa3443e9 Mon Sep 17 00:00:00 2001 From: PgSocks Date: Tue, 29 Aug 2023 10:34:44 -0500 Subject: [PATCH] Add Push message type with vision detect info message --- include/message.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/include/message.h b/include/message.h index 00a6e09..ee9a07f 100644 --- a/include/message.h +++ b/include/message.h @@ -280,6 +280,42 @@ struct PACKED StreamCtrlResp { struct Footer footer; }; +struct PACKED VisionRect { + union { + struct { + float x; + float y; + float w; + float h; + uint32_t info; + } rect; + struct { + float x; + float y; + float theta; + float c; + uint32_t info; + } line; + struct { + float x; + float y; + float w; + float h; + uint16_t info; + uint16_t distance; + } marker; + }; +}; + +struct PACKED VisionDetectInfo { + struct Header header; + uint8_t type; + uint8_t status; + uint16_t errcode; + uint8_t count; + struct VisionRect rects[]; +}; + union Request { struct Header header; struct SetSdkConnectionReq sdkconn; @@ -312,10 +348,14 @@ union Response { struct BlasterFireResp blaster; struct StreamCtrlResp stream; }; +union Push { + struct VisionDetectInfo vision; +}; union Message { struct Header header; union Request req; union Response resp; + union Push push; }; enum MESSAGEERR {