summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhaller2005-05-05 15:17:42 +0000
committerhaller2005-05-05 15:17:42 +0000
commit9273da606bdf52cc36e527f8c90dd33dca27b1d9 (patch)
treef74d7213908c708caa287c43332612d4739e19e5
parentac7a3ff340bcbbcb43318d7ace513806882b309c (diff)
Correction d'un bud d'update dans la fonction de reset de PWM
-rw-r--r--2005/i/robert/src/ai/ai.cc8
-rw-r--r--2005/i/robert/src/ai/ai.hh1
2 files changed, 8 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)
{
diff --git a/2005/i/robert/src/ai/ai.hh b/2005/i/robert/src/ai/ai.hh
index 4de1e5d..cb2e051 100644
--- a/2005/i/robert/src/ai/ai.hh
+++ b/2005/i/robert/src/ai/ai.hh
@@ -80,6 +80,7 @@ class Ai
/// Attend une mise à jour
bool update (void);
void sync (void);
+ void pwm (void);
};
#endif // ai_hh