change C interface

This commit is contained in:
AiYangSky 2023-12-06 11:39:29 +08:00
parent c81716302d
commit 7b2fe3a3b5
2 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@
* @Author: L LC @amov
* @Date: 2023-11-24 16:01:22
* @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
*/
#ifndef AMOV_GIMBAL_C_H
@ -15,13 +15,13 @@
extern "C"
{
// 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 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 amovGimbalSetMsgCallback(pAmovGimbalMsgInvoke callback, void *handle, void *caller);
void amovGimbalStart(pAmovGimbalStateInvoke callback, void *handle, void *caller);
// non-block functions
uint32_t amovGimbalSetGimabalPos(AMOV_GIMBAL_POS_T *pos, void *handle);

View File

@ -3,7 +3,7 @@
* @Author: L LC @amov
* @Date: 2023-11-27 12:28:32
* @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
*/
#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);
}
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;
handle = new amovGimbal::gimbal(strType, nullptr, selfId, gimbalId);