Entries by admin

Fixed – KDevelop not stopping at breakpoints on Ubuntu Mate

I couldn’t get KDevelop to stop at breakpoints even on simple ‘hello world’ C++ projects. It appeared that CMAKE_BUILD_TYPE was being correctly set and GDB worked fine from the command-line, but from within kdevelop breakpoints were never respected! I think the problem stemmed from the Cache Value for CMAKE_BUILD_TYPE being empty, this value can be […]

Bash – send data to serial (rs232) port and wait for response

Sending data to a serial port is quite easy in Bash, for example: echo “my packet data” > /dev/ttyS0 And you can read from a serial port using cat: cat /dev/ttyS0 However cat must typically be run from a different shell instance as it blocks waiting for data. So is it possible to write and […]

Visual Studio Paho MQTT Error C2238 unexpected token(s) preceding ‘;’

If you’re receiving errors like the following when trying to build a project in Visual Studio 2017 using the Paho C client: Error C2238 unexpected token(s) preceding ‘;’ Then there is a quick fix, the problem seems to revolve around the following for DLLImport & DLLExport in the Paho header files: #if defined(WIN32) || defined(WIN64) […]

PCL Octree Cheat Sheet

The point cloud library (PCL) is a fantastic resource for working with point clouds, however it is a large library and it can take a while to effectively find your way around it. The octree construct is very useful for working with point clouds, but again it can take a while to learn how to […]

PCL C2988 unrecognizable template declaration/definition Visual Studio 2017

If you get this compile error: Error C2988 unrecognizable template declaration/definition When you: #include from the Point Cloud Library (PCL) in Visual Studio 2017, then either throw the following in before the #include, like this: // #define BOOST_TYPEOF_EMULATION #include or upgrade your version of Visual Studio 2017 (I haven’t tested this yet myself!) Not sure […]

Have ExifTool Display Maker Notes

Phil Harvey’s ExifTool is a fantastic software tool for displaying and interacting with image Exif data, however by default it doesn’t display maker notes and I always forget the command line options to persuade it to list them, so here it is – the -u option gets exiftool to display ‘unknown’ tags and theses include […]

I2C1_Wr / I2C1_Rd functions hang with MikroC for PIC – Need Timeout

In some cases both the MikroC i2c functions I2C1_Wr() and I2C1_Rd() can hang or lockup indefinitely until the PIC is reset. This can happen if the I2C bus isn’t properly terminated, for example if a connection breaks or similar (broken wire or solder joint etc). Having your PIC lockup during operation is generally not very […]