From bf03b37b06877b55e4f23b627647a6b156ed664e Mon Sep 17 00:00:00 2001 From: haller Date: Thu, 25 May 2006 22:14:43 +0000 Subject: * Constification de getFd dans la classe Serial et ses clients * Fonction afterMatch dans ai * Fonction motorSmartFindHole * Déclaration de la fonction motorDeblock * Ajout d'info sur le lcd lors de l'init * Utilisation des capteurs barillet --- i/marvin/src/motor/motor.cc | 11 ++++++++++- i/marvin/src/motor/motor.hh | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'i/marvin/src/motor') diff --git a/i/marvin/src/motor/motor.cc b/i/marvin/src/motor/motor.cc index d2a7250..d3fadfc 100644 --- a/i/marvin/src/motor/motor.cc +++ b/i/marvin/src/motor/motor.cc @@ -102,11 +102,20 @@ Motor::stop (void) /// get the file descriptor int -Motor::getFd(void) +Motor::getFd(void) const { return asserv_.getFd(); } +/// get the position of robal +void +Motor::getPosition(double & x, double & y, double & a) const +{ + x = x_; + y = y_; + a = a_; +} + /// Next seq number. void Motor::nextSeq (void) diff --git a/i/marvin/src/motor/motor.hh b/i/marvin/src/motor/motor.hh index 68da820..f1c9843 100644 --- a/i/marvin/src/motor/motor.hh +++ b/i/marvin/src/motor/motor.hh @@ -62,9 +62,11 @@ class Motor : public Asserv::Receiver /// Stop now. void stop (void); /// get the file descriptor - int getFd(void); + int getFd(void) const; /// Reset. void reset (void); + /// get the position of robal + void getPosition(double & x, double & y, double & a) const; private: /// Next seq number. inline void nextSeq (void); -- cgit v1.2.3