sf0x doesnt work anymore in master for LightWare SF02/F Laser Rangefinder
As widely discussed here https://groups.google.com/forum/?hl=de#!topic/px4users/ZQ4d6HCDLSs the actual sf0x driver for the SF02/F Laser Rangerfinder doesnt work anymore in the actual master. Could you please look at this? Best wishes, Severin
I think the problem could stem from a problem if you supply a custom port:
First, the custom port is opened here: https://github.com/PX4/Firmware/blob/master/src/drivers/sf0x/sf0x.cpp#L203
It is then probably later in the init() call closed. https://github.com/PX4/Firmware/blob/master/src/drivers/sf0x/sf0x.cpp#L280
And then opened again but this time the default port instead of the custom one: https://github.com/PX4/Firmware/blob/master/src/drivers/sf0x/sf0x.cpp#L636
So @bansiesta was spot on. Before fixing this I tested on the default port (ttyS6 / Serial4 on the Pixhawk) and it worked fine. With the fix other ports (tested ttyS2) work too now. If it's still not working it will be a board specific or wiring issue.
Also make sure nothing else is trying to use the same port (ie: mavlink).
PR on its way shortly.