i am using a Pixhawk 2.4.6 with ardupilot rover 4.0 and Mission Planner.
I’ve managed to get data from and to Pixhawk over MAVLink via a Teensy 3.5.
I send BATTERY_STATUS, GPS_INPUT, DISTANCE_SENSOR and RPM massages to it. This works fine and all data are displayed correct in MAVLink Inspector.
But there are two issues at this time:
1.
If I send 2 messages from the same type with different ids, only one sensor shows a reaction and changes values between the two massages. (In case of rangefinder, i configured RNGFND1=10 and RNGFND2 = 10) Tried it with same component ID as Pixhawk and with a different. Same result.
Values from DISTANCE_SESNOR and GPS_INPUT are used by Mission Planner, but BATTERY_STATUS and RPM are ignored.
Does anybody has an advice for me?
The background why i use this exernal sensor data is, that my boat uses 2 digital controlled batteries and a slightly complex GPS/IMU system for exact positions for measurements, that communicates only over RS232. This unit should be used as backup GPS, simply because it’s there. Primary GPS is the Emlid Reach M2.
I thing changing the code is a large effort for me, because i am not familar with the ardupilot firmware code despite that would be a verry pretty solution.
The solution with a AP board looks a bit complicated, but is think that colud be a future extension to my project.
My other not so cool work-arround idea is to feed a faked battery voltage over a onboard DAC pin from Teensy to Pixhawk and a faked RPM siganl over timer triggered pulses.