forked from olliw42/mLRS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_setup.py
43 lines (34 loc) · 1.25 KB
/
run_setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env python
'''
*******************************************************
Copyright (c) MLRS project
GPL3
https://www.gnu.org/licenses/gpl-3.0.de.html
OlliW @ www.olliw.eu
*******************************************************
run_setup.py
1. run git submodule update --init --recursive
2. calls fmav_generate_c_library.py to generated mavlink library files
********************************************************
'''
import os
import shutil
import re
import sys
mLRSProjectdirectory = os.path.dirname(os.path.abspath(__file__))
mLRSdirectory = os.path.join(mLRSProjectdirectory,'mLRS')
def git_submodules_update():
print('----------------------------------------')
print(' run git submodule update --init --recursive')
print('----------------------------------------')
os.system('git submodule update --init --recursive')
print('# DONE #')
def generate_mavlink_c_library():
print('----------------------------------------')
print(' run fmav_generate_c_library.py')
print('----------------------------------------')
os.chdir(os.path.join(mLRSdirectory,'Common','mavlink'))
os.system(os.path.join('.','fmav_generate_c_library.py'))
print('# DONE #')
git_submodules_update()
generate_mavlink_c_library()