MiguelNSPA / ardupilot-mega

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

Planner takes a long time/hangs to download the plane parameters if the baud rate is low. #958

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use a 4800 baud connection to the remote (using an Xbee HP900 10kbps, modem).
2. Download the parameters. 
3. Mission planner hangs waiting for the parameters to load, and then re-tries 
many times before failing. Can take up to 5 minutes before failing. 

The solution:

Stop the telemetry before requesting the parameters with these lines of code in 
MAVLink.cs, line 777:

        /// Get param list from apm
        /// </summary>
        /// <returns></returns>
        private Hashtable getParamListBG()
        {
// Add these commands to stop telemetry before requesting data            
MainV2.comPort.requestDatastream(MAVLink.MAV_DATA_STREAM.EXTENDED_STATUS, 0); 
// mode
            MainV2.comPort.requestDatastream(MAVLink.MAV_DATA_STREAM.POSITION, 0); // request gps
            MainV2.comPort.requestDatastream(MAVLink.MAV_DATA_STREAM.EXTRA1, 0); // request attitude
            MainV2.comPort.requestDatastream(MAVLink.MAV_DATA_STREAM.EXTRA2, 0); // request vfr
            MainV2.comPort.requestDatastream(MAVLink.MAV_DATA_STREAM.EXTRA3, 0); // request extra stuff - tridge
            MainV2.comPort.requestDatastream(MAVLink.MAV_DATA_STREAM.RAW_SENSORS, 0); // request raw sensor
            MainV2.comPort.requestDatastream(MAVLink.MAV_DATA_STREAM.RC_CHANNELS, 0); // request rc info

// Load parameters normally. Seems to work fine. But still sometimes planner 
times out occationally.

Original issue reported on code.google.com by duffy.p...@gmail.com on 16 Jan 2014 at 4:45