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

rcout script changes #12527

Merged
merged 3 commits into from
Jul 31, 2019
Merged
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
19 changes: 15 additions & 4 deletions Tools/px4airframes/rcout.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def __init__(self, groups, board, post_start=False):
"# 12000 .. 12999 Octo Cox\n"
"# 13000 .. 13999 VTOL\n"
"# 14000 .. 14999 Tri Y\n"
""
""
"cd /etc/init.d/airframes\n"
"\n")
result += "\n"
result += "set AIRFRAME none\n"
result += "\n"
for group in groups:
result += "# GROUP: %s\n\n" % group.GetName()
for param in group.GetParams():
Expand Down Expand Up @@ -62,14 +62,25 @@ def __init__(self, groups, board, post_start=False):
result += "# %s\n" % param.GetName()
result += "if param compare SYS_AUTOSTART %s\n" % id_val
result += "then\n"
result += "\tsh %s\n" % path
result += "\tset AIRFRAME %s\n" % path
result += "fi\n"

#if long_desc is not None:
# result += "# %s\n" % long_desc
result += "\n"

result += "\n"
result += "\n"
result += "if [ ${AIRFRAME} != none ]\n"
result += "then\n"
result += "\tsh /etc/init.d/airframes/${AIRFRAME}\n"
if not post_start:
result += "else\n"
result += "\techo \"ERROR [init] No file matches SYS_AUTOSTART value found in : /etc/init.d/airframes\"\n"
result += "\techo \"ERROR [init] No file matches SYS_AUTOSTART value found in : /etc/init.d/airframes\" >> $LOG_FILE\n"
result += "\ttone_alarm ${TUNE_ERR}\n"
result += "fi\n"
result += "unset AIRFRAME"
self.output = result

def Save(self, filename):
Expand Down