summaryrefslogtreecommitdiff
path: root/i/marvin/src/asserv/asserv.cc
diff options
context:
space:
mode:
Diffstat (limited to 'i/marvin/src/asserv/asserv.cc')
-rw-r--r--i/marvin/src/asserv/asserv.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/i/marvin/src/asserv/asserv.cc b/i/marvin/src/asserv/asserv.cc
index 082f39b..2c36887 100644
--- a/i/marvin/src/asserv/asserv.cc
+++ b/i/marvin/src/asserv/asserv.cc
@@ -24,15 +24,16 @@
// }}}
#include "asserv.hh"
+#include "config/config.hh"
#include<cmath>
/// Constructeur
-Asserv::Asserv (const Config & config, Receiver & receiver)
+Asserv::Asserv (Receiver & receiver)
:proto_(*this), receiver_(receiver), log_("asserv")
{
// Rechargement des paramètres
- loadConfig(config);
+ loadConfig ();
//Ouverture du port série
proto_.open(ttyName_);
}
@@ -428,8 +429,10 @@ void Asserv::receive(char command, const Proto::Frame &frame)
}
/// Charge les données de la classe config
-void Asserv::loadConfig(const Config & config)
+void Asserv::loadConfig()
{
+ // Get the config instance
+ Config &config = Config::getInstance ();
ttyName_ = config.get<std::string>("asserv.tty");
footing_ = config.get<int>("asserv.footing");
epsilon_ = config.get<double>("asserv.epsilon");