Skip to content

Commit

Permalink
Fixing generated pathnames
Browse files Browse the repository at this point in the history
  • Loading branch information
timcanham committed Jul 30, 2021
1 parent 58f415f commit b47ef5d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Autocoders/Python/bin/tlm_packet_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

from lxml import etree
from Cheetah.Template import Template
from fprime_ac.utils.buildroot import search_for_file, set_build_roots, build_root_relative_path
from fprime_ac.utils.buildroot import search_for_file, set_build_roots, get_nearest_build_root

header_file_template = """
Expand All @@ -62,7 +62,7 @@
\#include <Svc/TlmPacketizer/TlmPacketizerTypes.hpp>
\#include <${output_header}>
\#include <Fw/Cfg/Config.hpp>
\#include <FpConfig.hpp>
\#include <Fw/Types/BasicTypes.hpp>
\#include <Fw/Time/Time.hpp>
Expand Down Expand Up @@ -373,8 +373,8 @@ def gen_packet_file(self, xml_filename):
else:
raise TlmPacketParseValueError("Invalid xml type %s"%element_tree.getroot().tag)

output_file_base = os.path.splitext(os.path.basename(xml_filename))[0].replace("Ai","")
file_dir = os.path.dirname(xml_filename).replace(build_root.build_root_relative_path() ,"")
output_file_base = os.path.splitext(os.path.basename(xml_filename))[0].replace("Ai","")
file_dir = os.path.dirname(xml_filename).replace(get_nearest_build_root(xml_filename) + os.sep ,"")


missing_channels = False
Expand Down

0 comments on commit b47ef5d

Please sign in to comment.