mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 03:13:33 +08:00
Add airframe .post scripts on NuttX targets
This commit is contained in:
committed by
Beat Küng
parent
e964af9262
commit
daeba4e75f
@@ -3,7 +3,7 @@ import codecs
|
||||
import os
|
||||
|
||||
class RCOutput():
|
||||
def __init__(self, groups, board):
|
||||
def __init__(self, groups, board, post_start=False):
|
||||
|
||||
result = ( "#\n"
|
||||
"#\n"
|
||||
@@ -41,7 +41,19 @@ class RCOutput():
|
||||
excluded = True
|
||||
if excluded:
|
||||
continue
|
||||
path = os.path.split(param.GetPath())[1]
|
||||
|
||||
if post_start:
|
||||
# Path to post-start sript
|
||||
path = param.GetPostPath()
|
||||
else:
|
||||
# Path to start script
|
||||
path = param.GetPath()
|
||||
|
||||
if not path:
|
||||
continue
|
||||
|
||||
path = os.path.split(path)[1]
|
||||
|
||||
id_val = param.GetId()
|
||||
name = param.GetFieldValue("short_desc")
|
||||
long_desc = param.GetFieldValue("long_desc")
|
||||
@@ -58,7 +70,7 @@ class RCOutput():
|
||||
result += "\n"
|
||||
|
||||
result += "\n"
|
||||
self.output = result;
|
||||
self.output = result
|
||||
|
||||
def Save(self, filename):
|
||||
with codecs.open(filename, 'w', 'utf-8') as f:
|
||||
|
||||
Reference in New Issue
Block a user