Custom Field value always 0

Hi all I’m stuck at one little issue. According to: https://github.com/ArduPilot/MissionPlanner/pull/2360
It is possible (and should be quite easy) to display NAMED_VALUE_FLOAT in quickview.

Yet I’m having problem with this. I’m using arduino as my company computer publishing MavLink2 heartbeat (1Hz) and Mavlink2 NAMED_VALUE_FLOAT (2Hz) message. It is connected to Pixhawk via TELEM2 port. Arduino cycles from 0.0 to 100.0 incrementing by 0.5. For debugging purposes I’m connecting PX to PC with usb.

In MissionPlanner when I connect to PX after connecting Arduino to PX new value is possible to be choosen in quickview selection (and is named acordingly that is: Mavlink mesage name: “debug”, value in quickview: “MAV_DEBUG”) My arduino Mavlink messages are also visible in Mavlink inspektor (and they are cycling nicely there)
but when I select my MAV_DEBUG in Quickview it’s always showing 0.0. In status tab customfield0 also is stuck at 0.

I’m confused what more should I do to display float from my NAMED_VALUEFLOAT in Quickview is there any script required or something maybe my message should be not as broadcast but targeted?

2 Likes

Hi Robert,

I am having the same issue with a variable I am sending using the NAMED_VALUE_FLOAT parameter named “Value” from a custom STM based payload. I am able to see the value live in the MavLink Inspector just fine and I can display that parameter in quick view as it shows up as “MAV_VALUE”. Just like you though, my value is statically reading 0.00.

Did you have any luck with this after your post? I am curious if the quick view is misinterpreting the decimal position, leaving the number too small to be displayed within one decimal point.

I hope to hear back from you to see if we can find a resolution.

Regards,
John

No real luck on my side. I’m suspecting MissionPlanner variables are not set correctly (because in status tab they are stuck at zero). I’m C# newbe so my attempts to verify that failed miserably. For my purposes I used text messages (ones that show in message log). They are nicely logged in tlog so you still can easily post-process any sensor data you hoped to show in quickview. Still this solution does not help when you need value live-feeded :frowning:

Thanks for your reply mate.

Just curious, what Comp ID were your NAMED_VALUE_FLOAT values being sent under?

I spoke with Peter hall who mentioned that there may be an issue with conflicting Comp IDs.

In my configuration Pixhawk was using following ids:
Vechicle 0 Comp 0: Heartbeat
Vechicle 0 Comp 1: Telemetry (including second heartbeat)
And for arduino I used:
Vechicle 0 Comp 2

1 Like

Is there a way to interact with the custom fields with a lua script? If so how can i got about doing this with a test lua script that cycles between 0 and 10 for debugging purposes.

I am also uncertain of how to link the customfield0 - customfield19 as shown under the status bar of mission planner. appreciate your help. thanks!

local counter = 0

function update()
    gcs:send_named_float('COUNT', counter)
    counter = (counter + 1) % 10
    return update, 1000
end

return update()

Once connected to the autopilot where the script is running, double click on a value in the “Quick” tab of Mission Planner. Select “MAV_COUNT” to display the scripted value.

image

1 Like