Ejemplo n.º 1
0
    virtual bool close()
    {
        if (control_thr)
        {
            control_thr->stop();
            delete control_thr;
        }

        rpcPort.interrupt();
        rpcPort.close();

        return true;
    }
Ejemplo n.º 2
0
    virtual bool   updateModule()
    { 
        if (control_thr)
        {
            control_thr->printStats();
            int status = control_thr->get_status();
            if (status < 0)
            {
                yError() << "Fatal error, closing";
                control_thr->stop();
                return false;
            }
        }
        else
        {
            yDebug("* Motor thread:not running");
        }

        static int life_counter=0;
        yDebug( "* Life: %d\n", life_counter);
        life_counter++;

        return true;
    }