fallback CMake + Armor PID
This commit is contained in:
@@ -77,8 +77,12 @@ bool checkReconnect(bool is_camera_connect) {
|
||||
if (!is_camera_connect) {
|
||||
int curr_gain = ((CameraWrapper* )video)->gain;
|
||||
int curr_exposure = ((CameraWrapper* )video)->exposure;
|
||||
int curr_mode = ((CameraWrapper* )video)->mode; // 获取原始模式
|
||||
|
||||
delete video;
|
||||
video = new CameraWrapper(curr_exposure, curr_gain, 0/*, "armor"*/);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500)); // 等待硬件释放
|
||||
video = new CameraWrapper(curr_exposure, curr_gain, curr_mode/*, "armor"*/);
|
||||
//video = new CameraWrapper(curr_exposure, curr_gain, 0/*, "armor"*/);
|
||||
is_camera_connect = video->init();
|
||||
}
|
||||
return is_camera_connect;
|
||||
|
||||
Reference in New Issue
Block a user