예제 #1
0
    virtual bool   updateModule()
    { 
        if (control_thr)
        {
            Odometry* pOdometry=0;
            control_thr->printStats();
            control_thr->get_motor_handler()->updateControlMode();
            pOdometry = control_thr->get_odometry_handler();
            if (pOdometry) pOdometry->printStats();
            control_thr->get_motor_handler()->printStats();
            control_thr->get_input_handler()->printStats();
        }
        else
        {
            yDebug("* Motor thread:not running");
        }

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

        return true;
    }
예제 #2
0
파일: main.cpp 프로젝트: robotology/cer
    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;
    }