25 int main(
int argc,
char* argv[])
31 unsigned int values[SickLMS2xx::SICK_MAX_NUM_MEASUREMENTS] = {0};
32 unsigned int num_values;
35 if ((argc != 2 && argc != 3) || (strcasecmp(argv[1],
"--help") == 0)) {
36 cout <<
"Usage: lms2xx_subrange PATH [BAUD RATE]" << endl
37 <<
"Ex: lms2xx_subrange /dev/ttyUSB0 9600" << endl;
49 if ((desired_baud = SickLMS2xx::StringToSickBaud(argv[2])) == SickLMS2xx::SICK_BAUD_UNKNOWN) {
50 cerr <<
"Invalid baud value! Valid values are: 9600, 19200, 38400, and 500000" << endl;
68 cerr <<
"Initialize failed! Are you using the correct device path?" << endl;
77 for (
unsigned int i=0; i < 10; i++) {
83 cout <<
"\t Num. Values: " << num_values << endl;
90 cerr <<
"An error occurred!" << endl;
101 cerr <<
"Uninitialize failed!" << endl;
int main(int argc, char *argv[])
SickLMS2xx * sick_lms_2xx
Definition of class SickLMS2xx. Code by Jason C. Derenick and Thomas H. Miller. Contact derenick(at)l...