diff --git a/LivoxPacketInterpreters/vtkLivoxPacketInterpreter.cxx b/LivoxPacketInterpreters/vtkLivoxPacketInterpreter.cxx index 116869ed9b1c46c0e932e3a4a272fc06cd9e079f..55f48beaf29a54125099cb1b8c7c38b4bbb9c1fb 100644 --- a/LivoxPacketInterpreters/vtkLivoxPacketInterpreter.cxx +++ b/LivoxPacketInterpreters/vtkLivoxPacketInterpreter.cxx @@ -75,7 +75,7 @@ public: //----------------------------------------------------------------------------- template - void FillPoints(double* pos, const T& point, double timestamp, int laserId) + void FillPoints(double* pos, const T& point, double timestamp, uint8_t laserId) { if (std::isnan(pos[0]) || std::isnan(pos[1]) || std::isnan(pos[2])) { @@ -117,7 +117,7 @@ public: static_cast(points[i].y) / 1000, static_cast(points[i].z) / 1000 }; uint64_t ptsTimestamp = GetEthPacketTimestamp(pkt->timestamp, 8) + i * pkt->time_interval; - auto laserId = i % 4; + uint8_t laserId = i % 4; this->FillPoints(pos, points[i], ptsTimestamp, laserId); } } @@ -135,7 +135,7 @@ public: static_cast(points[i].y) / 100, static_cast(points[i].z) / 100 }; uint64_t ptsTimestamp = GetEthPacketTimestamp(pkt->timestamp, 8) + i * pkt->time_interval; - auto laserId = i % 4; + uint8_t laserId = i % 4; this->FillPoints(pos, points[i], ptsTimestamp, laserId); } } @@ -156,7 +156,7 @@ public: pos[1] = rho * std::sin(phi) * std::sin(theta); pos[2] = rho * std::cos(phi); uint64_t ptsTimestamp = GetEthPacketTimestamp(pkt->timestamp, 8) + i * pkt->time_interval; - auto laserId = i % 4; + uint8_t laserId = i % 4; this->FillPoints(pos, points[i], ptsTimestamp, laserId); } } @@ -242,7 +242,7 @@ vtkSmartPointer vtkLivoxPacketInterpreter::CreateNewEmptyFrame(vtkI InitArrayForPolyData(true, internals->PointsZ, "Z", nbrOfPoints, prereservedNbrOfPoints, polyData, this->EnableAdvancedArrays); InitArrayForPolyData(false, internals->Intensity, "intensity", nbrOfPoints, prereservedNbrOfPoints, polyData); InitArrayForPolyData(false, internals->Timestamp, "timestamp", nbrOfPoints, prereservedNbrOfPoints, polyData); - InitArrayForPolyData(false, internals->LaserId, "laser_id", nbrOfPoints, prereservedNbrOfPoints, polyData); + InitArrayForPolyData(false, internals->LaserId, "laser_id", nbrOfPoints, prereservedNbrOfPoints, polyData); InitArrayForPolyData(false, internals->Distance, "distance_m", nbrOfPoints, prereservedNbrOfPoints, polyData); InitArrayForPolyData(true, internals->TagGlue, "tag_glue", nbrOfPoints, prereservedNbrOfPoints, polyData, this->EnableAdvancedArrays); InitArrayForPolyData(true, internals->TagParticles, "tag_particles", nbrOfPoints, prereservedNbrOfPoints, polyData, this->EnableAdvancedArrays);