Skip to content

Commit

Permalink
针对TG系列修改固定分辨率时点数偏多问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanyiaini committed Jun 17, 2024
1 parent ad91aba commit 49b65f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/CYdLidar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1303,8 +1303,10 @@ bool CYdLidar::calcSampleRate(int count, double scan_time)
m_PointTime = 1e9 / (m_SampleRate * 1000);
lidarPtr->setPointTime(m_PointTime);
if (!m_SingleChannel)
m_FixedSize = m_SampleRate * 1000 / (m_ScanFrequency - 0.1);
// m_FixedSize = m_SampleRate * 1000 / (m_ScanFrequency - 0.1); //不知转速为何要减少0.1
m_FixedSize = m_SampleRate * 1000 / (m_ScanFrequency);

printf("[YDLIDAR] Scan Frequency: %.02fHz\n", m_ScanFrequency);
if (!isSDMLidar(m_LidarType)) //非SDM雷达才打印Fixed Size
printf("[YDLIDAR] Fixed Size: %d\n", m_FixedSize);
printf("[YDLIDAR] Sample Rate: %.02fK\n", m_SampleRate);
Expand Down
2 changes: 1 addition & 1 deletion src/YDlidarDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ result_t YDlidarDriver::sendData(const uint8_t *data, size_t size) {
return RESULT_FAIL;
}

// if (m_Debug)
if (m_Debug)
{
printf("send: ");
printHex(data, r);
Expand Down

0 comments on commit 49b65f3

Please sign in to comment.