Skip to content

Commit 927319e

Browse files
Use protoc-gen-mavsdk (renamed from protoc-gen-dcsdk)
1 parent 588384e commit 927319e

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

other/tools/run_protoc.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ GENERATED_DIR_RST="${WORK_DIR}/mavsdk/source/plugins"
1313

1414
PLUGIN_LIST=$(cd ${WORK_DIR}/proto/protos && ls -d */ | sed 's:/*$::')
1515

16+
command -v protoc-gen-mavsdk > /dev/null || {
17+
echo "-------------------------------"
18+
echo " Error"
19+
echo "-------------------------------"
20+
echo >&2 "'protoc-gen-mavsdk' not found in PATH"
21+
echo >&2 ""
22+
echo >&2 "Make sure 'protoc-gen-mavsdk' is installed and available"
23+
exit 1
24+
}
25+
1626
function snake_case_to_camel_case {
1727
echo $1 | sed -r 's/(^|_)([a-z])/\U\2/g'
1828
}
@@ -49,18 +59,18 @@ function generate {
4959

5060
# Generate plugin
5161
python3 -m grpc_tools.protoc -I${PROTO_DIR}/protos \
52-
--plugin=protoc-gen-custom=$(which protoc-gen-dcsdk) \
62+
--plugin=protoc-gen-custom=$(which protoc-gen-mavsdk) \
5363
--custom_out=${GENERATED_DIR} \
5464
--custom_opt="file_ext=py,template_path=${TEMPLATE_PATH}" \
5565
${plugin}/${plugin}.proto
5666

57-
# protoc-gen-dcsdk capitalizes filenames, and we don't want that with python
67+
# protoc-gen-mavsdk capitalizes filenames, and we don't want that with python
5868
mv ${GENERATED_DIR}/${plugin}/$(snake_case_to_camel_case ${plugin}).py ${GENERATED_DIR}/${plugin}.py
5969

6070
# Generate plugin doc entry
6171
python3 -m grpc_tools.protoc -I${PROTO_DIR}/protos \
6272
--proto_path=${PROTO_DIR}/protos/${plugin} \
63-
--plugin=protoc-gen-custom=$(which protoc-gen-dcsdk) \
73+
--plugin=protoc-gen-custom=$(which protoc-gen-mavsdk) \
6474
--custom_out=${GENERATED_DIR_RST} \
6575
--custom_opt="file_ext=rst,template_path=${TEMPLATE_PATH_RST}" \
6676
${plugin}.proto

proto

Submodule proto updated from 471aa4a to 9cd9685

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def version():
130130
classifiers=[
131131
"Development Status :: 5 - Production/Stable",
132132
"Intended Audience :: Developers",
133-
"License :: OSI Approved :: Apache Software License",
133+
"License :: OSI Approved :: BSD License",
134134
"Programming Language :: Python :: 3.6",
135135
],
136136

0 commit comments

Comments
 (0)