gloveDeviceTest.cc
Go to the documentation of this file.
1 
18 /* system includes */
19 #include <stdio.h>
20 
21 /* my includes */
22 #include "gloveDevice.h"
23 
24 
25 /*
26  \brief The program's main function.
27 */
28 
30 {
31  gloveDevice* myGlove = new gloveDevice();
32  myGlove->init("/dev/ttyS0");
33 
34  myGlove->showCurrentStatus();
35 
36  //myGlove->cmdSetStreamValues(true);
37 
38  unsigned char v[22], n;
39  statusQuery_t queryStatus;
41 
42 // while(1)
43  for (int i=0; i<5; i++)
44  {
45  myGlove->cmdGetSensorValues(v, &n, &queryStatus, &gloveStatus);
46  for (int j=0; j<n; j++)
47  printf("%d ", v[j]);
48  printf("\n");
49  }
50 
51  // myGlove->cmdSetStreamValues(false);
52 
53  myGlove->stop();
54 }
55 
56 //int main(int argc, char **argv)
57 //{
58 //
59 // testGloveDevice();
60 //
61 // return 0;
62 //}
63 
bool cmdGetSensorValues(vector_t values, uchar_t *n, statusQuery_t *query, gloveStatusByte_t *gloveStatusByte)
Definition: gloveDevice.cc:390
void testGloveDeviceLib()
bool init(const char *serialDev)
Definition: gloveDevice.cc:37
void showCurrentStatus()
Definition: gloveDevice.cc:788


asr_cyberglove_lib
Author(s): Heller Florian, Mei├čner Pascal, Nguyen Trung, Yi Xie
autogenerated on Mon Jun 10 2019 12:40:38