ArduPilot / ArduPilot/MAVProxy

Changing parameter from `--cmd` switch on start

Open
#343 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
595
Forks
773
Avg merge
2d 6h
Merged PRs (30d)
18

Description

I am trying to figure out if this is a problem with MAVProxy or sim_vehicle.py but I think it is an issue with MAVProxy.
When MAVProxy gets a string for the `--cmd` switch it runs `module load` just fine but if you do something with the params it will say `Unable to find parameter 'PARAMETERNAME'`. Then if you run the same command once it has connected to the vehicle, it will work.
I have started a simulated instance with the output `udp:127.0.0.1:14560` and then ran
```
mavproxy.py --master=udp:127.0.0.1:14560 --cmd="param set SYSID_THISMAV 3"
```
and it says `Unable to find parameter 'SYSID_THISMAV'`. But if I run that command after it connects it is fine. So it seems there is an issue with how MAVProxy handles the `--cmd` switch on start.
Should it wait to run the commands it gets in the `--cmd` switch until it gets heartbeats?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with mavproxy.py using --master=udp:127.0.0.1:14560 and --cmd="param set SYSID_THISMAV 3" against the simulated instance. Inspect how startup --cmd commands are processed relative to the first heartbeat and parameter availability; done means the command succeeds at startup without reporting that the parameter cannot be found.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.