gloveDeviceTest.cc
Go to the documentation of this file.
00001 
00018 /* system includes */
00019 #include <stdio.h>
00020 
00021 /* my includes */
00022 #include "gloveDevice.h"
00023 
00024 
00025 /*
00026   \brief The program's main function.
00027 */
00028 
00029 void testGloveDeviceLib()
00030 {
00031   gloveDevice* myGlove = new gloveDevice();
00032   myGlove->init("/dev/ttyS0");
00033 
00034   myGlove->showCurrentStatus();
00035 
00036   //myGlove->cmdSetStreamValues(true);
00037 
00038   unsigned char v[22], n;
00039   statusQuery_t queryStatus;
00040   gloveStatusByte_t gloveStatus;
00041   
00042 //   while(1)
00043   for (int i=0; i<5; i++)
00044     {
00045       myGlove->cmdGetSensorValues(v, &n, &queryStatus, &gloveStatus);
00046       for (int j=0; j<n; j++)
00047         printf("%d ", v[j]);
00048       printf("\n");
00049     }
00050 
00051   // myGlove->cmdSetStreamValues(false);
00052   
00053   myGlove->stop();
00054 }
00055 
00056 //int main(int argc, char **argv)
00057 //{
00058 //
00059 //  testGloveDevice();
00060 //
00061 //  return 0;
00062 //}
00063 


asr_cyberglove_lib
Author(s): Heller Florian, Meißner Pascal, Nguyen Trung, Yi Xie
autogenerated on Thu Jun 6 2019 22:02:33