Set Battery Monitor voltage and current

I have a customized sensor that sends data containing voltage, current, temperature and rpm. I want my flight controller to use voltage and current as Battery Monitor.
Also I want to see temperature and rpm data in GCS.
We have companion computer that has a Mavlink connection to my flight controller.
Is there any way to do this using LUA scripting (or using Mavlink)?

I managed to do this by mixing Mavlink and LUA scripting.
I first receive data from my sensor in my companion computer and then send it using the Mavlink message “BATTERY_STATUS”. Then, in flight control, I receive this message using LUA scripting with the “receive_chan” method of “mavlink” and update the flight control’s battery data using the “update_telem_data” and “update_rpm” methods of “esc_telem” with received values.

2 Likes