Skip to content

Commit 0b53a09

Browse files
committed
1.new feature:support vs2019; 1.bugfix: grabscandata may miss the syncbit
1 parent a9ad2ce commit 0b53a09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3124
-34
lines changed

sdk/app/frame_grabber/stdafx.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,5 @@ using namespace WTL;
7575

7676
//STL
7777
#include <vector>
78-
#include <map>
78+
#include <map>
79+
#include <string>

sdk/app/simple_grabber/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ using namespace rp::standalone::rplidar;
5454
void print_usage(int argc, const char * argv[])
5555
{
5656
printf("Simple LIDAR data grabber for RPLIDAR.\n"
57-
"Version: "RPLIDAR_SDK_VERSION"\n"
57+
"Version: " RPLIDAR_SDK_VERSION "\n"
5858
"Usage:\n"
5959
"%s <com port> [baudrate]\n"
6060
"The default baudrate is 115200(for A2) or 256000(for A3). Please refer to the datasheet for details.\n"

sdk/app/ultra_simple/main.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <stdlib.h>
2929

3030
#include "rplidar.h" //RPLIDAR standard sdk, all-in-one header
31-
31+
#include "time.h"
3232
#ifndef _countof
3333
#define _countof(_Array) (int)(sizeof(_Array) / sizeof(_Array[0]))
3434
#endif
@@ -90,7 +90,7 @@ int main(int argc, const char * argv[]) {
9090
bool useArgcBaudrate = false;
9191

9292
printf("Ultra simple LIDAR data grabber for RPLIDAR.\n"
93-
"Version: "RPLIDAR_SDK_VERSION"\n");
93+
"Version: " RPLIDAR_SDK_VERSION "\n");
9494

9595
// read serial port from the command line...
9696
if (argc>1) opt_com_path = argv[1]; // or set to a fixed value: e.g. "com3"
@@ -105,7 +105,7 @@ int main(int argc, const char * argv[]) {
105105
if (!opt_com_path) {
106106
#ifdef _WIN32
107107
// use default com port
108-
opt_com_path = "\\\\.\\com3";
108+
opt_com_path = "\\\\.\\com57";
109109
#elif __APPLE__
110110
opt_com_path = "/dev/tty.SLAB_USBtoUART";
111111
#else
@@ -205,15 +205,16 @@ int main(int argc, const char * argv[]) {
205205
size_t count = _countof(nodes);
206206

207207
op_result = drv->grabScanDataHq(nodes, count);
208-
208+
if (count > 1500)
209+
printf("time:%u secs. cnt:%d/n", clock() / CLOCKS_PER_SEC,count);
209210
if (IS_OK(op_result)) {
210211
drv->ascendScanData(nodes, count);
211212
for (int pos = 0; pos < (int)count ; ++pos) {
212-
printf("%s theta: %03.2f Dist: %08.2f Q: %d \n",
213-
(nodes[pos].flag & RPLIDAR_RESP_MEASUREMENT_SYNCBIT) ?"S ":" ",
214-
(nodes[pos].angle_z_q14 * 90.f / (1 << 14)),
215-
nodes[pos].dist_mm_q2/4.0f,
216-
nodes[pos].quality);
213+
//printf("%s theta: %03.2f Dist: %08.2f Q: %d \n",
214+
// (nodes[pos].flag & RPLIDAR_RESP_MEASUREMENT_SYNCBIT) ?"S ":" ",
215+
// (nodes[pos].angle_z_q14 * 90.f / (1 << 14)),
216+
// nodes[pos].dist_mm_q2/4.0f,
217+
// nodes[pos].quality);
217218
}
218219
}
219220

93.2 KB
Binary file not shown.
4.14 KB
Binary file not shown.
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#v4.0:v100
2+
Debug|Win32|D:\sdk\rplidar_sdk\rplidar_sdk\sdk\workspaces\vc10\|

sdk/build/windows-i386-Debug/object/lidar_driver/lidar_driver.unsuccessfulbuild

Whitespace-only changes.
107 KB
Binary file not shown.

0 commit comments

Comments
 (0)