Update of /cvsroot/libphidget/libphidget/src/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv16539/src/examples
Modified Files:
phidget_c.c
Log Message:
Removed debugging statements and various cleanups
Index: phidget_c.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/examples/phidget_c.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** phidget_c.c 23 Jun 2003 22:37:34 -0000 1.20
--- phidget_c.c 24 Jun 2003 02:12:13 -0000 1.21
***************
*** 100,103 ****
--- 100,104 ----
unsigned char buffer[6];
float k;
+ int i;
struct phidget *dev = phidgetOpen (phidgets[t]); // Open the phidget #t
***************
*** 145,152 ****
for (k = 0; k < 1; k += .1)
{
! int i;
! printf ("%f\n",k);
! // Move a single servo (will move
if (SERVO1)
--- 146,152 ----
for (k = 0; k < 1; k += .1)
{
! printf ("Rotating %3.2f%%\n",k*100);
! // Move a single servo
if (SERVO1)
***************
*** 183,186 ****
--- 183,193 ----
// Process any events that have occured, like attach/detach
phidgetEvents ();
+ }
+
+ for (i=0;i<8;i++)
+ if (phidget8Servo (dev, i,0,.1,.1)<0)
+ {
+ printf("error - %s\n",phidgetErrorString(phidgetLastError()));
+ return(9);
}
}
|