I would like to connect the DFRobot A01NYUB Rangefinder sensor to the ardupilot via serial port. Since there is no available driver for the particular sensor built in, what is the proper path for reading from it:
Setting SERIALX_PROTOCOL_TYPE to “Scripting” and parse the serial output with LUA OR
Setting SERIALX_PROTOCOL_TYPE to “Rangefinder”, set RNGFNDX_TYPE to “Lua_Scripting” and then parse the serial output with LUA?
I am studying the LUA examples but I find it hard to find one that is directly applicable.
Hello, thank you for pointing this out!
I am on Rover firmware v4.5.7. I have
Set the rangefinder to type 36 (LUA)
Set serial to type 28 LUA (SERIALx_PROTOCOL to 28)
I get the “Scripting started” message in QGC, however, the distance for this sensor is not printed. (My other NMEA depth sensor prints fine).
I have the impression that once you set serial to type 28, the driver results won’t be interpreted as a Rangefinder.