summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ai/ai.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/ai/ai.cc')
-rw-r--r--2005/i/robert/src/ai/ai.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/2005/i/robert/src/ai/ai.cc b/2005/i/robert/src/ai/ai.cc
index 4ae0184..58bae71 100644
--- a/2005/i/robert/src/ai/ai.cc
+++ b/2005/i/robert/src/ai/ai.cc
@@ -94,7 +94,7 @@ void Ai::run(void)
std::cout << "On attend le jack" << std::endl;
waitJack(false);
std::cout << "Le jack est mis, on réinit la PWM" << std::endl;
- motor_.setPwm (0, 0);
+ pwm ();
// Attend la première sortie du jack(init)
waitJack(true);
std::cout << "Le jack est sorti" << std::endl;
@@ -169,6 +169,12 @@ void Ai::run(void)
std::cout << "On a fini" << std::endl;
}
+void Ai::pwm (void)
+{
+ motor_.setPwm (0, 0);
+ update();
+}
+
/// Attend.
void Ai::wait (int t)
{