Skip to content

Commit

Permalink
Cope with empy 4.0's API change
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Dec 1, 2023
1 parent bc016b9 commit cb5dc85
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions dronecan_dsdlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,29 +106,29 @@ def expand_message(msg_name):
if msg.kind == msg.KIND_SERVICE and template['type'] == 'service_header':
output = em.expand(service_header_template, msg=msg)
elif msg.kind == msg.KIND_SERVICE and template['type'] == 'response_header':
output = em.expand(msg_header_template, get_empy_env_response(msg))
output = em.expand(msg_header_template, _globals=get_empy_env_response(msg))
elif msg.kind == msg.KIND_SERVICE and template['type'] == 'request_header':
output = em.expand(msg_header_template, get_empy_env_request(msg))
output = em.expand(msg_header_template, _globals=get_empy_env_request(msg))
elif msg.kind == msg.KIND_MESSAGE and template['type'] == 'broadcast_header':
output = em.expand(msg_header_template, get_empy_env_broadcast(msg))
output = em.expand(msg_header_template, _globals=get_empy_env_broadcast(msg))
elif msg.kind == msg.KIND_SERVICE and template['type'] == 'response_src':
output = em.expand(msg_source_template, get_empy_env_response(msg))
output = em.expand(msg_source_template, _globals=get_empy_env_response(msg))
elif msg.kind == msg.KIND_SERVICE and template['type'] == 'request_src':
output = em.expand(msg_source_template, get_empy_env_request(msg))
output = em.expand(msg_source_template, _globals=get_empy_env_request(msg))
elif msg.kind == msg.KIND_MESSAGE and template['type'] == 'broadcast_src':
output = em.expand(msg_source_template, get_empy_env_broadcast(msg))
output = em.expand(msg_source_template, _globals=get_empy_env_broadcast(msg))
elif msg.kind == msg.KIND_SERVICE and template['type'] == 'test_response_src':
output = em.expand(test_src_template, get_empy_env_response(msg))
output = em.expand(test_src_template, _globals=get_empy_env_response(msg))
elif msg.kind == msg.KIND_SERVICE and template['type'] == 'test_request_src':
output = em.expand(test_src_template, get_empy_env_request(msg))
output = em.expand(test_src_template, _globals=get_empy_env_request(msg))
elif msg.kind == msg.KIND_MESSAGE and template['type'] == 'test_broadcast_src':
output = em.expand(test_src_template, get_empy_env_broadcast(msg))
output = em.expand(test_src_template, _globals=get_empy_env_broadcast(msg))
elif msg.kind == msg.KIND_SERVICE and template['type'] == 'Makefile_response':
output = em.expand(test_mk_template, get_empy_env_response(msg))
output = em.expand(test_mk_template, _globals=get_empy_env_response(msg))
elif msg.kind == msg.KIND_SERVICE and template['type'] == 'Makefile_request':
output = em.expand(test_mk_template, get_empy_env_request(msg))
output = em.expand(test_mk_template, _globals=get_empy_env_request(msg))
elif msg.kind == msg.KIND_MESSAGE and template['type'] == 'Makefile_broadcast':
output = em.expand(test_mk_template, get_empy_env_broadcast(msg))
output = em.expand(test_mk_template, _globals=get_empy_env_broadcast(msg))
if not output.strip():
continue

Expand Down

0 comments on commit cb5dc85

Please sign in to comment.