msg: don't implement print_message for fmu-v2

This saves about 3.4k of flash for fmu-v2.
This commit is contained in:
Julian Oes
2019-10-18 11:23:32 +02:00
committed by Lorenz Meier
parent e9c9fb8239
commit d3da4a92e0
3 changed files with 21 additions and 2 deletions
+9 -2
View File
@@ -33,7 +33,7 @@
#############################################################################
"""
px_generate_uorb_topics.py
px_generate_uorb_topic_files.py
Generates c/cpp header/source files for uorb topics from .msg (ROS syntax)
message files
"""
@@ -85,6 +85,8 @@ PACKAGE = 'px4'
TOPICS_TOKEN = '# TOPICS '
IDL_TEMPLATE_FILE = 'msg.idl.em'
CONSTRAINED_FLASH = False
class MsgScope:
NONE = 0
@@ -156,7 +158,8 @@ def generate_output_from_file(format_idx, filename, outputdir, package, template
"search_path": search_path,
"msg_context": msg_context,
"spec": spec,
"topics": topics
"topics": topics,
"constrained_flash": CONSTRAINED_FLASH
}
# Make sure output directory exists:
@@ -511,11 +514,15 @@ if __name__ == "__main__":
parser.add_argument('-q', dest='quiet', default=False, action='store_true',
help='string added as prefix to the output file '
' name when converting directories')
parser.add_argument('--constrained-flash', dest='constrained_flash', default=False, action='store_true',
help='set to save flash space')
args = parser.parse_args()
if args.include_paths:
append_to_include_path(args.include_paths, INCL_DEFAULT, args.package)
CONSTRAINED_FLASH = args.constrained_flash
if args.headers:
generate_idx = 0
elif args.sources: