Skip to content

Commit c6e8e2b

Browse files
authored
Merge pull request #125 from BCLab-UNM/fix-script_and_debugcode
Give error message to user when -S used incorrectly. Removed debug output.
2 parents 03ca026 + 3683c22 commit c6e8e2b

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

misc/deploy.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ fi
214214

215215
while(true); do
216216

217-
if [ $2 == "-S" ]; then
217+
if [ "$2" == "-S" ]; then
218218

219219
i=3
220220

@@ -671,6 +671,9 @@ elif [ $OPTION == "-R" ]; then
671671

672672
i=0
673673
done
674+
else
675+
echo "Unrecognized command! Please ensure you are typing in your option correctly and try again!"
676+
exit 1
674677
fi
675678

676679
done

src/behaviours/src/DriveController.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,11 @@ Result DriveController::DoWork()
136136
{
137137
fastPID(0.0, errorYaw, result.pd.setPointVel, result.pd.setPointYaw);
138138

139-
std::cout << "LEFT: " << this->left << ", RIGHT: " << this->right << std::endl;
140-
141139
const int MIN_TURN_VALUE = 80;
142140

143141
//If wheels get a value less than 80, will cause robot to sit in place
144142
if(fabs(left) < MIN_TURN_VALUE && fabs(right) < MIN_TURN_VALUE)
145143
{
146-
147-
std::cout << "ERROR my speed was too slow, increasing" << std::endl;
148-
149144
//increase left and right values to minimum value, checking signs for negative or positive value
150145
if(this->left < 0)
151146
{
@@ -164,8 +159,6 @@ Result DriveController::DoWork()
164159
{
165160
this->right = MIN_TURN_VALUE;
166161
}
167-
168-
std::cout << "LEFT: " << this->left << ", RIGHT: " << this->right << std::endl;
169162
}
170163
}
171164

0 commit comments

Comments
 (0)