CCAZE31 / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

HUD Display does not show battery voltage and current when playing tlog files #839

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Open and play a tlog file from a flight.
2.
3.

What is the expected output? What do you see instead?
I would expect to see the battery voltage and current displayed on the HUD 
Display.

However there is no voltage or current displayed.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Not 100 % sure but I suggest this fix in HUD.cs

replace this code 
            if (MainV2.comPort.MAV.param.ContainsKey("BATT_MONITOR") && (float)MainV2.comPort.MAV.param["BATT_MONITOR"] != 0)
            {
                hud1.batteryon = true;
            }
            else
            {
                hud1.batteryon = false;
            }

with this code

            if (MainV2.comPort.MAV.param.ContainsKey("BATT_MONITOR"))
            {
                if ((float)MainV2.comPort.MAV.param["BATT_MONITOR"] != 0)
                {
                    hud1.batteryon = true;
                }
                else
                {
                    hud1.batteryon = false;
                }
            }

Original issue reported on code.google.com by lbrecken...@gmail.com on 27 Dec 2012 at 8:59

GoogleCodeExporter commented 8 years ago
That should be FlightData.cs not HUD.cs

Original comment by lbrecken...@gmail.com on 27 Dec 2012 at 9:00

GoogleCodeExporter commented 8 years ago
i will fix this in next release

Original comment by Meee...@gmail.com on 28 Dec 2012 at 8:16