ros-drivers / flir_ptu

ROS driver for FLIR pan-tilt units
http://wiki.ros.org/flir_ptu_driver
14 stars 35 forks source link

BUG - PTU::getMode() returns wrong value (flir D48E) #28

Open marklewis3000 opened 8 years ago

marklewis3000 commented 8 years ago

EASY FIX: compare to uppercase

The D48E responds to the 'C' query control mode with an uppercase 'P' or 'I', but the driver.cpp compares to lowercase, resulting in an error returning (-1) : if (buffer[2] == 'p') return PTU_VELOCITY; else if (buffer[2] == 'i') return PTU_POSITION;

This could be fixed like this: (buffer[2] == 'p' || buffer[2] == 'P' )
(buffer[2] == 'i' || buffer[2] == 'I' )