Multiple ping sonar sensors on the same device?

.companion.rc is the code that’s run on startup. From there, lines 14 and 15 refer to the ping1D setup/connection. Both pingproxy.py and ping_mavlink_driver.py are called/run with no arguments, and only called once, so the companion computer is currently just set up for a single ping1D connection, with the default setup parameters.

For the companion to be able to communicate with more than one would require setting different ports for the additional ones (since otherwise the communications clash), and then calling additional instances of both ping_mavlink_driver.py and pingproxy.py with the relevant command-line arguments to get them to connect with those changed ports.

While these posts discuss getting a QGC reading for a ping1d, there’d also be some extra setup involved in getting another one showing up since otherwise they’d be sending competing numbers that would get displayed in the same value position (basically just flipping quickly between the two, at best).

If you’re wanting to try getting it to work yourself, I’m not sure if that extra setup is easily added so that readings are accepted for the DOWN option to complement the existing FORWARD option - you’d likely need to spend some time looking into the mavlink protocol and find where the message to send is defined (presumably in ping_mavlink_driver) and change it to the DOWN option for the second Ping.