Update of /cvsroot/libphidget/libphidget/src/libphidget
In directory sc8-pr-cvs1:/tmp/cvs-serv3996/libphidget
Modified Files:
phidget.c
Log Message:
Fixed a bug (with the help of Chester) in my sending data to Text LCD phidgets
Index: phidget.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** phidget.c 14 Dec 2002 04:34:35 -0000 1.18
--- phidget.c 14 Dec 2002 06:42:00 -0000 1.19
***************
*** 1492,1501 ****
buffer[5] = 0x30 + (row - 1) * 0x10 + 0x80+col;
buffer[6] = 0; // testing
! buffer[7] = 8; // testing - this makes it work, not sure why
! buffer[8] = 5;
! phidgetWrite(phidgetDevice,buffer,9);
// Seems to be needed to flush data
- //for (i=0;i<10;i++) buffer[i]=0;
buffer[0]=0x02;
buffer[1]=str[0];
--- 1492,1499 ----
buffer[5] = 0x30 + (row - 1) * 0x10 + 0x80+col;
buffer[6] = 0; // testing
! buffer[7] = 5; // testing - this makes it work, not sure why
! phidgetWrite(phidgetDevice,buffer,8);
// Seems to be needed to flush data
buffer[0]=0x02;
buffer[1]=str[0];
***************
*** 1509,1521 ****
buffer[6]=1; // go back into command mode
! buffer[7]=8; // this works but not sure why
! buffer[8]=6;
! phidgetWrite(phidgetDevice,buffer,9);
! for (i=0;i<10;i++) buffer[i]=0;
! buffer[0]=0x01;
! buffer[8]=1;
! phidgetWrite(phidgetDevice,buffer,9);
}
--- 1507,1520 ----
buffer[6]=1; // go back into command mode
! //buffer[7]=8; // this works but not sure why
! buffer[7]=6;
! phidgetWrite(phidgetDevice,buffer,8);
! //for (i=0;i<10;i++) buffer[i]=0;
! //buffer[0]=0x01;
! //buffer[7]=0;
! ////buffer[8]=1;
! //phidgetWrite(phidgetDevice,buffer,8);
}
|