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) || (argc == 2 && strcasecmp(argv[1],
"--help") == 0)) {
36 cout <<
"Usage: lms2xx_mean_values PATH [BAUD RATE]" << endl
37 <<
"Ex: lms2xx_mean_values /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++) {
87 cout <<
"\t Num. Values: " << num_values << endl;
95 cerr <<
"An error occurred!" << endl;
106 cerr <<
"Uninitialize failed!" << endl;
SickLMS2xx * sick_lms_2xx
int main(int argc, char *argv[])
Definition of class SickLMS2xx. Code by Jason C. Derenick and Thomas H. Miller. Contact derenick(at)l...