From 6ada22ec6895ecfa66caa732703a85257609a973 Mon Sep 17 00:00:00 2001 From: JGMonroy Date: Tue, 1 Jul 2014 16:32:48 +0200 Subject: [PATCH] Small corrections for compiling --- SpeechSynth/CSpeechSynth.cpp | 23 +++++------------------ SpeechSynth/CSpeechSynth.hpp | 4 ++-- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/SpeechSynth/CSpeechSynth.cpp b/SpeechSynth/CSpeechSynth.cpp index 2b48655..6636e80 100644 --- a/SpeechSynth/CSpeechSynth.cpp +++ b/SpeechSynth/CSpeechSynth.cpp @@ -26,21 +26,19 @@ | | +---------------------------------------------------------------------------+ */ -/** @moos_module A module to keep the high-level tasks commanded to the robot. - * +/** @moos_module A simple module to provide easy text to speech. + * The module gets the text to synthesize via the OpenMORA variable SAY, and copy it to the OS clipboard. + * It is designed to work with applications such as IVONE that reproduces all text present in the clipboard. */ #include "CSpeechSynth.hpp" - #include #include #include using namespace std; - using namespace mrpt; using namespace mrpt::utils; -//using namespace .... CSpeechSynthApp::CSpeechSynthApp() @@ -55,20 +53,11 @@ CSpeechSynthApp::~CSpeechSynthApp() bool CSpeechSynthApp::OnStartUp() { // Read parameters (if any) from the mission configuration file. - //! @moos_param PARAM_NAME PARAM DESCRIPTION IN ONE LINE - //m_MissionReader.GetConfigurationParam("my_param",m_myvar); - - // There is also a MRPT-like object (this->m_ini) that is a wrapper - // to read from the module config block of the current MOOS mission file. - // m_ini.read_int(...); return DoRegistrations(); } bool CSpeechSynthApp::Iterate() { - // Are there - - return true; } @@ -90,7 +79,7 @@ bool CSpeechSynthApp::OnCommandMsg( CMOOSMsg Msg ) bool CSpeechSynthApp::DoRegistrations() { - //! @moos_subscribe NEW_TASK + //! @moos_subscribe SAY AddMOOSVariable("SAY","SAY","SAY",0); RegisterMOOSVariables(); @@ -103,11 +92,9 @@ bool CSpeechSynthApp::OnNewMail(MOOSMSG_LIST &NewMail) std::string cad; for(MOOSMSG_LIST::iterator i=NewMail.begin();i!=NewMail.end();++i) { - if (i->GetName()=="SAY") { - - MOOSTrace("Received talk: %s\n",i->GetString().c_str()); + MOOSTrace("[SpeechSynth]: Received text: %s\n",i->GetString().c_str()); const size_t len = strlen(i->GetString().c_str()) + 1; HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, len); diff --git a/SpeechSynth/CSpeechSynth.hpp b/SpeechSynth/CSpeechSynth.hpp index 422331a..2310675 100644 --- a/SpeechSynth/CSpeechSynth.hpp +++ b/SpeechSynth/CSpeechSynth.hpp @@ -29,8 +29,8 @@ #ifndef CSpeechSynth_H #define CSpeechSynth_H -#include -#include +#include +#include class CSpeechSynthApp : public CMOOSApp {