Data from MAVLink frame in "Quick" panel on main screen

Hello
I made a motor manager device what makes some measurements like temperatures from thermocouple, level of fuel measured by capacitive sensor, RPM, etc. For transmit this set of data best is “EFI Status” frame, so I used it to output data from my device and send it to Pixhawk. It route it to ground station software like Mission Planner or QGroundControl.
I can see data from my device in MAVLink inspector, create live graph, but can’t display it in “Quick” panel on main screen of Mision Planner.
When double click on empty parameter can assign an parameter from list. Choose for example efi_health. In frame from my device it has a value 48 (each bit signalize state of a sensor), but in quick all data starting with efi_ are zero.
My frame has System_id = 1 and component_it = 26. I tried to select another values, but without success.
What to do, to display my data in “quick” panel?

If your device has a component ID of 26, it will not show up under the autopilot component id. You can select component 26 under the drop-down list under the connect speed box. (Assuming your device also sends heartbeats). Then you can see the EFI in Mission Planner (but will not see data from the autopilot)

To show EFI values alongside the autopilot data, you have to send the mavlink packets with the component id 1, but you cannot send them from a different device because the sequence number of the box will not be correct. Catch 22.

You can communicate with a LUA script onboard, and the script can update the EFI status fields in the autopilot, then sends them to the ground station.
(Or you can connect your sensors directly to the autopilot and write the whole driver in LUA)

Tried that… at the end only LUA solution did work :slight_smile:

1 Like

Thank you for detailed instructions. I am trying to write LUA script. After half a day have very limited success, but will try more. When it will be ready, will publish more info here.

There are a lot of examples here: ardupilot/libraries/AP_Scripting/examples at master · ArduPilot/ardupilot · GitHub
Including some EFI drivers.

I did some progress. Generated mavlink library for LUA, modified it to parse mavlink 2 (originally is support only mavlink 1 protocol) and finally I can parse frames from my device by script and display values from it to “Messages” console.
The las step should be update the EFI status fields, but can’t find how to do it. Trivial assignment like:
efi.rpm = 123
do not work, return error about attempt to index global value.
In code I can find the EFI has only get_status() method, don’t have SetStatus().
Do you have any ideas how to update EFI status fields?

Meantime I found best method to show data in “Quick” panel:
gcs:send_named_float("Test", _mavresult.fuel_pressure)
where fuel_pressure is one of fields of efi frame. I don’t use it, so send test value.
It create variable MAV_TEST and I can choose it to display in “Quick”
Unfortunately other values with real measurements are not parsed correctly. Still have bug in script, but it is almost done :slight_smile:

Could you help me

Blockquote