52 static double txtWatchDogStart = yarp::os::Time::now();
53 static double dbgWatchDogStart = yarp::os::Time::now();
54 static std::string txtMsg;
55 static std::string dbgMsg;
57 Bottle* msg = mTxtMsgPort.read(
false);
58 Bottle* dbg = mTxtDbgPort.read(
false);
62 txtMsg= msg->get(0).asString().c_str();
63 txtWatchDogStart = yarp::os::Time::now();
67 dbgMsg = dbg->get(0).asString().c_str();
68 dbgWatchDogStart = yarp::os::Time::now();
71 if (yarp::os::Time::now()-txtWatchDogStart < 3.0 && !txtMsg.empty())
73 drawText(
"iCub: ",txtMsg.c_str(),1.0f,1.0f,1.0f);
76 if (yarp::os::Time::now()-dbgWatchDogStart < 3.0 && !dbgMsg.empty())
78 drawText(
"Dbg: ",dbgMsg.c_str(),1.0f,1.0f,1.0f);