Skip to content

Commit

Permalink
remove generation of header_includer
Browse files Browse the repository at this point in the history
Since it was just included in two stages,  mros2.cpp will include templates.hpp which will be generated into platform's workspace directly from mros2.cpp
  • Loading branch information
takasehideki committed Mar 11, 2022
1 parent 4f3f7e2 commit 22427b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
1 change: 0 additions & 1 deletion mros2_header_generator/header_includer.tpl

This file was deleted.

11 changes: 3 additions & 8 deletions mros2_header_generator/templates_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@ def main():
datatext = template.render({ "includeFiles":includeFiles, "pubMsgTypes":pubMsgTypes, "subMsgTypes":subMsgTypes })
with open(os.path.join(app+"/templates.hpp"), "wb") as f:
f.write(datatext.encode('utf-8'))

env = Environment(loader=FileSystemLoader('../mros2/mros2_header_generator'))
template = env.get_template('header_includer.tpl')
datatext = template.render({ "app": app })
with open(os.path.join("../header_includer/header_includer.hpp"), "wb") as f:
f.write(datatext.encode('utf-8'))



if __name__ == "__main__":
main()
main()
5 changes: 2 additions & 3 deletions src/mros2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,7 @@ void setTrue(void* args)
*static_cast<volatile bool*>(args) = true;
}


/*
* specialize template functions
* specialize template functions described in platform's workspace
*/
#include "../../header_includer/header_includer.hpp"
#include "templates.hpp"

0 comments on commit 22427b9

Please # to comment.