Skip to content

Commit 36379b9

Browse files
committed
1. S2E Ip Configuration Support. 2. add bonjour.zip and dll.rar for Windows
1 parent 9d85aae commit 36379b9

File tree

6 files changed

+17
-9
lines changed

6 files changed

+17
-9
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
.vscode
12
.vs
3+
*.user
4+
*.aps
5+
obj
6+
output
7+
*.ipch
28
*.sdf
39
sdk/obj
410
**/ipch

app/frame_grabber/MainFrm.cpp

+9-7
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,14 @@ LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/
120120
}
121121
ipConfigMenu_.CreateMenu();
122122
lidarType = 1;
123-
if ((devInfo.model >> 4) > LIDAR_T_SERIES_MINUM_MAJOR_ID) {
124-
LidarMgr::GetInstance().lidar_drv->getDeviceMacAddr(devMac.macaddr);
125-
m_CmdBar.GetMenu().GetSubMenu(1).AppendMenuA(MF_STRING, IPCONFIG_SUB, TEXT("Ip Config"));
126-
support_motor_ctrl = true;
127-
lidarType = 2;
128-
123+
if ((devInfo.model >> 4) > (LIDAR_S_SERIES_MINUM_MAJOR_ID+1)) {
124+
sl_result ans = LidarMgr::GetInstance().lidar_drv->getDeviceMacAddr(devMac.macaddr);
125+
if (SL_IS_OK(ans)) {
126+
m_CmdBar.GetMenu().GetSubMenu(1).AppendMenuA(MF_STRING, IPCONFIG_SUB, TEXT("Ip Config"));
127+
support_motor_ctrl = true;
128+
lidarType = 2;
129+
}
130+
129131
}
130132

131133
MotorCtrlSupport motorSupport;
@@ -179,7 +181,7 @@ void CMainFrame::ipConfig()
179181

180182
onSwitchMode(WORKING_MODE_IDLE);
181183
CIpConfigDlg dlg;
182-
dlg.initIpconfig(channelRecord_.network.ip, NULL, NULL);
184+
dlg.initIpconfig(channelRecord_.network.ip, "255.255.255.0", "192.168.11.1");
183185
dlg.DoModal();
184186
if (dlg.getIpConfResult())
185187
{

app/frame_grabber/scanView.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ void CScanView::onDrawSelf(CDCHandle dc)
167167
memDC.FillSolidRect((int)endptX-1,(int)endptY-1, 2, 2,RGB(255,0,0));
168168

169169
memDC.SetTextColor(RGB(255,0,0));
170-
sprintf(txtBuffer, "Current: %.2f Deg: %.2f", _scan_data[picked_point].dist, _scan_data[picked_point].angle);
170+
sprintf(txtBuffer, "Current: %.2f Deg: %.2f,Quality:%d", _scan_data[picked_point].dist, _scan_data[picked_point].angle, _scan_data[picked_point].quality);
171171
memDC.TextOutA(DEF_MARGIN, DEF_MARGIN + 20, txtBuffer);
172172

173173
memDC.SetTextColor(RGB(255,255,255));

bonjour.zip

2.09 MB
Binary file not shown.

dll.rar

12 MB
Binary file not shown.

sdk/src/sl_udp_channel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ namespace sl {
7878

7979
int write(const void* data, size_t size)
8080
{
81-
return _binded_socket->sendTo(NULL, data, size);
81+
return _binded_socket->sendTo(_socket, data, size);
8282
}
8383

8484
int read(void* buffer, size_t size)

0 commit comments

Comments
 (0)