From 9273da606bdf52cc36e527f8c90dd33dca27b1d9 Mon Sep 17 00:00:00 2001 From: haller Date: Thu, 5 May 2005 15:17:42 +0000 Subject: Correction d'un bud d'update dans la fonction de reset de PWM --- 2005/i/robert/src/ai/ai.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to '2005/i/robert/src/ai/ai.cc') 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) { -- cgit v1.2.3