Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/board/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,8 @@ void Board::expand_packages()
}
else {
it_pad.second.net = nullptr;
}
if (it.second.pin_name_on_pad || it_pad.second.net == nullptr) {
it_pad.second.secondary_text = "("
+ it.second.component->part->entity->gates.at(pin_path.at(0))
.unit->pins.at(pin_path.at(1))
Expand All @@ -825,7 +827,7 @@ void Board::expand_packages()
}
else {
it_pad.second.net = nullptr;
it_pad.second.secondary_text = "NC";
it_pad.second.secondary_text = "(unmapped)";
it_pad.second.is_nc = true;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/board/board_package.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class BoardPackage : public UUIDProvider {
bool omit_silkscreen = false;
bool fixed = false;
bool omit_outline = false;
bool pin_name_on_pad = false;
std::vector<uuid_ptr<Text>> texts;

std::string replace_text(const std::string &t, bool *replaced = nullptr) const;
Expand Down
1 change: 1 addition & 0 deletions src/common/object_descr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ const std::map<ObjectType, ObjectDescription> object_descriptions = {
{ObjectProperty::ID::OMIT_SILKSCREEN, {ObjectProperty::Type::BOOL, "Omit Silkscreen", 7}},
{ObjectProperty::ID::OMIT_OUTLINE, {ObjectProperty::Type::BOOL, "Omit outline", 8}},
{ObjectProperty::ID::FIXED, {ObjectProperty::Type::BOOL, "Fix", 9}},
{ObjectProperty::ID::PIN_NAME_ON_PAD, {ObjectProperty::Type::BOOL, "Pin names on pads", 10}},
}}},
{ObjectType::TRACK,
{"Track",
Expand Down
1 change: 1 addition & 0 deletions src/common/object_descr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class ObjectProperty {
OMIT_SILKSCREEN,
FIXED,
NOPOPULATE,
PIN_NAME_ON_PAD,
OMIT_OUTLINE
};
ObjectProperty(Type t, const std::string &l, int o = 0, const std::vector<std::pair<int, std::string>> &its = {})
Expand Down
8 changes: 8 additions & 0 deletions src/core/core_board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ bool CoreBoard::get_property(ObjectType type, const UUID &uu, ObjectProperty::ID
dynamic_cast<PropertyValueBool &>(value).value = pkg->omit_outline;
return true;

case ObjectProperty::ID::PIN_NAME_ON_PAD:
dynamic_cast<PropertyValueBool &>(value).value = pkg->pin_name_on_pad;
return true;

default:
return false;
}
Expand Down Expand Up @@ -324,6 +328,10 @@ bool CoreBoard::set_property(ObjectType type, const UUID &uu, ObjectProperty::ID
pkg->omit_outline = dynamic_cast<const PropertyValueBool &>(value).value;
break;

case ObjectProperty::ID::PIN_NAME_ON_PAD:
pkg->pin_name_on_pad = dynamic_cast<const PropertyValueBool &>(value).value;
break;

default:
return false;
}
Expand Down