PhidgetManager_close() does no difference (and according to documentation not needed).
I am writing a library for TouchDesigner...
Had one for the previous version of both Touch and Phidgets (21), and the manager worked then. The problem might be on the Touch side, but the fact that opening the manager creates the problem raises suspicious...
It's only the beginning. Relevant code is currently:
Code: Select all
TouchPhidgets22::TouchPhidgets22(const OP_NodeInfo* info) : myNodeInfo(info)
{
myExecuteCount = 0;
myOffset = 0.0;
PhidgetReturnCode res;
PhidgetManager_create(&man);
res = PhidgetManager_setOnAttachHandler(man, mgrAttachHandler, NULL);
if (res != EPHIDGET_OK) {
#ifdef DEBUG_TPH22
std::cout << "Error setting onAttachHandler for Phidget manager: " << res << "\n";
#endif
}
res = PhidgetManager_setOnDetachHandler(man, mgrDetachHandler, NULL);
if (res != EPHIDGET_OK) {
#ifdef DEBUG_TPH22
std::cout << "Error setting onDetachHandler for Phidget manager: " << res << "\n";
#endif
}
res = PhidgetManager_open(man);
if (res != EPHIDGET_OK) {
#ifdef DEBUG_TPH22
std::cout << "Error opening Phidget manager: " + res;
std::cout << "\n";
#endif
}
OutputDebugStringA("Manager Opened\n");
}
TouchPhidgets22::~TouchPhidgets22()
{
PhidgetReturnCode res;
res = PhidgetManager_delete(&man);
if (res != EPHIDGET_OK) {
#ifdef DEBUG_TPH22
std::cout << "Error deleting Phidget manager: " + res;
std::cout << "\n";
#endif
}
}