From 74b469d936bad634197429ec5f3dc8d2e5cd654c Mon Sep 17 00:00:00 2001 From: haller Date: Wed, 4 May 2005 20:22:59 +0000 Subject: Modification de la politique de sync --- 2005/i/robert/src/es/es.cc | 4 ++++ 2005/i/robert/src/es/es.hh | 2 ++ 2005/i/robert/src/es/test_es.cc | 5 +++++ 3 files changed, 11 insertions(+) (limited to '2005/i/robert') 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; } -- cgit v1.2.3