diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2016-08-07 22:20:45 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2016-08-07 22:21:31 +0200 |
commit | fd0e6e3aa0e7523a36011a2f0264737772aa5e24 (patch) | |
tree | 9ada25e6f4d072e2fc01ca62120cc416af8fc716 /core/kicad.cpp | |
parent | 535d856a39b177642724bcfe6009985bf4262dbd (diff) | |
download | kicad-utils-fd0e6e3aa0e7523a36011a2f0264737772aa5e24.tar.gz kicad-utils-fd0e6e3aa0e7523a36011a2f0264737772aa5e24.tar.bz2 kicad-utils-fd0e6e3aa0e7523a36011a2f0264737772aa5e24.tar.xz kicad-utils-fd0e6e3aa0e7523a36011a2f0264737772aa5e24.zip |
templates: nodemcu-arduino: NodeMCU with Arduino.
o Moving headers so they match the namespace they declare.
o Reducing debug logging.
Diffstat (limited to 'core/kicad.cpp')
-rw-r--r-- | core/kicad.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/core/kicad.cpp b/core/kicad.cpp index a553b62..c0315e6 100644 --- a/core/kicad.cpp +++ b/core/kicad.cpp @@ -1,4 +1,4 @@ -#include "trygvis/kicad.h" +#include "trygvis/kicad/netlist.h" #include "trygvis/antlr.h" #include "trygvis/string_utils.h" #include <KicadNetLexer.h> @@ -35,7 +35,7 @@ opt<const component *> netlist::find_component(const string &ref) const { return std::experimental::nullopt; } -vector<const net *> netlist::find_usage_of(const string &ref) const { +vector<const net *> netlist::find_nets_using_ref(const string &ref) const { vector<const net *> usage; for (auto &net : nets) { @@ -91,15 +91,9 @@ public: name = name.substr(1); } -// cerr << "exitNet: " << "code=" << code << ", name=" << name << ", nodes=" << nodes.size() << endl; + bool hasName = !startsWith(name, "Net-("); -// if (nodes.size() > 1) { -// cerr << "Net#" << code << ": " << name << endl; -// for (auto &node: nodes) { -// cerr << " Node: " << node.ref << "#" << node.pin << endl; -// } -// } - nets.emplace_back(code, name, nodes); + nets.emplace_back(code, hasName ? opt<string>(name) : nullopt, nodes); nodes.clear(); } |