summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/es
diff options
context:
space:
mode:
authorhaller2005-05-04 20:22:59 +0000
committerhaller2005-05-04 20:22:59 +0000
commit74b469d936bad634197429ec5f3dc8d2e5cd654c (patch)
treebf9ea2c430c02a2811e03b8fcf57e8ad176fbe51 /2005/i/robert/src/es
parentd3726bf21e29a70b4141a5802cb9a50b7880f364 (diff)
Modification de la politique de sync
Diffstat (limited to '2005/i/robert/src/es')
-rw-r--r--2005/i/robert/src/es/es.cc4
-rw-r--r--2005/i/robert/src/es/es.hh2
-rw-r--r--2005/i/robert/src/es/test_es.cc5
3 files changed, 11 insertions, 0 deletions
diff --git a/2005/i/robert/src/es/es.cc b/2005/i/robert/src/es/es.cc
index c9ca801..b1c8f9a 100644
--- a/2005/i/robert/src/es/es.cc
+++ b/2005/i/robert/src/es/es.cc
@@ -145,3 +145,7 @@ void Es::receive(char command, const Proto::Frame & frame)
}
}
+bool Es::sync(void)
+{
+ return proto_.sync();
+}
diff --git a/2005/i/robert/src/es/es.hh b/2005/i/robert/src/es/es.hh
index ebe9c9f..bccfcf6 100644
--- a/2005/i/robert/src/es/es.hh
+++ b/2005/i/robert/src/es/es.hh
@@ -89,6 +89,8 @@ class Es : public Proto::Receiver
void loadConfig(const Config & config);
/// définition du receiver::receive
void receive(char command, const Proto::Frame & frame);
+ /// sync..
+ bool sync(void);
};
#endif // es_hh
diff --git a/2005/i/robert/src/es/test_es.cc b/2005/i/robert/src/es/test_es.cc
index 42f681d..630edc6 100644
--- a/2005/i/robert/src/es/test_es.cc
+++ b/2005/i/robert/src/es/test_es.cc
@@ -93,6 +93,10 @@ main (int argc, char **argv)
std::cout << "Le prochain obstacle est " << (es.obsTropPres() ? "TROP PRES." : "LOIN.") << std::endl;
break;
}
+ do
+ {
+ es.sync();
+ }while(!es.ascIsIdle());
break;
}
case 'w':
@@ -106,6 +110,7 @@ main (int argc, char **argv)
{
es.wait (stop - t);
t = Timer::getProgramTime ();
+ es.sync();
}
break;
}