summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--d/tools/doc/subversion/svn.txt8
-rw-r--r--i/marvin/src/asserv/test_asserv.cc4
-rw-r--r--i/marvin/src/motor/motor.cc4
-rw-r--r--i/marvin/src/motor/motor.hh2
-rw-r--r--i/marvin/src/motor/test_motor.cc16
-rw-r--r--i/marvin/src/proto/proto.cc16
-rw-r--r--i/marvin/src/proto/proto.hh2
7 files changed, 24 insertions, 28 deletions
diff --git a/d/tools/doc/subversion/svn.txt b/d/tools/doc/subversion/svn.txt
index b97163a..fd2b696 100644
--- a/d/tools/doc/subversion/svn.txt
+++ b/d/tools/doc/subversion/svn.txt
@@ -151,6 +151,7 @@ Cela vous renverra une liste de fichier avec leur status avant :
D -> Fichier qui sera supprimer du dépot lord du prochain commit
M -> Fichier modifié localement
C -> Fichier à conflit
+ X -> Dossier qui fait partie d'un SVN externe
? -> Fichier non connu par SVN (n'existe pas dans le dépot)
! -> Fichier manquant
Lorsque vous avez un fichier marqué d'un |?| et que vous voulez le mettre dans
@@ -369,3 +370,10 @@ solution numéro 1, [revert]) faites un [svn resolved le__nom__du__fichier \
#---PASS-HTML <font color=red size="+1">
Attention, un fichier peut contenir _plusieurs_ conflits !
#---PASS-HTML </font>
+
+* En savoir plus
+Cette documentation n'est pas des plus complêtes mais elle permet d'avoir un
+apperçu sur le fonctionnement général de subversion.
+Pour plus d'informations, je ne peux que vous renvoyer sur la documentation
+officielle et très complête que vous trouverez à l'adresse suivante :
+http://svnbook.red-bean.com/en/1.1/svn-book.html
diff --git a/i/marvin/src/asserv/test_asserv.cc b/i/marvin/src/asserv/test_asserv.cc
index 228748c..6d4e672 100644
--- a/i/marvin/src/asserv/test_asserv.cc
+++ b/i/marvin/src/asserv/test_asserv.cc
@@ -311,7 +311,8 @@ main (int argc, char **argv)
break;
}
}
- asserv.sync();
+ while (!asserv.wait ())
+ ;
break;
}
case 'w':
@@ -325,7 +326,6 @@ main (int argc, char **argv)
{
asserv.wait (stop - t);
t = Timer::getProgramTime ();
- asserv.sync();
}
break;
}
diff --git a/i/marvin/src/motor/motor.cc b/i/marvin/src/motor/motor.cc
index c292e9c..7e78aff 100644
--- a/i/marvin/src/motor/motor.cc
+++ b/i/marvin/src/motor/motor.cc
@@ -206,9 +206,11 @@ bool Motor::sync(void)
return false;
}
-void Motor::wait(int timeout)
+bool
+Motor::wait(int timeout)
{
asserv_.wait(timeout);
+ return sync ();
}
/// Récupère le File Descriptor
diff --git a/i/marvin/src/motor/motor.hh b/i/marvin/src/motor/motor.hh
index b527525..ad67f84 100644
--- a/i/marvin/src/motor/motor.hh
+++ b/i/marvin/src/motor/motor.hh
@@ -100,7 +100,7 @@ class Motor : public Asserv::Receiver
/// Syncronisation
bool sync(void);
/// On attend...
- void wait(int timeout);
+ bool wait(int timeout = -1);
/// Récupère le File Descriptor
int getFd(void);
/// Retoure l'état du jack (false entrée et true sortie)
diff --git a/i/marvin/src/motor/test_motor.cc b/i/marvin/src/motor/test_motor.cc
index 137e355..f01e299 100644
--- a/i/marvin/src/motor/test_motor.cc
+++ b/i/marvin/src/motor/test_motor.cc
@@ -112,20 +112,9 @@ main (int argc, char **argv)
throw std::runtime_error("syntax error");
motor.setAccel(strtol(argv[0], 0, 10));
break;
- case 'L':
- while(!motor.idle())
- {
- motor.wait(-1);
- motor.sync();
- }
- break;
- }
- motor.sync();
- while(!motor.idle())
- {
- motor.wait(-1);
- motor.sync();
}
+ while(!motor.wait () || !motor.idle ())
+ ;
break;
}
@@ -140,7 +129,6 @@ main (int argc, char **argv)
{
motor.wait (stop - t);
t = Timer::getProgramTime ();
- motor.sync();
}
break;
}
diff --git a/i/marvin/src/proto/proto.cc b/i/marvin/src/proto/proto.cc
index a7ada32..3569a47 100644
--- a/i/marvin/src/proto/proto.cc
+++ b/i/marvin/src/proto/proto.cc
@@ -56,11 +56,10 @@ Proto::close(void)
bool
Proto::sync(void)
{
- bool reGet;
// Récupération de la frame
- while (reGet = getFrame())
+ while (getFrame())
{
- //log_ ("recv") << "frame" << currentFrame_;
+// log_ ("recv") << "frame" << currentFrame_;
// Si la frame est un aquittement
if(currentFrame_ == frameQueue_.front())
{
@@ -96,7 +95,6 @@ Proto::send (const Frame & frame, bool reliable)
}
else
sendFrame(frame);
- // XXX sync();
}
@@ -197,7 +195,8 @@ bool
Proto::wait (int timeout/*-1*/)
{
// On apelle serial_.wait avec un timeout toujours inf ou égal à proto::timeout_
- return serial_.wait (timeout < timeout_ ? timeout : timeout_);
+ serial_.wait (timeout < timeout_ && timeout != -1 ? timeout : timeout_);
+ return sync ();
}
/// Récupère le File Descriptor
@@ -241,7 +240,6 @@ Proto::getFrame(void)
currentFrame_.command = receivedChar;
revState_ = 2;
}
- // On vérifie que le match n'est pas fini
break;
case 2:
d = hex2digit (receivedChar);
@@ -270,7 +268,7 @@ Proto::getFrame(void)
{
// On renvoie en mettant le compteur à 0, la commande sera
// renvoyer de retour à sync
- //log_("Erreur de reception") << "commande inconnue" << "";
+// log_("Erreur de reception") << "commande inconnue" << "";
tLastSend_ = 0;
revState_ = 0;
return false;
@@ -283,7 +281,7 @@ Proto::getFrame(void)
void
Proto::sendFrame(const Frame & frame)
{
- //log_ ("send") << "frame" << frame;
+// log_ ("send") << "frame" << frame;
// envoyer le bang
serial_.putchar('!');
@@ -292,7 +290,7 @@ Proto::sendFrame(const Frame & frame)
// Envoyer les arguments
for(std::vector<uint8_t>::const_iterator it = frame.args.begin();
- it != frame.args.end(); it++)
+ it != frame.args.end(); ++it)
{
serial_.putchar(digit2hex(*it >> 4));
serial_.putchar(digit2hex(*it & 0x0f));
diff --git a/i/marvin/src/proto/proto.hh b/i/marvin/src/proto/proto.hh
index 11b1ae3..47ef9a0 100644
--- a/i/marvin/src/proto/proto.hh
+++ b/i/marvin/src/proto/proto.hh
@@ -55,7 +55,7 @@ class Proto : public NonCopyable
//Date du dernier envoie
int tLastSend_;
//Temps entre les ré-émission
- static const int timeout_ = 500;
+ static const int timeout_ = 100;
/// Frame en cours de réception
Frame currentFrame_;