What steps will reproduce the problem?
1. Open Mission Planner and connect to an ArduPlane (not yet tested on
ArduCopter).
2. Select FLY_BY_WIRE_B, RTL, or LOITER from the "Actions" tab and click "Set
Mode"
3. Look at "mode" on the "Status" tab.
What is the expected output? What do you see instead?
Expected: "mode" on "Status" tab will accurately reflect the mode you just
changed into.
Actual: FLY_BY_WIRE_B enters FLY_BY_WIRE_A mode and RTL and LOITER enter AUTO
mode.
What version of the product are you using? On what operating system?
APM Planner 1.1.61 on Windows.
Please provide any additional information below.
This problem stems from how mode change messages are sent. In MAVLink.cs, the
setMode method sends the mode change message twice, two SET_NAV_MODE messages
followed by two SET_MODE messages. When the SET_MODE message is processed by
ArduPlane, it uses info from SET_NAV_MODE to determine which mode to change
into and then resets the variable used to store the supplemental info. Because
of that reset, the second SET_MODE message changes into the wrong mode.
Solution would be to either change the sequencing of how the messages are sent
via APM Planner (SET_NAV_MODE, SET_MODE, SET_NAV_MODE, SET_MODE) or just send
one set of mode change messages. Why is the SET_MODE message sent twice anyway?
-Eric
Original issue reported on code.google.com by e...@erictimmons.org on 10 Apr 2012 at 2:58
Original issue reported on code.google.com by
e...@erictimmons.org
on 10 Apr 2012 at 2:58