forked from floratest1/SpireCV
fix stack thread not open
This commit is contained in:
parent
62051a730b
commit
c81716302d
|
@ -3,7 +3,7 @@
|
|||
* @Author: L LC @amov
|
||||
* @Date: 2022-10-27 18:10:06
|
||||
* @LastEditors: L LC @amov
|
||||
* @LastEditTime: 2023-12-05 17:23:48
|
||||
* @LastEditTime: 2023-12-06 10:27:59
|
||||
* @FilePath: /SpireCV/gimbal_ctrl/driver/src/AT10/AT10_gimbal_driver.cpp
|
||||
*/
|
||||
#include "AT10_gimbal_driver.h"
|
||||
|
@ -380,9 +380,10 @@ void AT10GimbalDriver::getExtRxPack(void)
|
|||
}
|
||||
}
|
||||
|
||||
void AT10GimbalDriver::parserStart(pAmovGimbalStateInvoke callback)
|
||||
void AT10GimbalDriver::parserStart(pAmovGimbalStateInvoke callback, void *caller)
|
||||
{
|
||||
this->updateGimbalStateCallback = callback;
|
||||
this->updataCaller = caller;
|
||||
|
||||
std::thread parser(&AT10GimbalDriver::parserLoop, this);
|
||||
std::thread getStdRxPackLoop(&AT10GimbalDriver::getStdRxPack, this);
|
||||
|
|
|
@ -3,12 +3,11 @@
|
|||
* @Author: L LC @amov
|
||||
* @Date: 2022-10-28 12:24:21
|
||||
* @LastEditors: L LC @amov
|
||||
* @LastEditTime: 2023-12-05 16:30:42
|
||||
* @LastEditTime: 2023-12-06 10:27:48
|
||||
* @FilePath: /SpireCV/gimbal_ctrl/driver/src/AT10/AT10_gimbal_driver.h
|
||||
*/
|
||||
#ifndef __AT10_DRIVER_H
|
||||
#define __AT10_DRIVER_H
|
||||
|
||||
#include "../amov_gimbal_private.h"
|
||||
#include "AT10_gimbal_struct.h"
|
||||
#include <mutex>
|
||||
|
@ -31,7 +30,7 @@ private:
|
|||
void sendHeart(void);
|
||||
void sendStd(void);
|
||||
|
||||
void parserStart(pAmovGimbalStateInvoke callback);
|
||||
void parserStart(pAmovGimbalStateInvoke callback, void *caller);
|
||||
void parserLoop(void);
|
||||
void getExtRxPack(void);
|
||||
void getStdRxPack(void);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: L LC @amov
|
||||
* @Date: 2023-10-20 16:08:17
|
||||
* @LastEditors: L LC @amov
|
||||
* @LastEditTime: 2023-12-05 17:37:59
|
||||
* @LastEditTime: 2023-12-06 10:27:28
|
||||
* @FilePath: /SpireCV/gimbal_ctrl/driver/src/GX40/GX40_gimbal_driver.cpp
|
||||
*/
|
||||
#include <string.h>
|
||||
|
@ -51,9 +51,10 @@ void GX40GimbalDriver::nopSend(void)
|
|||
* pointer type. It is used to specify a callback function that will be invoked when the gimbal state
|
||||
* is updated.
|
||||
*/
|
||||
void GX40GimbalDriver::parserStart(pAmovGimbalStateInvoke callback)
|
||||
void GX40GimbalDriver::parserStart(pAmovGimbalStateInvoke callback, void *caller)
|
||||
{
|
||||
this->updateGimbalStateCallback = callback;
|
||||
this->updataCaller = caller;
|
||||
|
||||
std::thread mainLoop(&GX40GimbalDriver::mainLoop, this);
|
||||
std::thread sendNop(&GX40GimbalDriver::nopSend, this);
|
||||
|
|
|
@ -4,13 +4,11 @@
|
|||
* @Author: L LC @amov
|
||||
* @Date: 2023-10-20 16:08:13
|
||||
* @LastEditors: L LC @amov
|
||||
* @LastEditTime: 2023-12-05 16:29:20
|
||||
* @LastEditTime: 2023-12-06 10:27:05
|
||||
* @FilePath: /SpireCV/gimbal_ctrl/driver/src/GX40/GX40_gimbal_driver.h
|
||||
*/
|
||||
|
||||
#ifndef __GX40_DRIVER_H
|
||||
#define __GX40_DRIVER_H
|
||||
|
||||
#include "../amov_gimbal_private.h"
|
||||
#include "GX40_gimbal_struct.h"
|
||||
#include <mutex>
|
||||
|
@ -36,7 +34,7 @@ class GX40GimbalDriver : public amovGimbal::amovGimbalBase
|
|||
|
||||
std::thread::native_handle_type nopSendThreadHandle;
|
||||
void nopSend(void);
|
||||
void parserStart(pAmovGimbalStateInvoke callback);
|
||||
void parserStart(pAmovGimbalStateInvoke callback, void *caller);
|
||||
|
||||
public:
|
||||
uint32_t pack(IN uint32_t cmd, uint8_t *pPayload, uint8_t payloadSize);
|
||||
|
|
Loading…
Reference in New Issue