Permalink
Browse files

Added ignore areas for rear scanner and reading of these settings

  • Loading branch information...
1 parent 12b35a1 commit 5318c86c0f7a661c602c04bd749ebb353d9f8909 @markusk committed Apr 22, 2012
Showing with 26 additions and 10 deletions.
  1. +4 −0 direcs/bin/direcs.ini
  2. +22 −10 direcs/src/direcs.cpp
View
@@ -25,6 +25,10 @@ laserscannerFrontIgnoreArea1Start=0.0
laserscannerFrontIgnoreArea1End=10.0
laserscannerFrontIgnoreArea2Start=260.0
laserscannerFrontIgnoreArea2End=270.0
+laserscannerRearIgnoreArea1Start=0.0
+laserscannerRearIgnoreArea1End=10.0
+laserscannerRearIgnoreArea2Start=260.0
+laserscannerRearIgnoreArea2End=270.0
useCamera=1
robotSlot=2
robotSlotWidth=84
View
@@ -3094,27 +3094,39 @@ void Direcs::readSettings()
//---------------------------------------------------------------------
// read next setting
- laserscannerIgnoreAreaEnd = inifile1->readFloat("Config", "laserscannerRearIgnoreArea2End");
+ laserscannerIgnoreAreaStart = inifile1->readFloat("Config", "laserscannerRearIgnoreArea2Start");
- if (laserscannerIgnoreAreaEnd == -1.0)
+ if (laserscannerIgnoreAreaStart == -1.0)
{
- emit message("<font color=\"#FF0000\">Value \"laserscannerRearIgnoreArea2End\"not found in ini-file!</font>");
+ emit message("<font color=\"#FF0000\">Value \"laserscannerRearIgnoreArea2Start\"not found in ini-file!</font>");
}
else
{
- if (consoleMode)
+ //---------------------------------------------------------------------
+ // read next setting
+ laserscannerIgnoreAreaEnd = inifile1->readFloat("Config", "laserscannerRearIgnoreArea2End");
+
+ if (laserscannerIgnoreAreaEnd == -1.0)
{
- /// @todo add this: consoleGui->setLaserscannerAngle(LASER1, laserscanner...Front);
+ emit message("<font color=\"#FF0000\">Value \"laserscannerRearIgnoreArea2End\"not found in ini-file!</font>");
}
else
{
- /// @todo gui->setLaserscannerAngle(LASER1, laserscanner...Front);
- }
- emit message(QString("Rear laser scanner ignore area %1 set to <b>%2-%3%1</b>.").arg(AREA2).arg(laserscannerIgnoreAreaStart).arg(laserscannerIgnoreAreaEnd));
- // store settings in obstacle check thread
- obstCheckThread->setIgnoreArea(LASER2, AREA2, laserscannerIgnoreAreaStart, laserscannerIgnoreAreaEnd);
+ if (consoleMode)
+ {
+ /// @todo add this: consoleGui->setLaserscannerAngle(LASER2, laserscanner...Rear);
+ }
+ else
+ {
+ /// @todo gui->setLaserscannerAngle(LASER1, laserscanner...Rear);
+ }
+ emit message(QString("Rear laser scanner ignore area %1 set to <b>%2-%3%1</b>.").arg(AREA2).arg(laserscannerIgnoreAreaStart).arg(laserscannerIgnoreAreaEnd));
+
+ // store settings in obstacle check thread
+ obstCheckThread->setIgnoreArea(LASER2, AREA2, laserscannerIgnoreAreaStart, laserscannerIgnoreAreaEnd);
+ }
}
}

0 comments on commit 5318c86

Please sign in to comment.