waf: mavgen: expand tabs to spaces

Although waf's coding style uses tabs instead of spaces, scripts created for
this repository have been using spaces from the beginning.
This commit is contained in:
Gustavo Jose de Sousa 2016-01-13 12:39:32 -02:00 committed by Andrew Tridgell
parent abc2d712c3
commit b3c1c2efd9

View File

@ -11,12 +11,12 @@ from waflib.TaskGen import feature, before_method, extension
import os
class mavgen(Task.Task):
"""generate mavlink header files"""
color = 'GREEN'
run_str = '${PYTHON} ${MAVGEN} --lang=C --wire-protocol=1.0 --output ${TGT} ${SRC}'
"""generate mavlink header files"""
color = 'GREEN'
run_str = '${PYTHON} ${MAVGEN} --lang=C --wire-protocol=1.0 --output ${TGT} ${SRC}'
def options(opt):
opt.load('python')
opt.load('python')
@feature('mavgen')
@before_method('process_source')
@ -34,26 +34,26 @@ def process_mavgen(self):
self.create_task('mavgen', inputs, outputs)
def configure(cfg):
"""
setup environment for mavlink header generator
"""
cfg.load('python')
cfg.check_python_version(minver=(2,7,0))
"""
setup environment for mavlink header generator
"""
cfg.load('python')
cfg.check_python_version(minver=(2,7,0))
env = cfg.env
cfg.env.env = dict(os.environ)
env = cfg.env
cfg.env.env = dict(os.environ)
cfg.start_msg('Checking for message_definitions')
if not cfg.srcnode.find_resource('modules/mavlink/message_definitions/v1.0/ardupilotmega.xml'):
cfg.fatal(env.MAV_MSG_DEFS + ' not found, please run: git submodule init && git submodule update', color='RED')
return
cfg.end_msg('success')
cfg.start_msg('Checking for message_definitions')
if not cfg.srcnode.find_resource('modules/mavlink/message_definitions/v1.0/ardupilotmega.xml'):
cfg.fatal(env.MAV_MSG_DEFS + ' not found, please run: git submodule init && git submodule update', color='RED')
return
cfg.end_msg('success')
env.MAVLINK_DIR = cfg.srcnode.find_dir('modules/mavlink/').abspath()
env.MAVLINK_DIR = cfg.srcnode.find_dir('modules/mavlink/').abspath()
env.MAVLINK_HEADERS = cfg.bldnode.make_node('/libraries/GCS_MAVLink/include/mavlink/v1.0/').abspath()
env.MAVLINK_HEADERS = cfg.bldnode.make_node('/libraries/GCS_MAVLink/include/mavlink/v1.0/').abspath()
env.MAVGEN = env.MAVLINK_DIR + '/pymavlink/tools/mavgen.py'
cfg.env.env['PYTHONPATH'] = env.MAVLINK_DIR
env.MAVGEN = env.MAVLINK_DIR + '/pymavlink/tools/mavgen.py'
cfg.env.env['PYTHONPATH'] = env.MAVLINK_DIR
env.MAV_MSG_DEFS = cfg.srcnode.find_resource('modules/mavlink/message_definitions/v1.0/ardupilotmega.xml').abspath()
env.MAV_MSG_DEFS = cfg.srcnode.find_resource('modules/mavlink/message_definitions/v1.0/ardupilotmega.xml').abspath()