Skip to content

Commit 49b65f3

Browse files
committed
针对TG系列修改固定分辨率时点数偏多问题
1 parent ad91aba commit 49b65f3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/CYdLidar.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -1303,8 +1303,10 @@ bool CYdLidar::calcSampleRate(int count, double scan_time)
13031303
m_PointTime = 1e9 / (m_SampleRate * 1000);
13041304
lidarPtr->setPointTime(m_PointTime);
13051305
if (!m_SingleChannel)
1306-
m_FixedSize = m_SampleRate * 1000 / (m_ScanFrequency - 0.1);
1306+
// m_FixedSize = m_SampleRate * 1000 / (m_ScanFrequency - 0.1); //不知转速为何要减少0.1
1307+
m_FixedSize = m_SampleRate * 1000 / (m_ScanFrequency);
13071308

1309+
printf("[YDLIDAR] Scan Frequency: %.02fHz\n", m_ScanFrequency);
13081310
if (!isSDMLidar(m_LidarType)) //非SDM雷达才打印Fixed Size
13091311
printf("[YDLIDAR] Fixed Size: %d\n", m_FixedSize);
13101312
printf("[YDLIDAR] Sample Rate: %.02fK\n", m_SampleRate);

src/YDlidarDriver.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ result_t YDlidarDriver::sendData(const uint8_t *data, size_t size) {
308308
return RESULT_FAIL;
309309
}
310310

311-
// if (m_Debug)
311+
if (m_Debug)
312312
{
313313
printf("send: ");
314314
printHex(data, r);

0 commit comments

Comments
 (0)