Hi @ike, welcome to the forum!
What kind of sensor is it? Generally it’s best to use an existing message where possible, so if you haven’t already I’d suggest checking the mavlink common message set to see if there’s a message that could do what you’re after. If none of the existing sensor-related messages are appropriate, you might want to consider using named_value_float
, as discussed in this post.
Sounds like you’ve already made some decent progress - nice work!
If you’re set on using a new mavlink message you’ll need to follow the ArduPilot documentation. Note in particular that
Since mavlink is made to be generated from a message set, you generally can’t just modify the files and run the result.
In case it’s relevant, the companion setup script installs pymavlink on line 32 with a ‘build’ command, so you might be able to/need to use that to do your rebuild once you’ve uninstalled the existing pymavlink and modified the files as desired.
See how you go, and let us know if you get stuck, and/or have any further questions