When I plug a PingRX into my Pixhawk 2.1, weird things start to happen. When I connect to it via Mavproxy, I see this:
STABILIZE> Mode(0x00000004)> APM: ADSB: Found transceiver on channel 3 STABILIZE> Mode(0x00000004)> STABILIZE> Mode STABILIZE Mode(0x00000004)> STABILIZE> Mode(0x00000004)> STABILIZE> Mode(0x00000004)> Mode Mode(0x00000004) STABILIZE> Mode(0x00000004)> STABILIZE> Mode STABILIZE Mode(0x00000004)> STABILIZE> Mode(0x00000004)> STABILIZE> Mode(0x00000004)> Mode Mode(0x00000004) STABILIZE> Mode(0x00000004)> STABILIZE> Mode(0x00000004)> STABILIZE> Mode STABILIZE Mode(0x00000004)> STABILIZE> Mode(0x00000004)> STABILIZE> Mode(0x00000004)> Mode Mode(0x00000004) STABILIZE> Mode(0x00000004)>
Most commands issued via Mavproxy timeout or otherwise fail, for example I cannot change flight modes or set parameters. When I unplug the Ping, the spam goes away and everything works normally. Mission Planner’s Mavlink message inspector sees the ADSB messages coming in (as well as other status messages), so the Ping is working and connected correctly. I’m just not sure why it’s spamming this.
Yeah, I’ve tried using lower stream rates on various serial ports. No change; the spam still appeared at the same rate. Verified that the stream rate was 1 Hz with mavlink inspector.
After some more testing, it seems Mission Planner is working fine, so the problem might actually be specific to Mavproxy. Might need to move this topic, it doesn’t seem specific to any version of arducopter. Can a moderator move this to the Mavproxy section?
Nevermind, the spam is gone, but Mavproxy still behaves abnormally and the drone changes flight mode by itself. For example, I used Mavproxy to change to Loiter and it worked, but a few seconds later, custom_mode was showing Stabilize (although Mavproxy still shows LOITER) and further attempts to change mode resulted in an error:
LOITER> mode
LOITER> ('Available modes: ', ['STABILIZE', 'LAND', 'OF_LOITER', 'RTL', 'DRIFT', 'FLIP', 'AUTOTUNE', 'BRAKE', 'GUIDED_NOGPS', 'AVOID_ADSB', 'POSITION', 'SPORT', 'FLOWHOLD', 'POSHOLD', 'AUTO', 'GUIDED', 'FOLLOW', 'ACRO', 'SMART_RTL', 'ALT_HOLD', 'LOITER', 'CIRCLE', 'THROW'])
Got MAVLink msg: COMMAND_ACK {command : 183, result : 0}
LOITER> loiter
LOITER> Got MAVLink msg: COMMAND_ACK {command : 11, result : 0}
LOITER> mode loiter
LOITER> Got MAVLink msg: COMMAND_ACK {command : 11, result : 0}
LOITER> loiter
LOITER> ERROR in command: argument of type 'NoneType' is not iterable
Unknown command 'loiter'
mode
LOITER> No mode mapping available
The problem is intermittent; sometimes I can change mode, sometimes I get this error. Not sure what else might be broken. As soon as I unplug the PingRX, the problem disappears.
With latest Mavproxy and pymavlink (with your patch to pymavutil), the spam is gone, but Mavproxy still doesn’t know what flight modes there are. There doesn’t seem to be any other problems outside of Mavproxy, so the remaining issue might be specifically a Mavproxy problem.