示例#1
0
FB::variant hapticAPI::startDevice(void){

	if (!initialized){
		if ( hdPhantomOpen(deviceID)!=-1)	{
			hdPhantomStartServo();
			initialized = true;
			return (FB::variant)initialized;
		}
	}

	return initialized;
}
示例#2
0
//===========================================================================
int cPhantomDevice::open()
{
    // check if drivers are installed
    if (!m_driverInstalled) return (-1);

    // check if the system is available
    if (!m_systemAvailable) return (-1);

    // if system is already opened then return
    if (m_systemReady) return (0);

    // try to open the device
    hdPhantomOpen(m_deviceID);

    // update device status
    m_systemReady = true;

    // success
    return (0);
}