Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update.py: grab heli parameters into copter/heli-Parameters.rst #3540

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
'plane': 'ArduPlane',
'antennatracker': 'AntennaTracker',
'AP_Periph': 'AP_Periph',
'heli': 'Heli',
}
LOGMESSAGE_SITE = {
'rover': 'Rover',
Expand Down Expand Up @@ -179,6 +180,8 @@ def fetchparameters(site=args.site):
targetfile = './%s/source/docs/parameters.rst' % key
if key == 'AP_Periph':
targetfile = './dev/source/docs/AP_Periph-Parameters.rst'
elif key == "heli":
targetfile = './copter/source/docs/heli-Parameters.rst'
if args.cached_parameter_files:
if not os.path.exists(targetfile):
raise Exception("Asked to use cached parameter files, but (%s) does not exist" % (targetfile,)) # noqa
Expand Down Expand Up @@ -561,10 +564,13 @@ def fetch_versioned_parameters(site=args.site):

for key, value in PARAMETER_SITE.items():

if key == 'AP_Periph': # workaround until create a versioning for AP_Periph in firmware server
if key in ['AP_Periph', 'heli']: # workaround until create a versioning for AP_Periph in firmware server
fetchurl = 'https://autotest.ardupilot.org/Parameters/%s/Parameters.rst' % value # noqa
subprocess.check_call(["wget", fetchurl])
targetfile = './dev/source/docs/AP_Periph-Parameters.rst'
if key == 'AP_Periph':
targetfile = './dev/source/docs/AP_Periph-Parameters.rst'
else:
targetfile = './dev/source/docs/heli-Parameters.rst'
os.rename('Parameters.rst', targetfile)

else: #regular versining
Expand Down Expand Up @@ -686,7 +692,7 @@ def cache_parameters_files(site=args.site):
old_params_mversion/ folders and .html built files as well.
"""
for key, value in PARAMETER_SITE.items():
if (site == key or site is None) and (key != 'AP_Periph'): # and (key != 'AP_Periph') workaround until create a versioning for AP_Periph in firmware server
if (site == key or site is None) and (key not in ['AP_Periph', 'heli']): # and (key != 'AP_Periph') workaround until create a versioning for AP_Periph in firmware server
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it still the versioning system on the Wiki server that I did in 2019? If so, I'd be happy to add these two versionings when time permits. let me know. ping @Hwurzburg and ping @peterbarker

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brunoolivieri Bruno, AFAIK its the same system....any help would be appreciated...

try:
old_parameters_folder = (os.getcwd() +
'/../old_params_mversion/%s/' % value)
Expand Down Expand Up @@ -728,7 +734,7 @@ def put_cached_parameters_files_in_sites(site=args.site):

"""
for key, value in PARAMETER_SITE.items():
if (site == key or site is None) and (key != 'AP_Periph'): # and (key != 'AP_Periph') workaround until create a versioning for AP_Periph in firmware server
if (site == key or site is None) and (key not in ['AP_Periph', 'heli']): # and (key != 'AP_Periph') workaround until create a versioning for AP_Periph in firmware server
try:
built_folder = (os.getcwd() +
'/../old_params_mversion/%s/' % value)
Expand Down