Menu Bar customization

Hi Everyone,

i want to customization in menu bar adding latitude and ground speed and battery percentage in mission planner menu bar. I don’t know how to do can any one help me to fix .

Install Visual Studio
Clone Mission Planner repo from github
edit MainV2.cs and MainV2 form to you need.

Thank you so much. I try and let u know if in case any help is needed.

I can able to create UI (icons) in the Menu bar .and write a function to display airspeed .but it not display the dynamic value. every time I need to click menu bar icon it will show the last updated airspeed. but I need to display Realtime airspeed dynamic without any click .
can you help me resolve this issue.

example – HUD screen AS

file i used to edit,
MainV2.designer.cs – creating UI changes in Menu bar
MainV2.CS ---- write a function

code :
this is the function i used to call when i click the menubar.
private void speedToolStripMenuItem_Click(object sender, EventArgs e)
{
// Assuming MyView is an instance of a class that handles displaying screens
// Show “Simulation” screen
//MyView.ShowScreen(“Simulation”);

        // Assuming MainV2 is an instance of a class containing comPort
        if (MainV2.comPort != null && MainV2.comPort.MAV != null && MainV2.comPort.MAV.cs != null)
        {
            // Assuming 'airspeed' is a property of 'cs'
            float airspeed = MainV2.comPort.MAV.cs.airspeed;

            // Update menu item text with airspeed value
            speedToolStripMenuItem.Text = "Speed: " + airspeed.ToString("0.00") + " m/s";
        }
        else
        {
            // Handle the case when the objects are not initialized properly or data is not available
            // For example, show an error message
            MessageBox.Show("Airspeed data is not available.");
        }
    }