SITL operating parameters-P cannot set parameters

I run sitl simulation on ubuntu and use the command: ./arducopter --home 34.0226236,116.8734099,30,0 --model quad --uartA udpclient: -P SYSID_THISMAV=2, and the command uses -P SYSID_THISMAV =2 Set parameters, but no effect:


-P does not work. Save the params to a file and reference that instead

I see that the eeprom.bin file is also generated in the current directory, why can’t it be saved?

edit your defaults.param file


To set the SYSID_THISMAV you should use the --sysid cmdline option.
The issue with this parameter is that it is loaded early on boot, so it won’t work with the -P option.

agh thats is master now :slight_smile:

When are the parameters saved in the eeprom.bin loaded? I run the sitl code and see that the parameters can be saved to eeprom.bin, but the saved parameters cannot be loaded at the next startup:

Parameters pass by cmdline option aren’t permanent so they aren’t saved in the eeprom. You can still change the parameter manually with some param change request and they will be saved in the eeprom.
That the same for the parameters into the default file like copter.parm.

I changed SYSID_THISMAV=2 in the mission planner parameter table, but SYSID_THISMAV is still 1 after the sitl program restarts. I suspect that the saved parameters are not loaded. You said “change the parameter manually with some param change request and they will be saved in the eeprom.” Is it through this method?


what is the cmdline you are using to launch SITL?
did you save the parameter on Mission Planner ?

./arducopter --home 34.0226236,116.8734099,30,0 --model quad --uartA udpclient: --defaults …/…/…/Tools/autotest/default_params/copter.parm
Now you can save the parameters on the MP, thank you!