summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/motor
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/motor')
-rw-r--r--2005/i/robert/src/motor/motor.cc7
-rw-r--r--2005/i/robert/src/motor/motor.hh2
2 files changed, 9 insertions, 0 deletions
diff --git a/2005/i/robert/src/motor/motor.cc b/2005/i/robert/src/motor/motor.cc
index 9cf55f8..c292e9c 100644
--- a/2005/i/robert/src/motor/motor.cc
+++ b/2005/i/robert/src/motor/motor.cc
@@ -58,6 +58,7 @@ void Motor::init (void)
void Motor::stop(void)
{
asserv_.setSpeed();
+ idle_ = true;
}
double Motor::getX(void)
@@ -85,6 +86,12 @@ void Motor::setPosition(double x, double y, double a) //XXX Faire trois setteur
posA_ = a;
}
+void
+Motor::setPwm(int leftPwm, int rightPwm)
+{
+ asserv_.setPwm (leftPwm, rightPwm);
+}
+
void Motor::goTo(double x, double y, double a)
{
diff --git a/2005/i/robert/src/motor/motor.hh b/2005/i/robert/src/motor/motor.hh
index 062957c..b527525 100644
--- a/2005/i/robert/src/motor/motor.hh
+++ b/2005/i/robert/src/motor/motor.hh
@@ -115,6 +115,8 @@ class Motor : public Asserv::Receiver
void receiveSpeedStat (int leftError, int leftInt, int rightError,
int rightInt);
void receivePwm (double leftPwm, double rightPwm);
+ // Défini les valeurs de la PWM
+ void setPwm(int leftPwm = 0, int rightPwm = 0);
void receiveTiming (int motorTimer4,
int motorTimer3, int motorTimer2,
int motorTimer1, int motorTimer0);