single channel lidar is possible now

This commit is contained in:
Christopher Wecht 2018-07-02 16:37:51 +02:00
parent ce468f7277
commit ed2fa69fb5
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ void ALidar::CreateLasers()
check(Description != nullptr);
const auto NumberOfLasers = Description->Channels;
check(NumberOfLasers > 0u);
const float DeltaAngle =
const float DeltaAngle = NumberOfLasers == 1u ? 0.f :
(Description->UpperFovLimit - Description->LowerFovLimit) /
static_cast<float>(NumberOfLasers - 1);
LaserAngles.Empty(NumberOfLasers);