VALUE analog_initialize(VALUE self, VALUE serial) { PhidgetInfo *info = device_info(self); CPhidgetAnalogHandle analog = 0; ensure(CPhidgetAnalog_create(&analog)); info->handle = (CPhidgetHandle)analog; return rb_call_super(1, &serial); }
/** * Inits connection with the motor */ bool PhidgetAnalogOutController::init( int serialNumber /*= -1*/) { // If it has already been init, do nothing if ( m_isValid ) { LOG( "PhidgetAnalogOutController::init(). This analog controller was init already --> Doing nothing" ); return false; } LOG( "Connecting to Phidget Analog out board" ); //create the analog out control object CPhidgetAnalog_create(&m_analogOut); // Open the connection with the board return PhidgetControllerBase::init(serialNumber); }