summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/motor/test_motor.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/motor/test_motor.cc')
-rw-r--r--2005/i/robert/src/motor/test_motor.cc19
1 files changed, 15 insertions, 4 deletions
diff --git a/2005/i/robert/src/motor/test_motor.cc b/2005/i/robert/src/motor/test_motor.cc
index 9ccd4b8..c3f5aa9 100644
--- a/2005/i/robert/src/motor/test_motor.cc
+++ b/2005/i/robert/src/motor/test_motor.cc
@@ -72,8 +72,8 @@ main (int argc, char **argv)
case 'P':
std::cout << "position:\n" <<
"X: " << motor.getX() <<
- "Y: " << motor.getY() <<
- "A: " << motor.getA() << std::endl;
+ " Y: " << motor.getY() <<
+ " A: " << motor.getA() << std::endl;
break;
case 'g':
if(++i + 2 > argc)
@@ -88,7 +88,9 @@ main (int argc, char **argv)
break;
case 'I':
std::cout << "Moteur idle? "
- << motor.idle() << std::endl;
+ << (motor.idle() ? "true" : "false")
+ << std::endl;
+ break;
case 'l':
if(++i > argc)
throw std::runtime_error("syntax error");
@@ -100,7 +102,16 @@ main (int argc, char **argv)
motor.rotation(strtod(argv[i], 0));
break;
case 'J':
- std::cout << "Etat du Jack: " << (motor.jackState() ? "Retiré" : "Dedans");
+ std::cout << "Etat du Jack: " << (motor.jackState() ? "Retiré" : "Dedans") << std::endl;
+ break;
+ case 'C':
+ std::cout << "Couleur Sélectionné: " << (motor.colorState() ? "Rouge" : "Vert") << std::endl;
+ break;
+ case 'L':
+ while(!motor.idle())
+ {
+ motor.wait(-1);
+ }
break;
}
break;