75 static int errorCounter = 0;
112 if (errorCounter > 0)
125 emit
message(QString(
"%1 ERRORs reading S300 data. Laser thread stopped!").arg(
MAXERRORS));
131 emit
message(QString(
"%1. error reading S300 laser.").arg(errorCounter));
158 float currentDistance = 0.0;
322 qDebug(
"Front laser angle not set before calling LaserThread::setSimulationMode()!");
327 qDebug(
"Front laser resolution not set before calling LaserThread::setSimulationMode()!");
336 qDebug(
"Rear laser angle not set before calling LaserThread::setSimulationMode()!");
341 qDebug(
"Rear laser resolution not set before calling LaserThread::setSimulationMode()!");
420 switch (laserScanner)
446 qDebug(
"Laser2 for S300 not yet supported (LaserThread::setSerialPort)");
454 qDebug(
"Laser number %d not yet supported (LaserThread::setSerialPort)", laserScanner);
462 switch (laserScanner)
471 qDebug(
"laser number not yet supported (LaserThread::setMounting");
479 switch (laserScanner)
482 if (laserType==
"S300")
488 if (laserType==
"none")
494 qDebug(
"laser type not yet supported (LaserThread::setLaserscannerType, LASER1");
499 if (laserType==
"S300")
505 if (laserType==
"none")
511 qDebug(
"laser type not yet supported (LaserThread::setLaserscannerType, LASER2");
516 qDebug(
"laser number not yet supported (LaserThread::setLaserscannerType");
523 if (laserType==
"S300")
538 switch (laserScanner)
549 qDebug(
"laser number not yet supported (LaserThread::setLaserscannerAngle");
557 switch (laserScanner)
568 qDebug(
"laser number not yet supported (LaserThread::setLaserscannerResolution");
576 switch (laserScanner)
586 qDebug(
"laser number not yet supported (LaserThread::getAngle");
593 switch (laserScanner)
603 qDebug(
"laser number not yet supported (LaserThread::getResolution");
610 switch (laserScanner)
616 qDebug(
"Front laser angle not set before calling LaserThread::isConnecteed()!");
621 qDebug(
"Front laser resolution not set before calling LaserThread::isConnecteed()!");
662 qDebug(
"ERROR: Unsupported laser type! (LaserThread::isConnected)");
672 qDebug(
"Rear laser angle not set before calling LaserThread::isConnecteed()!");
677 qDebug(
"Rear laser resolution not set before calling LaserThread::isConnecteed()!");
702 qDebug(
"Support for a second S300 as rear laser scanner not implemented yet");
710 qDebug(
"ERROR: Unsupported laser type! (LaserThread::isConnected)");
717 qDebug(
"laser number not yet supported (LaserThread::setMounting");
729 float floatValue = -1.0;
738 if (floatValue == -1)
741 qDebug(
"Simulation value \"%d\" not found in sim file at [Frontlaser]! LaserThread::setSimulationValues", i);
742 qDebug(
"Stopping to read!");
758 if (floatValue == -1)
761 qDebug(
"Simulation value \"%d\" not found in sim file at [Rearlaser]! LaserThread::setSimulationValues", i);
762 qDebug(
"Stopping to read!");
785 now = QDateTime::currentDateTime();
788 filename = QString(
"direcs__%1-%2-%3__%4-%5-%6.sim").arg(now.toString(
"yyyy")).arg(now.toString(
"MM")).arg(now.toString(
"dd")).arg(now.toString(
"hh")).arg(now.toString(
"mm")).arg(now.toString(
"ss"));
797 stringName = QString(
"%1").arg(i);
811 stringName = QString(
"%1").arg(i);
822 emit
message(QString(
"Laser data written to <b>%1</b>").arg(filename));