File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,16 +7,16 @@ int main() {
77 Synchronizer synchronizer;
88
99 synchronizer.SetUsbLink (" /dev/ttyACM0" , 460800 );
10-
10+ // 2.配置同步接口
1111 std::map<std::string, TriggerDevice> params;
1212 params[" cus_camera" ] = CAM_1;
1313 const auto cus_cam = std::make_shared<CustomCam>(params);
1414 synchronizer.UseCam (cus_cam);
1515
16- // 2 .开启同步
16+ // 3 .开启同步
1717 synchronizer.Start ();
1818
19- // 3 .订阅数据
19+ // 4 .订阅数据
2020 Synchronizer::PrintSummary ();
2121 zmq::context_t context (1 );
2222 zmq::socket_t subscriber (context, zmq::socket_type::sub);
@@ -33,7 +33,7 @@ int main() {
3333 }
3434 }
3535 }
36- // 4 .停止同步
36+ // 5 .停止同步
3737 synchronizer.Stop ();
3838 return 0 ;
3939}
Original file line number Diff line number Diff line change @@ -5,21 +5,17 @@ int main() {
55
66 // 1.创建同步器
77 Synchronizer synchronizer;
8- /*
9- 使用网口连接
10- synchronizer.SetNetLink("192.168.1.188", 8888);
11- */
128 synchronizer.SetUsbLink (" /dev/ttyACM0" , 460800 );
13- // 如使用工业相机, 需要指定 相机名称 和 同步板的触发端口
9+ // 2.配置同步接口
1410 std::map<std::string, TriggerDevice> params;
15- params[" camera_1" ] = TriggerDevice:: CAM_1; // camera_1:表示设备的名称,TriggerDevice::CAM_1:使用同步板CAM_1端口触发
11+ params[" camera_1" ] = CAM_1;
1612 const auto mv_cam = std::make_shared<MvCam>(params);
1713 synchronizer.UseCam (mv_cam);
1814
19- // 2 .开启同步
15+ // 3 .开启同步
2016 synchronizer.Start ();
2117
22- // 3.订阅数据
18+ // 4.接受数据
2319 Synchronizer::PrintSummary ();
2420 zmq::context_t context (1 );
2521 zmq::socket_t subscriber (context, zmq::socket_type::sub);
@@ -36,7 +32,7 @@ int main() {
3632 }
3733 }
3834 }
39- // 4 .停止同步
35+ // 5 .停止同步
4036 synchronizer.Stop ();
4137 return 0 ;
4238}
You can’t perform that action at this time.
0 commit comments