Closed fnoop closed 6 years ago
The default config is the last option which is used when all other options have failed. By default it will look for config files in the following order:
_conf_file_path = os.path.join(os.environ['HOME'], ".mavcesium.ini")
_conf_file_path = os.path.join(os.environ['LOCALAPPDATA'], "MAVProxy", "mavcesium.ini")
mavcesium_default.ini
from the MAVProxy directory
https://github.com/SamuelDudley/MAVCesium/blob/master/app/config.py#L18Try adding a custom config file called .mavcesium.ini
(note the leading dot) to your users home directory. It should be used over the default config file when you next run MAVCesium. Note that the path of the config file which is used is printed to the MAVProxy console when MAVCesium loads.
This behaviour does not fix the issue of running multiple instances. To support that feature a config file path will need to be supplied at launch.
Having a bit more of a think about this... I could make a two step process to start the server from MAVProxy.
Any thoughts?
I think that sounds a bit complex, also won't allow auto-starting. Is there any way of passing an extra argument to mavproxy, that can then be used by mavcesium? That way you could specify the desired config to mavproxy at start.
I dont think that functionality exists at the moment but would be pretty simple to add. I'll work on a MAVProxy PR to add it.
@fnoop I would be grateful if you could +1 the MAVProxy PR: https://github.com/ArduPilot/MAVProxy/pull/452
Now that mavcesium is standalone, could a specific config file location parameter be added?
I have pushed some changes to #35 which allows the application to be ran with --configuration="/somepath/config.ini"
. This should solve your problem :)
Works great, thanks :)
New config parsing master code loads config (and api key) from mavproxy directory. This has two problems: