GECKO 1.0
Human-computer interface based on hand gesture recognition
void AppLauncher::update ( int  current_value)

Update the state of internal state machines and trigger the corresponding commands.

Parameters:
current_valueCurrent value to compare with the value to track in all internal state machines
{
    for (int i = 0; i < _state_machines.size(); i++)
    {
        _state_machines[i].update( current_value );
        _found[i] = _state_machines[i].getFound();

        //-- Check state vector here and launch commands
        if ( _found[i] )
        {
            if( system( (_commands_to_launch[i]+" &").c_str() ) == -1)
            {
                std::cerr << "[AppLauncher] Error: could not run \"" << _commands_to_launch[i] << "\"" << std::endl;
            }

            _state_machines[i].reset();
        }
    }

}
 All Classes Functions Variables