mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
Build system: Add support for airframes config file
This commit is contained in:
12
Tools/airframes.xml
Normal file
12
Tools/airframes.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<airframes>
|
||||
<airframe_group name="StandardPlane">
|
||||
<airframe name="Multiplex Easystar 1/2" id="2100"/>
|
||||
<airframe name="Generic AERT" id="2101"/>
|
||||
</airframe_group>
|
||||
<airframe_group name="QuadRotorX">
|
||||
<airframe name="Generic 10 inch Quad" id="4001"/>
|
||||
<airframe name="DJI F330 8 inch Quad" id="4010"/>
|
||||
<airframe name="DJI F450 10 inch Quad" id="4011"/>
|
||||
</airframe_group>
|
||||
</airframes>
|
||||
@@ -74,6 +74,7 @@ parser.add_argument("--summary", action="store", help="set a brief description")
|
||||
parser.add_argument("--description", action="store", help="set a longer description")
|
||||
parser.add_argument("--git_identity", action="store", help="the working directory to check for git identity")
|
||||
parser.add_argument("--parameter_xml", action="store", help="the parameters.xml file")
|
||||
parser.add_argument("--airframe_xml", action="store", help="the airframes.xml file")
|
||||
parser.add_argument("--image", action="store", help="the firmware image")
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -107,6 +108,11 @@ if args.parameter_xml != None:
|
||||
bytes = f.read()
|
||||
desc['parameter_xml_size'] = len(bytes)
|
||||
desc['parameter_xml'] = base64.b64encode(zlib.compress(bytes,9)).decode('utf-8')
|
||||
if args.airframe_xml != None:
|
||||
f = open(args.airframe_xml, "rb")
|
||||
bytes = f.read()
|
||||
desc['airframe_xml_size'] = len(bytes)
|
||||
desc['airframe_xml'] = base64.b64encode(zlib.compress(bytes,9)).decode('utf-8')
|
||||
if args.image != None:
|
||||
f = open(args.image, "rb")
|
||||
bytes = f.read()
|
||||
|
||||
Reference in New Issue
Block a user