summaryrefslogtreecommitdiff
path: root/i/marvin/src/proto/proto.cc
diff options
context:
space:
mode:
authordufourj2006-05-25 20:04:31 +0000
committerdufourj2006-05-25 20:04:31 +0000
commit261eca7b454fffefe3f1a8b639d6789f9942853c (patch)
tree422664a7f4bbdfcec99a0acb9ecb6a273ab28fbf /i/marvin/src/proto/proto.cc
parent6eae3fd7b71b3527b0c95fd5e0c9f9d131f327a7 (diff)
Es :
- LCD management.
Diffstat (limited to 'i/marvin/src/proto/proto.cc')
-rw-r--r--i/marvin/src/proto/proto.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/i/marvin/src/proto/proto.cc b/i/marvin/src/proto/proto.cc
index 1bc560f..216a345 100644
--- a/i/marvin/src/proto/proto.cc
+++ b/i/marvin/src/proto/proto.cc
@@ -59,7 +59,7 @@ Proto::sync(void)
// Récupération de la frame
while (getFrame())
{
-// log_ ("recv", Log::debug) << "frame" << currentFrame_;
+ log_ ("recv", Log::debug) << "frame" << currentFrame_;
// Si la frame est un aquittement
if(currentFrame_ == frameQueue_.front())
{
@@ -137,9 +137,11 @@ Proto::send (char command, const char *format, int a0, int a1,
/// Send a string of size number.
void
-Proto::send (char command, const std::string &str, int size, bool reliable)
+Proto::sendStr (char command, const char *str, int size, bool reliable)
{
Proto::Frame frame;
+
+ frame.command = command;
for (int compt = 0; compt < size; compt++)
newArgFrame (frame, 'b', str[compt]);
@@ -287,8 +289,8 @@ Proto::getFrame(void)
{
// On renvoie en mettant le compteur à 0, la commande sera
// renvoyer de retour à sync
-// log_("Erreur de reception", Log::debug)
-// << "commande inconnue" << "";
+ log_("Erreur de reception", Log::debug)
+ << "commande inconnue" << "";
tLastSend_ = 0;
revState_ = 0;
return false;
@@ -301,7 +303,7 @@ Proto::getFrame(void)
void
Proto::sendFrame(const Frame & frame)
{
-// log_ ("send", Log::debug) << "frame" << frame;
+ log_ ("send", Log::debug) << "frame" << frame;
// envoyer le bang
serial_.putchar('!');