aboutsummaryrefslogtreecommitdiffstats
path: root/examples/manager.c
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-10-19 19:38:06 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2012-10-19 19:38:06 +0100
commit2891593727a0151a66ed7860fed6399548c74c02 (patch)
tree1cb52da179b4ab23ba2a22f44d88ea3523f51f0c /examples/manager.c
parentcff96463a694573a9f87b014482a45c25bf4c7b0 (diff)
parent8f3c91e91b634adaca77dac6cf314445cceefc78 (diff)
downloadlibphidget21-2891593727a0151a66ed7860fed6399548c74c02.tar.gz
Merge tag 'upstream/2.1.8.20120912'
Upstream version 2.1.8.20120912
Diffstat (limited to 'examples/manager.c')
-rw-r--r--examples/manager.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/manager.c b/examples/manager.c
index 74bddbd..d44acfa 100644
--- a/examples/manager.c
+++ b/examples/manager.c
@@ -29,7 +29,7 @@ int gotAttach(CPhidgetHandle phid, void *ptr) {
CPhidget_getDeviceLabel(phid, &label);
CPhidget_getSerialNumber(phid, &serial);
CPhidget_getDeviceVersion(phid, &version);
- CPhidget_getDeviceType(phid, &id);
+ CPhidget_getDeviceName(phid, &id);
printf("Device Added: %s, Serial: %d, Version: %d Label: %s\n",id,serial,version,label);
return 0;
@@ -42,7 +42,7 @@ int gotDetach(CPhidgetHandle phid, void *ptr) {
//print out some info
CPhidget_getSerialNumber(phid, &serial);
CPhidget_getDeviceVersion(phid, &version);
- CPhidget_getDeviceType((CPhidgetHandle)phid,(const char **)&id);
+ CPhidget_getDeviceName((CPhidgetHandle)phid,(const char **)&id);
printf("Device Removed: %s, Serial: %d, Version: %d\n",id,serial,version);
return 0;
@@ -53,12 +53,13 @@ int main()
{
CPhidgetManagerHandle phidm;
- CPhidget_enableLogging(PHIDGET_LOG_VERBOSE, NULL);
+ //CPhidget_enableLogging(PHIDGET_LOG_VERBOSE, NULL);
CPhidgetManager_create(&phidm);
CPhidgetManager_set_OnAttach_Handler(phidm, gotAttach, NULL);
CPhidgetManager_set_OnDetach_Handler(phidm, gotDetach, NULL);
CPhidgetManager_open(phidm);
+ //CPhidgetManager_openRemote(phidm, NULL, NULL);
signal (SIGTERM, sighandler);
signal (SIGINT, sighandler);