forked from floratest1/SpireCV
change C interface
This commit is contained in:
parent
c81716302d
commit
7b2fe3a3b5
|
@ -3,7 +3,7 @@
|
||||||
* @Author: L LC @amov
|
* @Author: L LC @amov
|
||||||
* @Date: 2023-11-24 16:01:22
|
* @Date: 2023-11-24 16:01:22
|
||||||
* @LastEditors: L LC @amov
|
* @LastEditors: L LC @amov
|
||||||
* @LastEditTime: 2023-12-05 17:20:21
|
* @LastEditTime: 2023-12-06 11:35:58
|
||||||
* @FilePath: /SpireCV/gimbal_ctrl/driver/src/amovGimbal/amov_gimbal_c.h
|
* @FilePath: /SpireCV/gimbal_ctrl/driver/src/amovGimbal/amov_gimbal_c.h
|
||||||
*/
|
*/
|
||||||
#ifndef AMOV_GIMBAL_C_H
|
#ifndef AMOV_GIMBAL_C_H
|
||||||
|
@ -15,13 +15,13 @@
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
// initialization funtions
|
// initialization funtions
|
||||||
|
void amovGimbalCreat(char *type, uint32_t selfId, uint32_t gimbalId, void *handle);
|
||||||
|
void amovGimbalInBytesCallback(uint8_t *pData, uint32_t len, void *handle);
|
||||||
void amovGimbalSetRcvBytes(pAmovGimbalInputBytesInvoke callbaclk, void *handle, void *caller);
|
void amovGimbalSetRcvBytes(pAmovGimbalInputBytesInvoke callbaclk, void *handle, void *caller);
|
||||||
void amovGimbalSetSendBytes(pAmovGimbalOutputBytesInvoke callbaclk, void *handle, void *caller);
|
void amovGimbalSetSendBytes(pAmovGimbalOutputBytesInvoke callbaclk, void *handle, void *caller);
|
||||||
void amovGimbalInBytesCallback(uint8_t *pData, uint32_t len, void *handle);
|
|
||||||
void amovGimbalCreat(char *type, uint32_t selfId, uint32_t gimbalId, void *handle, void *caller);
|
|
||||||
void amovGimbalStart(pAmovGimbalStateInvoke callback, void *handle, void *caller);
|
|
||||||
void amovGimbalChangeStateCallback(pAmovGimbalStateInvoke callback, void *handle, void *caller);
|
void amovGimbalChangeStateCallback(pAmovGimbalStateInvoke callback, void *handle, void *caller);
|
||||||
void amovGimbalSetMsgCallback(pAmovGimbalMsgInvoke callback, void *handle, void *caller);
|
void amovGimbalSetMsgCallback(pAmovGimbalMsgInvoke callback, void *handle, void *caller);
|
||||||
|
void amovGimbalStart(pAmovGimbalStateInvoke callback, void *handle, void *caller);
|
||||||
|
|
||||||
// non-block functions
|
// non-block functions
|
||||||
uint32_t amovGimbalSetGimabalPos(AMOV_GIMBAL_POS_T *pos, void *handle);
|
uint32_t amovGimbalSetGimabalPos(AMOV_GIMBAL_POS_T *pos, void *handle);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @Author: L LC @amov
|
* @Author: L LC @amov
|
||||||
* @Date: 2023-11-27 12:28:32
|
* @Date: 2023-11-27 12:28:32
|
||||||
* @LastEditors: L LC @amov
|
* @LastEditors: L LC @amov
|
||||||
* @LastEditTime: 2023-12-05 17:21:42
|
* @LastEditTime: 2023-12-06 11:36:30
|
||||||
* @FilePath: /SpireCV/gimbal_ctrl/driver/src/amov_gimbal_interface_c.cpp
|
* @FilePath: /SpireCV/gimbal_ctrl/driver/src/amov_gimbal_interface_c.cpp
|
||||||
*/
|
*/
|
||||||
#include "amov_gimbal_private.h"
|
#include "amov_gimbal_private.h"
|
||||||
|
@ -24,7 +24,7 @@ void amovGimbalInBytesCallback(uint8_t *pData, uint32_t len, void *handle)
|
||||||
amovGimbal::gimbal::inBytesCallback(pData, len, (amovGimbal::gimbal *)handle);
|
amovGimbal::gimbal::inBytesCallback(pData, len, (amovGimbal::gimbal *)handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void amovGimbalCreat(char *type, uint32_t selfId, uint32_t gimbalId, void *handle, void *caller)
|
void amovGimbalCreat(char *type, uint32_t selfId, uint32_t gimbalId, void *handle)
|
||||||
{
|
{
|
||||||
std::string strType = type;
|
std::string strType = type;
|
||||||
handle = new amovGimbal::gimbal(strType, nullptr, selfId, gimbalId);
|
handle = new amovGimbal::gimbal(strType, nullptr, selfId, gimbalId);
|
||||||
|
|
Loading…
Reference in New Issue