diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index abcf6e2283..f08b8a9e47 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -1189,12 +1189,44 @@ void CONNECTION_GRAPH::updateItemConnectivity( const SCH_SHEET_PATH& aSheet, { SCH_SYMBOL* symbol = static_cast( item ); + std::map> pinNumberMap; + for( SCH_PIN* pin : symbol->GetPins( &aSheet ) ) { m_items.emplace_back( pin ); SCH_CONNECTION* conn = pin->InitializeConnection( aSheet, this ); updatePin( pin, conn ); connection_map[ pin->GetPosition() ].push_back( pin ); + pinNumberMap[pin->GetNumber()].emplace_back( pin ); + } + + auto linkPinsInVec = + [&]( const std::vector& aVec ) + { + for( size_t i = 0; i < aVec.size(); ++i ) + { + for( size_t j = i + 1; j < aVec.size(); ++j ) + { + aVec[i]->AddConnectionTo( aSheet, aVec[j] ); + aVec[j]->AddConnectionTo( aSheet, aVec[i] ); + } + } + }; + + if( symbol->GetLibSymbolRef()->GetDuplicatePinNumbersAreJumpers() ) + { + for( const std::vector& group : pinNumberMap | std::views::values ) + linkPinsInVec( group ); + } + + for( const std::set& group : symbol->GetLibSymbolRef()->JumperPinGroups() ) + { + std::vector pins; + + for( const wxString& pinNumber : group ) + pins.emplace_back( symbol->GetPin( pinNumber ) ); + + linkPinsInVec( pins ); } } else diff --git a/eeschema/dialogs/dialog_lib_symbol_properties.cpp b/eeschema/dialogs/dialog_lib_symbol_properties.cpp index bb5bf7b567..f0a88b4ec1 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties.cpp +++ b/eeschema/dialogs/dialog_lib_symbol_properties.cpp @@ -102,6 +102,9 @@ DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES( SYMBOL_EDIT_FRAME* a m_deleteFilterButton->SetBitmap( KiBitmapBundle( BITMAPS::small_trash ) ); m_editFilterButton->SetBitmap( KiBitmapBundle( BITMAPS::small_edit ) ); + m_btnCreateJumperPinGroup->SetBitmap( KiBitmapBundle( BITMAPS::right ) ); + m_btnRemoveJumperPinGroup->SetBitmap( KiBitmapBundle( BITMAPS::left ) ); + SetupStandardButtons(); if( aParent->IsSymbolFromLegacyLibrary() && !aParent->IsSymbolFromSchematic() ) @@ -259,6 +262,35 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataToWindow() wxArrayString tmp = m_libEntry->GetFPFilters(); m_FootprintFilterListBox->Append( tmp ); + m_cbDuplicatePinsAreJumpers->SetValue( m_libEntry->GetDuplicatePinNumbersAreJumpers() ); + m_btnCreateJumperPinGroup->Disable(); + m_btnRemoveJumperPinGroup->Disable(); + + std::set availablePins; + + for( const SCH_PIN* pin : m_libEntry->GetPins() ) + availablePins.insert( pin->GetNumber() ); + + for( const std::set& group : m_libEntry->JumperPinGroups() ) + { + wxString groupTxt; + size_t i = 0; + + for( const wxString& pinNumber : group ) + { + availablePins.erase( pinNumber ); + groupTxt << pinNumber; + + if( ++i < group.size() ) + groupTxt << ", "; + } + + m_listJumperPinGroups->Append( groupTxt ); + } + + for( const wxString& pin : availablePins ) + m_listAvailablePins->AppendString( pin ); + // Populate the list of root parts for inherited objects. if( m_libEntry->IsDerived() ) { @@ -525,6 +557,23 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataFromWindow() m_libEntry->SetFPFilters( m_FootprintFilterListBox->GetStrings()); + m_libEntry->SetDuplicatePinNumbersAreJumpers( m_cbDuplicatePinsAreJumpers->GetValue() ); + + std::vector>& jumpers = m_libEntry->JumperPinGroups(); + jumpers.clear(); + + for( unsigned i = 0; i < m_listJumperPinGroups->GetCount(); ++i ) + { + wxStringTokenizer tokenizer( m_listJumperPinGroups->GetString( i ), ", " ); + std::set& group = jumpers.emplace_back(); + + while( tokenizer.HasMoreTokens() ) + { + if( wxString token = tokenizer.GetNextToken(); !token.IsEmpty() ) + group.insert( token ); + } + } + m_Parent->UpdateAfterSymbolProperties( &oldName ); // It's possible that the symbol being edited has no pins, in which case there may be no @@ -1041,3 +1090,77 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnPageChanging( wxBookCtrlEvent& aEvent ) if( !m_grid->CommitPendingChanges() ) aEvent.Veto(); } + + +void DIALOG_LIB_SYMBOL_PROPERTIES::OnBtnCreateJumperPinGroup( wxCommandEvent& aEvent ) +{ + wxArrayInt selections; + int n = m_listAvailablePins->GetSelections( selections ); + wxCHECK( n > 0, /* void */ ); + + m_listJumperPinGroups->Freeze(); + m_listAvailablePins->Freeze(); + + wxString group; + int i = 0; + + for( int idx : selections ) + { + group << m_listAvailablePins->GetString( idx ); + + if( ++i < n ) + group << ", "; + } + + for( int idx = selections.size() - 1; idx >= 0; --idx ) + m_listAvailablePins->Delete( selections[idx] ); + + m_listJumperPinGroups->AppendString( group ); + + m_listJumperPinGroups->Thaw(); + m_listAvailablePins->Thaw(); +} + + +void DIALOG_LIB_SYMBOL_PROPERTIES::OnBtnRemoveJumperPinGroup( wxCommandEvent& aEvent ) +{ + wxArrayInt selections; + int n = m_listJumperPinGroups->GetSelections( selections ); + wxCHECK( n > 0, /* void */ ); + + m_listJumperPinGroups->Freeze(); + m_listAvailablePins->Freeze(); + + for( int idx : selections ) + { + wxStringTokenizer tokenizer( m_listJumperPinGroups->GetString( idx ), ", " ); + + while( tokenizer.HasMoreTokens() ) + { + if( wxString token = tokenizer.GetNextToken(); !token.IsEmpty() ) + m_listAvailablePins->AppendString( token ); + } + } + + for( int idx = selections.size() - 1; idx >= 0; --idx ) + m_listJumperPinGroups->Delete( selections[idx] ); + + m_listJumperPinGroups->Thaw(); + m_listAvailablePins->Thaw(); +} + + +void DIALOG_LIB_SYMBOL_PROPERTIES::OnGroupedPinListClick( wxCommandEvent& aEvent ) +{ + wxArrayInt selections; + int n = m_listJumperPinGroups->GetSelections( selections ); + m_btnRemoveJumperPinGroup->Enable( n > 0 ); +} + + +void DIALOG_LIB_SYMBOL_PROPERTIES::OnAvailablePinsClick( wxCommandEvent& aEvent ) +{ + wxArrayInt selections; + int n = m_listAvailablePins->GetSelections( selections ); + m_btnCreateJumperPinGroup->Enable( n > 0 ); +} diff --git a/eeschema/dialogs/dialog_lib_symbol_properties.h b/eeschema/dialogs/dialog_lib_symbol_properties.h index 632558d292..e17a8a268e 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties.h +++ b/eeschema/dialogs/dialog_lib_symbol_properties.h @@ -73,6 +73,10 @@ private: void OnCancelButtonClick( wxCommandEvent& event ) override; void OnPageChanging( wxNotebookEvent& event ) override; void OnFpFilterDClick( wxMouseEvent& event ) override; + void OnBtnCreateJumperPinGroup( wxCommandEvent& event ) override; + void OnBtnRemoveJumperPinGroup( wxCommandEvent& event ) override; + void OnGroupedPinListClick( wxCommandEvent& event ) override; + void OnAvailablePinsClick( wxCommandEvent& event ) override; void adjustGridColumns(); void syncControlStates( bool aIsAlias ); diff --git a/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp b/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp index 9ede1237ee..fd606b279e 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp +++ b/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a-dirty) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -214,8 +214,8 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* bSizerLowerBasicPanel->Add( bSizerLeftCol, 1, wxEXPAND, 5 ); - wxBoxSizer* bSizerMiddleCol; - bSizerMiddleCol = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizerPinTextCol; + bSizerPinTextCol = new wxBoxSizer( wxVERTICAL ); wxStaticBoxSizer* sbSizerPinTextOpts; sbSizerPinTextOpts = new wxStaticBoxSizer( new wxStaticBox( m_PanelBasic, wxID_ANY, _("Pin Text Options") ), wxVERTICAL ); @@ -264,10 +264,10 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* sbSizerPinTextOpts->Add( 0, 0, 0, wxEXPAND, 5 ); - bSizerMiddleCol->Add( sbSizerPinTextOpts, 1, wxALL|wxEXPAND, 5 ); + bSizerPinTextCol->Add( sbSizerPinTextOpts, 1, wxALL|wxEXPAND, 5 ); - bSizerLowerBasicPanel->Add( bSizerMiddleCol, 1, wxEXPAND, 5 ); + bSizerLowerBasicPanel->Add( bSizerPinTextCol, 1, wxEXPAND, 5 ); wxBoxSizer* bSizerRightCol; bSizerRightCol = new wxBoxSizer( wxVERTICAL ); @@ -300,7 +300,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* m_PanelBasic->SetSizer( bSizerBasicPanel ); m_PanelBasic->Layout(); bSizerBasicPanel->Fit( m_PanelBasic ); - m_NoteBook->AddPage( m_PanelBasic, _("General"), true ); + m_NoteBook->AddPage( m_PanelBasic, _("General"), false ); m_PanelFootprintFilter = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bPanelFpFilterBoxSizer; bPanelFpFilterBoxSizer = new wxBoxSizer( wxHORIZONTAL ); @@ -349,6 +349,78 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* m_PanelFootprintFilter->Layout(); bPanelFpFilterBoxSizer->Fit( m_PanelFootprintFilter ); m_NoteBook->AddPage( m_PanelFootprintFilter, _("Footprint Filters"), false ); + m_PanelPinConnections = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer19; + bSizer19 = new wxBoxSizer( wxVERTICAL ); + + m_cbDuplicatePinsAreJumpers = new wxCheckBox( m_PanelPinConnections, wxID_ANY, _("Pins with duplicate numbers are jumpers"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbDuplicatePinsAreJumpers->SetToolTip( _("When enabled, this symbol can have more than one pin with the same number, and pins with the same number will be considered to be jumpered together internally.") ); + + bSizer19->Add( m_cbDuplicatePinsAreJumpers, 0, wxALL, 5 ); + + wxStaticBoxSizer* sbJumperPinGroups; + sbJumperPinGroups = new wxStaticBoxSizer( new wxStaticBox( m_PanelPinConnections, wxID_ANY, _("Jumper Pin Groups") ), wxVERTICAL ); + + wxBoxSizer* bSizer20; + bSizer20 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer22; + bSizer22 = new wxBoxSizer( wxVERTICAL ); + + stLabelAvailablePins = new wxStaticText( sbJumperPinGroups->GetStaticBox(), wxID_ANY, _("Available pins"), wxDefaultPosition, wxDefaultSize, 0 ); + stLabelAvailablePins->Wrap( -1 ); + bSizer22->Add( stLabelAvailablePins, 0, wxALL, 5 ); + + m_listAvailablePins = new wxListBox( sbJumperPinGroups->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_EXTENDED|wxLB_SORT ); + m_listAvailablePins->SetMinSize( wxSize( 200,-1 ) ); + + bSizer22->Add( m_listAvailablePins, 1, wxALL|wxEXPAND, 5 ); + + + bSizer20->Add( bSizer22, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer21; + bSizer21 = new wxBoxSizer( wxVERTICAL ); + + m_btnCreateJumperPinGroup = new wxBitmapButton( sbJumperPinGroups->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_btnCreateJumperPinGroup->SetToolTip( _("Create jumper group from the selected pins") ); + + bSizer21->Add( m_btnCreateJumperPinGroup, 0, wxALL, 5 ); + + m_btnRemoveJumperPinGroup = new wxBitmapButton( sbJumperPinGroups->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_btnRemoveJumperPinGroup->SetToolTip( _("Remove the selected jumper pin group") ); + + bSizer21->Add( m_btnRemoveJumperPinGroup, 0, wxALL, 5 ); + + + bSizer20->Add( bSizer21, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer23; + bSizer23 = new wxBoxSizer( wxVERTICAL ); + + stLabelGroups = new wxStaticText( sbJumperPinGroups->GetStaticBox(), wxID_ANY, _("Grouped pins"), wxDefaultPosition, wxDefaultSize, 0 ); + stLabelGroups->Wrap( -1 ); + bSizer23->Add( stLabelGroups, 0, wxALL, 5 ); + + m_listJumperPinGroups = new wxListBox( sbJumperPinGroups->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_EXTENDED|wxLB_SORT ); + m_listJumperPinGroups->SetMinSize( wxSize( 200,-1 ) ); + + bSizer23->Add( m_listJumperPinGroups, 1, wxALL|wxEXPAND, 5 ); + + + bSizer20->Add( bSizer23, 1, wxEXPAND, 5 ); + + + sbJumperPinGroups->Add( bSizer20, 1, wxEXPAND, 5 ); + + + bSizer19->Add( sbJumperPinGroups, 1, wxALL|wxTOP, 5 ); + + + m_PanelPinConnections->SetSizer( bSizer19 ); + m_PanelPinConnections->Layout(); + bSizer19->Fit( m_PanelPinConnections ); + m_NoteBook->AddPage( m_PanelPinConnections, _("Pin Connections"), true ); bUpperSizer->Add( m_NoteBook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); @@ -414,6 +486,10 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* m_FootprintFilterListBox->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnEditFootprintFilter ), NULL, this ); m_addFilterButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnAddFootprintFilter ), NULL, this ); m_editFilterButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnEditFootprintFilter ), NULL, this ); + m_listAvailablePins->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnAvailablePinsClick ), NULL, this ); + m_btnCreateJumperPinGroup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBtnCreateJumperPinGroup ), NULL, this ); + m_btnRemoveJumperPinGroup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBtnRemoveJumperPinGroup ), NULL, this ); + m_listJumperPinGroups->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnGroupedPinListClick ), NULL, this ); m_spiceFieldsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnEditSpiceModel ), NULL, this ); m_stdSizerButtonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this ); } @@ -450,6 +526,10 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::~DIALOG_LIB_SYMBOL_PROPERTIES_BASE() m_FootprintFilterListBox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnEditFootprintFilter ), NULL, this ); m_addFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnAddFootprintFilter ), NULL, this ); m_editFilterButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnEditFootprintFilter ), NULL, this ); + m_listAvailablePins->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnAvailablePinsClick ), NULL, this ); + m_btnCreateJumperPinGroup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBtnCreateJumperPinGroup ), NULL, this ); + m_btnRemoveJumperPinGroup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnBtnRemoveJumperPinGroup ), NULL, this ); + m_listJumperPinGroups->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnGroupedPinListClick ), NULL, this ); m_spiceFieldsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnEditSpiceModel ), NULL, this ); m_stdSizerButtonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this ); diff --git a/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp b/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp index 4ebbe362e3..8995125275 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp +++ b/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp @@ -136,7 +136,7 @@ General - 1 + 0 1 1 @@ -1048,16 +1048,16 @@ 5 wxEXPAND 1 - + bSizerLeftCol wxVERTICAL none - + 5 wxEXPAND|wxALL 0 - + wxID_ANY General @@ -1065,11 +1065,11 @@ wxVERTICAL 1 none - + 4 wxEXPAND|wxLEFT 1 - + bSizerUnitCount wxHORIZONTAL @@ -1401,26 +1401,26 @@ onPowerCheckBox - + 5 wxEXPAND 1 - + bSizer16 wxHORIZONTAL none - + 10 wxEXPAND|wxLEFT|wxRIGHT 0 - + 0 protected 0 - + 4 wxBOTTOM|wxLEFT|wxRIGHT 0 @@ -1496,16 +1496,16 @@ 5 wxEXPAND 1 - + - bSizerMiddleCol + bSizerPinTextCol wxVERTICAL none - + 5 wxALL|wxEXPAND 1 - + wxID_ANY Pin Text Options @@ -1721,11 +1721,11 @@ OnCheckBox - + 4 wxBOTTOM|wxEXPAND|wxTOP 0 - + bSizerNameOffset wxHORIZONTAL @@ -1940,16 +1940,16 @@ 5 wxEXPAND 1 - + bSizerRightCol wxVERTICAL none - + 5 wxEXPAND|wxALL 1 - + wxID_ANY Attributes @@ -1957,11 +1957,11 @@ wxVERTICAL 1 none - + 5 wxBOTTOM|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -2023,21 +2023,21 @@ OnCheckBox - + 5 wxEXPAND 0 - + 10 protected 0 - + 5 wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT 0 - + 1 1 1 @@ -2099,11 +2099,11 @@ OnCheckBox - + 5 wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT 0 - + 1 1 1 @@ -2178,7 +2178,7 @@ Footprint Filters 0 - + 1 1 1 @@ -2230,25 +2230,25 @@ wxTAB_TRAVERSAL - + bPanelFpFilterBoxSizer wxHORIZONTAL none - + 5 wxEXPAND|wxTOP|wxRIGHT|wxLEFT 1 - + bFpFilterLeftBoxSizer wxVERTICAL none - + 5 wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -2306,11 +2306,11 @@ -1 - + 5 wxEXPAND|wxRIGHT|wxLEFT 1 - + 1 1 1 @@ -2372,20 +2372,20 @@ OnEditFootprintFilter - + 5 0 - + bFpFilterRightBoxSizer wxHORIZONTAL none - + 5 wxTOP|wxBOTTOM|wxLEFT 0 - + 1 1 1 @@ -2456,11 +2456,11 @@ OnAddFootprintFilter - + 5 wxALL 0 - + 1 1 1 @@ -2531,21 +2531,21 @@ OnEditFootprintFilter - + 5 wxEXPAND 0 - + 0 protected 20 - + 5 wxALL 0 - + 1 1 1 @@ -2622,6 +2622,597 @@ + + + Pin Connections + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_PanelPinConnections + 1 + + + protected + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + wxTAB_TRAVERSAL + + + bSizer19 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Pins with duplicate numbers are jumpers + + 0 + + + 0 + + 1 + m_cbDuplicatePinsAreJumpers + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + When enabled, this symbol can have more than one pin with the same number, and pins with the same number will be considered to be jumpered together internally. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL|wxTOP + 1 + + wxID_ANY + Jumper Pin Groups + + sbJumperPinGroups + wxVERTICAL + 1 + none + + 5 + wxEXPAND + 1 + + + bSizer20 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer22 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Available pins + 0 + + 0 + + + 0 + + 1 + stLabelAvailablePins + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + 200,-1 + 1 + m_listAvailablePins + 1 + + + protected + 1 + + Resizable + 1 + + wxLB_EXTENDED|wxLB_SORT + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnAvailablePinsClick + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + + bSizer21 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + MyButton + + 0 + + 0 + + + 0 + + 1 + m_btnCreateJumperPinGroup + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + Create jumper group from the selected pins + + wxFILTER_NONE + wxDefaultValidator + + + + + OnBtnCreateJumperPinGroup + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + MyButton + + 0 + + 0 + + + 0 + + 1 + m_btnRemoveJumperPinGroup + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + Remove the selected jumper pin group + + wxFILTER_NONE + wxDefaultValidator + + + + + OnBtnRemoveJumperPinGroup + + + + + + 5 + wxEXPAND + 1 + + + bSizer23 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Grouped pins + 0 + + 0 + + + 0 + + 1 + stLabelGroups + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + 200,-1 + 1 + m_listJumperPinGroups + 1 + + + protected + 1 + + Resizable + 1 + + wxLB_EXTENDED|wxLB_SORT + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnGroupedPinListClick + + + + + + + + + + + diff --git a/eeschema/dialogs/dialog_lib_symbol_properties_base.h b/eeschema/dialogs/dialog_lib_symbol_properties_base.h index 7950f2f590..70db8b5cda 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties_base.h +++ b/eeschema/dialogs/dialog_lib_symbol_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a-dirty) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -84,6 +84,14 @@ class DIALOG_LIB_SYMBOL_PROPERTIES_BASE : public DIALOG_SHIM STD_BITMAP_BUTTON* m_addFilterButton; STD_BITMAP_BUTTON* m_editFilterButton; STD_BITMAP_BUTTON* m_deleteFilterButton; + wxPanel* m_PanelPinConnections; + wxCheckBox* m_cbDuplicatePinsAreJumpers; + wxStaticText* stLabelAvailablePins; + wxListBox* m_listAvailablePins; + wxBitmapButton* m_btnCreateJumperPinGroup; + wxBitmapButton* m_btnRemoveJumperPinGroup; + wxStaticText* stLabelGroups; + wxListBox* m_listJumperPinGroups; wxButton* m_spiceFieldsButton; wxStdDialogButtonSizer* m_stdSizerButton; wxButton* m_stdSizerButtonOK; @@ -108,6 +116,10 @@ class DIALOG_LIB_SYMBOL_PROPERTIES_BASE : public DIALOG_SHIM virtual void OnFpFilterDClick( wxMouseEvent& event ) { event.Skip(); } virtual void OnEditFootprintFilter( wxCommandEvent& event ) { event.Skip(); } virtual void OnAddFootprintFilter( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAvailablePinsClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnBtnCreateJumperPinGroup( wxCommandEvent& event ) { event.Skip(); } + virtual void OnBtnRemoveJumperPinGroup( wxCommandEvent& event ) { event.Skip(); } + virtual void OnGroupedPinListClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnEditSpiceModel( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); } diff --git a/eeschema/lib_symbol.cpp b/eeschema/lib_symbol.cpp index 0941f4d83f..4da0e201ed 100644 --- a/eeschema/lib_symbol.cpp +++ b/eeschema/lib_symbol.cpp @@ -104,6 +104,7 @@ LIB_SYMBOL::LIB_SYMBOL( const wxString& aName, LIB_SYMBOL* aParent, SYMBOL_LIB* m_pinNameOffset = schIUScale.MilsToIU( DEFAULT_PIN_NAME_OFFSET ); m_options = ENTRY_NORMAL; m_unitsLocked = false; + m_duplicatePinNumbersAreJumpers = false; auto addField = [&]( FIELD_T id, bool visible ) @@ -144,6 +145,9 @@ LIB_SYMBOL::LIB_SYMBOL( const LIB_SYMBOL& aSymbol, SYMBOL_LIB* aLibrary ) : m_libId = aSymbol.m_libId; m_keyWords = aSymbol.m_keyWords; + std::ranges::copy( aSymbol.m_jumperPinGroups, std::back_inserter( m_jumperPinGroups ) ); + m_duplicatePinNumbersAreJumpers = aSymbol.m_duplicatePinNumbersAreJumpers; + aSymbol.CopyUnitDisplayNames( m_unitDisplayNames ); ClearSelected(); @@ -191,6 +195,9 @@ const LIB_SYMBOL& LIB_SYMBOL::operator=( const LIB_SYMBOL& aSymbol ) m_libId = aSymbol.m_libId; m_keyWords = aSymbol.m_keyWords; + std::ranges::copy( aSymbol.m_jumperPinGroups, std::back_inserter( m_jumperPinGroups ) ); + m_duplicatePinNumbersAreJumpers = aSymbol.m_duplicatePinNumbersAreJumpers; + m_unitDisplayNames.clear(); aSymbol.CopyUnitDisplayNames( m_unitDisplayNames ); @@ -1890,3 +1897,15 @@ void LIB_SYMBOL::EmbedFonts() file->type = EMBEDDED_FILES::EMBEDDED_FILE::FILE_TYPE::FONT; } } + + +std::optional> LIB_SYMBOL::GetJumperPinGroup( const wxString& aPinNumber ) const +{ + for( const std::set& group : m_jumperPinGroups ) + { + if( group.contains( aPinNumber ) ) + return group; + } + + return std::nullopt; +} diff --git a/eeschema/lib_symbol.h b/eeschema/lib_symbol.h index 9e749219e4..66388ad32e 100644 --- a/eeschema/lib_symbol.h +++ b/eeschema/lib_symbol.h @@ -567,6 +567,19 @@ public: */ void SetUnitDisplayName( int aUnit, const wxString& aName ); + bool GetDuplicatePinNumbersAreJumpers() const { return m_duplicatePinNumbersAreJumpers; } + void SetDuplicatePinNumbersAreJumpers( bool aEnabled ) { m_duplicatePinNumbersAreJumpers = aEnabled; } + + /** + * Each jumper pin group is a set of pin numbers that should be treated as internally connected. + * @return The list of jumper pin groups in this symbols + */ + std::vector>& JumperPinGroups() { return m_jumperPinGroups; } + const std::vector>& JumperPinGroups() const { return m_jumperPinGroups; } + + /// Retrieves the jumper group containing the specified pin number, if one exists + std::optional> GetJumperPinGroup( const wxString& aPinNumber ) const; + /** * @return true if the symbol has multiple units per symbol. * When true, the reference has a sub reference to identify symbol. @@ -677,6 +690,14 @@ private: wxArrayString m_fpFilters; ///< List of suitable footprint names for the ///< symbol (wild card names accepted). + /// A list of jumper pin groups, each of which is a set of pin numbers that should be jumpered + /// together (treated as internally connected for the purposes of connectivity) + std::vector > m_jumperPinGroups; + + /// Flag that this symbol should automatically treat sets of two or more pins with the same + /// number as jumpered pin groups + bool m_duplicatePinNumbersAreJumpers; + std::map m_unitDisplayNames; }; diff --git a/eeschema/sch_file_versions.h b/eeschema/sch_file_versions.h index bb66e82e4d..56051c22e1 100644 --- a/eeschema/sch_file_versions.h +++ b/eeschema/sch_file_versions.h @@ -53,7 +53,8 @@ //#define SEXPR_SYMBOL_LIB_FILE_VERSION 20240529 // Embedded Files //#define SEXPR_SYMBOL_LIB_FILE_VERSION 20240819 // Embedded Files - Update hash algorithm to Murmur3 //#define SEXPR_SYMBOL_LIB_FILE_VERSION 20241209 // Private flags for SCH_FIELDs -#define SEXPR_SYMBOL_LIB_FILE_VERSION 20250318 // ~ no longer means empty text +//#define SEXPR_SYMBOL_LIB_FILE_VERSION 20250318 // ~ no longer means empty text +#define SEXPR_SYMBOL_LIB_FILE_VERSION 20250324 // Jumper pin groups /** * Schematic file version. diff --git a/eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr_lib_cache.cpp b/eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr_lib_cache.cpp index ed6ae5c25a..c0764e8158 100644 --- a/eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr_lib_cache.cpp +++ b/eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr_lib_cache.cpp @@ -202,6 +202,28 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::SaveSymbol( LIB_SYMBOL* aSymbol, OUTPUTFORMAT KICAD_FORMAT::FormatBool( &aFormatter, "in_bom", !aSymbol->GetExcludedFromBOM() ); KICAD_FORMAT::FormatBool( &aFormatter, "on_board", !aSymbol->GetExcludedFromBoard() ); + KICAD_FORMAT::FormatBool( &aFormatter, "duplicate_pin_numbers_are_jumpers", + aSymbol->GetDuplicatePinNumbersAreJumpers() ); + + const std::vector>& jumperGroups = aSymbol->JumperPinGroups(); + + if( !jumperGroups.empty() ) + { + aFormatter.Print( "(jumper_pin_groups" ); + + for( const std::set& group : jumperGroups ) + { + aFormatter.Print( "(" ); + + for( const wxString& padName : group ) + aFormatter.Print( "%s ", aFormatter.Quotew( padName ).c_str() ); + + aFormatter.Print( ")" ); + } + + aFormatter.Print( ")" ); + } + // TODO: add atomic token here. // TODO: add required token here." diff --git a/eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr_parser.cpp b/eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr_parser.cpp index 5bc9a08ef3..efba49295c 100644 --- a/eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr_parser.cpp +++ b/eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr_parser.cpp @@ -394,6 +394,41 @@ LIB_SYMBOL* SCH_IO_KICAD_SEXPR_PARSER::parseLibSymbol( LIB_SYMBOL_MAP& aSymbolLi NeedRIGHT(); break; + case T_duplicate_pin_numbers_are_jumpers: + symbol->SetDuplicatePinNumbersAreJumpers( parseBool() ); + NeedRIGHT(); + break; + + case T_jumper_pin_groups: + { + // This should only be formatted if there is at least one group + std::vector>& groups = symbol->JumperPinGroups(); + std::set* currentGroup = nullptr; + + for( token = NextTok(); currentGroup || token != T_RIGHT; token = NextTok() ) + { + switch( static_cast( token ) ) + { + case T_LEFT: + currentGroup = &groups.emplace_back(); + break; + + case DSN_STRING: + currentGroup->insert( FromUTF8() ); + break; + + case T_RIGHT: + currentGroup = nullptr; + break; + + default: + Expecting( "list of pin names" ); + } + } + + break; + } + case T_property: parseProperty( symbol ); break; diff --git a/eeschema/schematic.keywords b/eeschema/schematic.keywords index fd194f7b4c..7304ff981e 100644 --- a/eeschema/schematic.keywords +++ b/eeschema/schematic.keywords @@ -38,6 +38,7 @@ directive_label dnp do_not_autoplace dot +duplicate_pin_numbers_are_jumpers edge_clock_high effects embedded_fonts @@ -75,6 +76,7 @@ inverted_clock in_bom iref italic +jumper_pin_groups junction justify kicad_sch diff --git a/qa/data/eeschema/netlists/jumpers/jumpers.kicad_pro b/qa/data/eeschema/netlists/jumpers/jumpers.kicad_pro new file mode 100644 index 0000000000..0b6a110ad4 --- /dev/null +++ b/qa/data/eeschema/netlists/jumpers/jumpers.kicad_pro @@ -0,0 +1,420 @@ +{ + "board": { + "3dviewports": [], + "ipc2581": { + "dist": "", + "distpn": "", + "internal_id": "", + "mfg": "", + "mpn": "" + }, + "layer_pairs": [], + "layer_presets": [], + "viewports": [] + }, + "boards": [], + "component_class_settings": { + "assignments": [], + "meta": { + "version": 0 + }, + "sheet_component_classes": { + "enabled": false + } + }, + "cvpcb": { + "equivalence_files": [] + }, + "erc": { + "erc_exclusions": [], + "meta": { + "version": 0 + }, + "pin_map": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 2 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 2, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2 + ], + [ + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 2, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ] + ], + "rule_severities": { + "bus_definition_conflict": "error", + "bus_entry_needed": "error", + "bus_to_bus_conflict": "error", + "bus_to_net_conflict": "error", + "different_unit_footprint": "error", + "different_unit_net": "error", + "duplicate_reference": "error", + "duplicate_sheet_names": "error", + "endpoint_off_grid": "warning", + "extra_units": "error", + "footprint_filter": "ignore", + "footprint_link_issues": "warning", + "four_way_junction": "ignore", + "global_label_dangling": "warning", + "hier_label_mismatch": "error", + "label_dangling": "error", + "label_multiple_wires": "warning", + "lib_symbol_issues": "warning", + "lib_symbol_mismatch": "warning", + "missing_bidi_pin": "warning", + "missing_input_pin": "warning", + "missing_power_pin": "error", + "missing_unit": "warning", + "multiple_net_names": "warning", + "net_not_bus_member": "warning", + "no_connect_connected": "warning", + "no_connect_dangling": "warning", + "pin_not_connected": "error", + "pin_not_driven": "error", + "pin_to_pin": "warning", + "power_pin_not_driven": "error", + "same_local_global_label": "warning", + "similar_label_and_power": "warning", + "similar_labels": "warning", + "similar_power": "warning", + "simulation_model_issue": "ignore", + "single_global_label": "ignore", + "unannotated": "error", + "unconnected_wire_endpoint": "warning", + "unit_value_mismatch": "error", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [ + "JumperTest" + ] + }, + "meta": { + "filename": "jumpers.kicad_pro", + "version": 3 + }, + "net_settings": { + "classes": [ + { + "bus_width": 12, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "Default", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "priority": 2147483647, + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.2, + "via_diameter": 0.6, + "via_drill": 0.3, + "wire_width": 6 + } + ], + "meta": { + "version": 4 + }, + "net_colors": null, + "netclass_assignments": null, + "netclass_patterns": [] + }, + "pcbnew": { + "last_paths": { + "gencad": "", + "idf": "", + "netlist": "", + "plot": "", + "pos_files": "", + "specctra_dsn": "", + "step": "", + "svg": "", + "vrml": "" + }, + "page_layout_descr_file": "" + }, + "schematic": { + "annotate_start_num": 0, + "bom_export_filename": "${PROJECTNAME}.csv", + "bom_fmt_presets": [], + "bom_fmt_settings": { + "field_delimiter": ",", + "keep_line_breaks": false, + "keep_tabs": false, + "name": "CSV", + "ref_delimiter": ",", + "ref_range_delimiter": "", + "string_delimiter": "\"" + }, + "bom_presets": [], + "bom_settings": { + "exclude_dnp": false, + "fields_ordered": [ + { + "group_by": false, + "label": "Reference", + "name": "Reference", + "show": true + }, + { + "group_by": false, + "label": "Qty", + "name": "${QUANTITY}", + "show": true + }, + { + "group_by": true, + "label": "Value", + "name": "Value", + "show": true + }, + { + "group_by": true, + "label": "DNP", + "name": "${DNP}", + "show": true + }, + { + "group_by": true, + "label": "Exclude from BOM", + "name": "${EXCLUDE_FROM_BOM}", + "show": true + }, + { + "group_by": true, + "label": "Exclude from Board", + "name": "${EXCLUDE_FROM_BOARD}", + "show": true + }, + { + "group_by": true, + "label": "Footprint", + "name": "Footprint", + "show": true + }, + { + "group_by": false, + "label": "Datasheet", + "name": "Datasheet", + "show": true + } + ], + "filter_string": "", + "group_symbols": true, + "include_excluded_from_bom": true, + "name": "Default Editing", + "sort_asc": true, + "sort_field": "Reference" + }, + "connection_grid_size": 50.0, + "drawing": { + "dashed_lines_dash_length_ratio": 12.0, + "dashed_lines_gap_length_ratio": 3.0, + "default_line_thickness": 6.0, + "default_text_size": 50.0, + "field_names": [], + "intersheets_ref_own_page": false, + "intersheets_ref_prefix": "", + "intersheets_ref_short": false, + "intersheets_ref_show": false, + "intersheets_ref_suffix": "", + "junction_size_choice": 3, + "label_size_ratio": 0.375, + "operating_point_overlay_i_precision": 3, + "operating_point_overlay_i_range": "~A", + "operating_point_overlay_v_precision": 3, + "operating_point_overlay_v_range": "~V", + "overbar_offset_ratio": 1.23, + "pin_symbol_size": 25.0, + "text_offset_ratio": 0.15 + }, + "legacy_lib_dir": "", + "legacy_lib_list": [], + "meta": { + "version": 1 + }, + "net_format_name": "KiCad", + "page_layout_descr_file": "", + "plot_directory": "", + "space_save_all_events": true, + "spice_current_sheet_as_root": false, + "spice_external_command": "spice \"%I\"", + "spice_model_current_sheet_as_root": true, + "spice_save_all_currents": false, + "spice_save_all_dissipations": false, + "spice_save_all_voltages": false, + "subpart_first_id": 65, + "subpart_id_separator": 0 + }, + "sheets": [ + [ + "d45396f7-c490-44d7-ac97-22fa41f0bbb4", + "Root" + ] + ], + "text_variables": {} +} diff --git a/qa/data/eeschema/netlists/jumpers/jumpers.kicad_sch b/qa/data/eeschema/netlists/jumpers/jumpers.kicad_sch new file mode 100644 index 0000000000..20214c59e7 --- /dev/null +++ b/qa/data/eeschema/netlists/jumpers/jumpers.kicad_sch @@ -0,0 +1,1585 @@ +(kicad_sch + (version 20250227) + (generator "eeschema") + (generator_version "9.99") + (uuid "d45396f7-c490-44d7-ac97-22fa41f0bbb4") + (paper "A4") + (lib_symbols + (symbol "Device:R" + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "R" + (at 2.032 0 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "R" + (at 0 0 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at -1.778 0 90) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Resistor" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "R res resistor" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_fp_filters" "R_*" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "R_0_1" + (rectangle + (start -1.016 -2.54) + (end 1.016 2.54) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "R_1_1" + (pin passive line + (at 0 3.81 270) + (length 1.27) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -3.81 90) + (length 1.27) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "JumperTest:Matrix" + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (jumper_pin_groups + ("1" "3") + ("2" "4") + ) + (property "Reference" "U" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "" + (at 0 -1.27 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 -1.27 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 -1.27 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 -1.27 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "Matrix_1_1" + (rectangle + (start -2.54 3.81) + (end 2.54 -3.81) + (stroke + (width 0) + (type solid) + ) + (fill + (type background) + ) + ) + (polyline + (pts + (xy -2.54 2.54) (xy 2.54 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 2.54 -2.54) (xy -2.54 -2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (pin input line + (at -5.08 2.54 0) + (length 2.54) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin input line + (at -5.08 -2.54 0) + (length 2.54) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin input line + (at 5.08 2.54 180) + (length 2.54) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "3" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin input line + (at 5.08 -2.54 180) + (length 2.54) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "4" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "JumperTest:TerminalBlock_2Level" + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers yes) + (property "Reference" "TB1" + (at 3.81 0.6351 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "~" + (at 3.81 -1.27 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "TerminalBlock_2Level_1_1" + (rectangle + (start -2.54 6.35) + (end 2.54 -6.35) + (stroke + (width 0) + (type solid) + ) + (fill + (type background) + ) + ) + (pin passive line + (at -1.27 8.89 270) + (length 2.54) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at -1.27 -8.89 90) + (length 2.54) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 1.27 8.89 270) + (length 2.54) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 1.27 -8.89 90) + (length 2.54) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:+2V5" + (power global) + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "#PWR" + (at 0 -3.81 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "+2V5" + (at 0 3.556 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"+2V5\"" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "global power" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "+2V5_0_1" + (polyline + (pts + (xy -0.762 1.27) (xy 0 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 2.54) (xy 0.762 1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 0) (xy 0 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "+2V5_1_1" + (pin power_in line + (at 0 0 90) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:+3.3V" + (power global) + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "#PWR" + (at 0 -3.81 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "+3.3V" + (at 0 3.556 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"+3.3V\"" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "global power" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "+3.3V_0_1" + (polyline + (pts + (xy -0.762 1.27) (xy 0 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 2.54) (xy 0.762 1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 0) (xy 0 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "+3.3V_1_1" + (pin power_in line + (at 0 0 90) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + (symbol "power:GND" + (power global) + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "#PWR" + (at 0 -6.35 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "GND" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "global power" + (at 0 0 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "GND_0_1" + (polyline + (pts + (xy 0 0) (xy 0 -1.27) (xy 1.27 -1.27) (xy 0 -2.54) (xy -1.27 -1.27) (xy 0 -1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "GND_1_1" + (pin power_in line + (at 0 0 270) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + ) + (wire + (pts + (xy 177.8 99.06) (xy 177.8 95.25) + ) + (stroke + (width 0) + (type default) + ) + (uuid "02c85b09-ed02-49c3-bbe8-a636d09784f5") + ) + (wire + (pts + (xy 196.85 86.36) (xy 203.2 86.36) + ) + (stroke + (width 0) + (type default) + ) + (uuid "0813f1c7-2065-4d5d-b9b5-7b193f5004ff") + ) + (wire + (pts + (xy 191.77 95.25) (xy 196.85 95.25) + ) + (stroke + (width 0) + (type default) + ) + (uuid "19adfb69-343f-40bd-98fa-5e5c04fd218c") + ) + (wire + (pts + (xy 196.85 95.25) (xy 196.85 99.06) + ) + (stroke + (width 0) + (type default) + ) + (uuid "21e8f782-babc-428d-a604-8c866e9ffd22") + ) + (wire + (pts + (xy 203.2 86.36) (xy 203.2 88.9) + ) + (stroke + (width 0) + (type default) + ) + (uuid "29243d84-4ae7-4665-ac1e-77669d996fd2") + ) + (wire + (pts + (xy 203.2 99.06) (xy 203.2 96.52) + ) + (stroke + (width 0) + (type default) + ) + (uuid "3c7e8b3c-3f5a-49b7-a30f-4f2d1f409c6d") + ) + (wire + (pts + (xy 139.7 105.41) (xy 139.7 101.6) + ) + (stroke + (width 0) + (type default) + ) + (uuid "473de47d-07af-4f28-8906-9ca1e1ef205b") + ) + (wire + (pts + (xy 137.16 111.76) (xy 134.62 111.76) + ) + (stroke + (width 0) + (type default) + ) + (uuid "5d13f066-9356-45e0-8a7c-a692102a0cda") + ) + (wire + (pts + (xy 181.61 90.17) (xy 177.8 90.17) + ) + (stroke + (width 0) + (type default) + ) + (uuid "5d268d96-c6cd-4e1a-972e-36b99470d952") + ) + (wire + (pts + (xy 196.85 90.17) (xy 196.85 86.36) + ) + (stroke + (width 0) + (type default) + ) + (uuid "6d1c1a1f-2c71-4b74-bc1e-e71adb7fd908") + ) + (wire + (pts + (xy 147.32 111.76) (xy 147.32 105.41) + ) + (stroke + (width 0) + (type default) + ) + (uuid "739bef06-4609-4d52-bfe7-74a3fc1617b9") + ) + (wire + (pts + (xy 177.8 90.17) (xy 177.8 83.82) + ) + (stroke + (width 0) + (type default) + ) + (uuid "8ada4e41-fb71-4cea-b33c-69de5a68fc1d") + ) + (wire + (pts + (xy 142.24 80.01) (xy 142.24 83.82) + ) + (stroke + (width 0) + (type default) + ) + (uuid "95842637-3e83-4738-ab0a-531d6ad0ba8e") + ) + (wire + (pts + (xy 153.67 80.01) (xy 153.67 87.63) + ) + (stroke + (width 0) + (type default) + ) + (uuid "9fcacc3f-d193-4acf-b0c9-7679883b0761") + ) + (wire + (pts + (xy 139.7 78.74) (xy 139.7 83.82) + ) + (stroke + (width 0) + (type default) + ) + (uuid "a54f9e42-cd3a-4fdb-a930-9daf0004012c") + ) + (wire + (pts + (xy 144.78 111.76) (xy 147.32 111.76) + ) + (stroke + (width 0) + (type default) + ) + (uuid "ae97069c-966d-483c-814a-bf674c233b8d") + ) + (wire + (pts + (xy 196.85 99.06) (xy 203.2 99.06) + ) + (stroke + (width 0) + (type default) + ) + (uuid "b019fb8b-188b-414e-8db0-4a5ececa2c61") + ) + (wire + (pts + (xy 134.62 111.76) (xy 134.62 105.41) + ) + (stroke + (width 0) + (type default) + ) + (uuid "b084a4fc-f1dd-45ad-850b-05d3c4803966") + ) + (wire + (pts + (xy 153.67 80.01) (xy 142.24 80.01) + ) + (stroke + (width 0) + (type default) + ) + (uuid "c1d940f4-8417-435a-8fb3-323265351a89") + ) + (wire + (pts + (xy 142.24 105.41) (xy 142.24 101.6) + ) + (stroke + (width 0) + (type default) + ) + (uuid "c4f4e322-346b-4e24-800b-6e737982ede2") + ) + (wire + (pts + (xy 177.8 95.25) (xy 181.61 95.25) + ) + (stroke + (width 0) + (type default) + ) + (uuid "c504cd64-079a-4607-a9af-f40d670b409e") + ) + (wire + (pts + (xy 134.62 105.41) (xy 139.7 105.41) + ) + (stroke + (width 0) + (type default) + ) + (uuid "c8965e6f-296b-4188-a247-47cba3c30997") + ) + (wire + (pts + (xy 191.77 90.17) (xy 196.85 90.17) + ) + (stroke + (width 0) + (type default) + ) + (uuid "dd2e3422-372d-4026-ad70-5a65caab948e") + ) + (wire + (pts + (xy 147.32 105.41) (xy 142.24 105.41) + ) + (stroke + (width 0) + (type default) + ) + (uuid "ed35b845-ee80-47f4-b541-c935e5901e92") + ) + (symbol + (lib_id "JumperTest:TerminalBlock_2Level") + (at 140.97 92.71 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "0aa9b267-04ec-4615-b424-0bb2ed02b625") + (property "Reference" "TB1" + (at 144.78 92.0749 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "~" + (at 144.78 93.98 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 140.97 92.71 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 140.97 92.71 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 140.97 92.71 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "6f393b0c-3f91-442b-8d26-1d2740d8796f") + ) + (pin "2" + (uuid "78674d7c-a899-462b-90b8-9c216cc0e014") + ) + (pin "2" + (uuid "5b2387fc-2b68-4ebf-bf18-6806feed87de") + ) + (pin "1" + (uuid "56f865c3-7392-4caf-9bbc-96b13911800f") + ) + (instances + (project "" + (path "/d45396f7-c490-44d7-ac97-22fa41f0bbb4" + (reference "TB1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:GND") + (at 153.67 87.63 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "0d60e9bf-aedc-4f2b-abcb-bd8bbe97378e") + (property "Reference" "#PWR02" + (at 153.67 93.98 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "GND" + (at 153.67 92.71 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 153.67 87.63 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 153.67 87.63 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 153.67 87.63 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "9edf9dd7-f9c4-4803-855f-64b819c6ed55") + ) + (instances + (project "" + (path "/d45396f7-c490-44d7-ac97-22fa41f0bbb4" + (reference "#PWR02") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:GND") + (at 177.8 99.06 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "4058f5ff-332a-4eee-b131-ef71f22362dc") + (property "Reference" "#PWR04" + (at 177.8 105.41 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "GND" + (at 177.8 104.14 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 177.8 99.06 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 177.8 99.06 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 177.8 99.06 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "35935bb8-bb21-461c-828d-8f6c6948df4a") + ) + (instances + (project "jumpertest" + (path "/d45396f7-c490-44d7-ac97-22fa41f0bbb4" + (reference "#PWR04") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 140.97 111.76 90) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "4c671539-9120-429d-9b52-8f805a6b0fad") + (property "Reference" "R1" + (at 140.97 115.57 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "22" + (at 140.97 118.11 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 140.97 113.538 90) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 140.97 111.76 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Resistor" + (at 140.97 111.76 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "82551fcb-5244-4579-ad31-8263f113f41d") + ) + (pin "2" + (uuid "5271fd51-dee4-4be2-9e9c-ea6ae33b6370") + ) + (instances + (project "" + (path "/d45396f7-c490-44d7-ac97-22fa41f0bbb4" + (reference "R1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "JumperTest:Matrix") + (at 186.69 92.71 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (uuid "4d14d800-569a-495d-bb5a-a9e55a14d7c8") + (property "Reference" "U1" + (at 186.69 87.376 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "~" + (at 186.69 87.63 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 186.69 93.98 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 186.69 93.98 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 186.69 93.98 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "3" + (uuid "91f17d12-0262-40de-af74-1d0e62c57ed6") + ) + (pin "2" + (uuid "6a74ca84-328d-4385-b3ef-5ba43ca421c3") + ) + (pin "4" + (uuid "df17454b-51ab-4b1c-abc8-33f197235365") + ) + (pin "1" + (uuid "345bb306-7da7-431a-8d0e-07469550d8e7") + ) + (instances + (project "" + (path "/d45396f7-c490-44d7-ac97-22fa41f0bbb4" + (reference "U1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:+2V5") + (at 139.7 78.74 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "53414e3e-cb6c-4317-b0e8-679c4c2250a4") + (property "Reference" "#PWR01" + (at 139.7 82.55 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "+2V5" + (at 139.7 73.66 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 139.7 78.74 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 139.7 78.74 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"+2V5\"" + (at 139.7 78.74 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "cd61e087-1609-4677-b45e-7cbfed4a45ab") + ) + (instances + (project "" + (path "/d45396f7-c490-44d7-ac97-22fa41f0bbb4" + (reference "#PWR01") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:+3.3V") + (at 177.8 83.82 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "5735eda6-46cc-40e0-a195-786b0fd0a66f") + (property "Reference" "#PWR03" + (at 177.8 87.63 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "+3.3V" + (at 177.8 78.74 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 177.8 83.82 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 177.8 83.82 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Power symbol creates a global label with name \"+3.3V\"" + (at 177.8 83.82 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "72ce5a6c-dc4f-4e6a-9f2c-103d6d3e092b") + ) + (instances + (project "" + (path "/d45396f7-c490-44d7-ac97-22fa41f0bbb4" + (reference "#PWR03") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 203.2 92.71 180) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "a5325dfa-f0ed-4395-9ec3-24765fab7875") + (property "Reference" "R2" + (at 205.74 91.4399 0) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + ) + ) + (property "Value" "22" + (at 205.74 93.9799 0) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + ) + ) + (property "Footprint" "" + (at 204.978 92.71 90) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "~" + (at 203.2 92.71 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Resistor" + (at 203.2 92.71 0) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (pin "1" + (uuid "6859747b-866b-4cc2-b7bd-ace990440220") + ) + (pin "2" + (uuid "27bad8cd-5a43-4313-9dcc-f08ec88ca027") + ) + (instances + (project "jumpertest" + (path "/d45396f7-c490-44d7-ac97-22fa41f0bbb4" + (reference "R2") + (unit 1) + ) + ) + ) + ) + (sheet_instances + (path "/" + (page "1") + ) + ) + (embedded_fonts no) +) diff --git a/qa/data/eeschema/netlists/jumpers/jumpers.net b/qa/data/eeschema/netlists/jumpers/jumpers.net new file mode 100644 index 0000000000..684af3612d --- /dev/null +++ b/qa/data/eeschema/netlists/jumpers/jumpers.net @@ -0,0 +1,128 @@ +(export (version "E") + (design + (source "/Users/jon/src/kicad/qa/data/eeschema/netlists/jumpers/jumpers.kicad_sch") + (date "2025-03-21T17:31:14-0400") + (tool "Eeschema 9.99.0-580-g4821313d25") + (sheet (number "1") (name "/") (tstamps "/") + (title_block + (title) + (company) + (rev) + (date) + (source "jumpers.kicad_sch") + (comment (number "1") (value "")) + (comment (number "2") (value "")) + (comment (number "3") (value "")) + (comment (number "4") (value "")) + (comment (number "5") (value "")) + (comment (number "6") (value "")) + (comment (number "7") (value "")) + (comment (number "8") (value "")) + (comment (number "9") (value ""))))) + (components + (comp (ref "R1") + (value "22") + (description "Resistor") + (fields + (field (name "Footprint")) + (field (name "Datasheet")) + (field (name "Description") "Resistor")) + (libsource (lib "Device") (part "R") (description "Resistor")) + (property (name "Sheetname") (value "Root")) + (property (name "Sheetfile") (value "jumpers.kicad_sch")) + (property (name "ki_keywords") (value "R res resistor")) + (property (name "ki_fp_filters") (value "R_*")) + (sheetpath (names "/") (tstamps "/")) + (tstamps "4c671539-9120-429d-9b52-8f805a6b0fad")) + (comp (ref "R2") + (value "22") + (description "Resistor") + (fields + (field (name "Footprint")) + (field (name "Datasheet")) + (field (name "Description") "Resistor")) + (libsource (lib "Device") (part "R") (description "Resistor")) + (property (name "Sheetname") (value "Root")) + (property (name "Sheetfile") (value "jumpers.kicad_sch")) + (property (name "ki_keywords") (value "R res resistor")) + (property (name "ki_fp_filters") (value "R_*")) + (sheetpath (names "/") (tstamps "/")) + (tstamps "a5325dfa-f0ed-4395-9ec3-24765fab7875")) + (comp (ref "TB1") + (value "~") + (fields + (field (name "Footprint")) + (field (name "Datasheet")) + (field (name "Description"))) + (libsource (lib "JumperTest") (part "TerminalBlock_2Level") (description "")) + (property (name "Sheetname") (value "Root")) + (property (name "Sheetfile") (value "jumpers.kicad_sch")) + (sheetpath (names "/") (tstamps "/")) + (tstamps "0aa9b267-04ec-4615-b424-0bb2ed02b625")) + (comp (ref "U1") + (value "~") + (fields + (field (name "Footprint")) + (field (name "Datasheet")) + (field (name "Description"))) + (libsource (lib "JumperTest") (part "Matrix") (description "")) + (property (name "Sheetname") (value "Root")) + (property (name "Sheetfile") (value "jumpers.kicad_sch")) + (sheetpath (names "/") (tstamps "/")) + (tstamps "4d14d800-569a-495d-bb5a-a9e55a14d7c8"))) + (libparts + (libpart (lib "Device") (part "R") + (description "Resistor") + (docs "~") + (footprints + (fp "R_*")) + (fields + (field (name "Reference") "R") + (field (name "Value") "R") + (field (name "Footprint")) + (field (name "Datasheet") "~") + (field (name "Description") "Resistor")) + (pins + (pin (num "1") (name "") (type "passive")) + (pin (num "2") (name "") (type "passive")))) + (libpart (lib "JumperTest") (part "Matrix") + (fields + (field (name "Reference") "U") + (field (name "Value")) + (field (name "Footprint")) + (field (name "Datasheet")) + (field (name "Description"))) + (pins + (pin (num "1") (name "") (type "input")) + (pin (num "2") (name "") (type "input")) + (pin (num "3") (name "") (type "input")) + (pin (num "4") (name "") (type "input")))) + (libpart (lib "JumperTest") (part "TerminalBlock_2Level") + (fields + (field (name "Reference") "TB1") + (field (name "Value") "~") + (field (name "Footprint")) + (field (name "Datasheet")) + (field (name "Description"))) + (pins + (pin (num "1") (name "") (type "passive")) + (pin (num "2") (name "") (type "passive"))))) + (libraries + (library (logical "Device") + (uri "/Applications/KiCad/KiCad.app/Contents/SharedSupport/symbols/Device.kicad_sym")) + (library (logical "JumperTest") + (uri "/Users/jon/Nextcloud/kicad/libraries/JumperTest.kicad_sym"))) + (nets + (net (code "1") (name "+2V5") (class "Default") + (node (ref "R1") (pin "1") (pintype "passive")) + (node (ref "TB1") (pin "1") (pintype "passive"))) + (net (code "2") (name "+3.3V") (class "Default") + (node (ref "R2") (pin "2") (pintype "passive")) + (node (ref "U1") (pin "1") (pintype "input")) + (node (ref "U1") (pin "3") (pintype "input"))) + (net (code "3") (name "GND") (class "Default") + (node (ref "R1") (pin "2") (pintype "passive")) + (node (ref "R2") (pin "1") (pintype "passive")) + (node (ref "TB1") (pin "2") (pintype "passive")) + (node (ref "U1") (pin "2") (pintype "input")) + (node (ref "U1") (pin "4") (pintype "input"))))) \ No newline at end of file diff --git a/qa/tests/eeschema/test_netlist_exporter_kicad.cpp b/qa/tests/eeschema/test_netlist_exporter_kicad.cpp index fc4ab8d394..ab5364d64a 100644 --- a/qa/tests/eeschema/test_netlist_exporter_kicad.cpp +++ b/qa/tests/eeschema/test_netlist_exporter_kicad.cpp @@ -219,4 +219,10 @@ BOOST_AUTO_TEST_CASE( ComponentClasses ) } +BOOST_AUTO_TEST_CASE( Jumpers ) +{ + TestNetlist( "jumpers" ); +} + + BOOST_AUTO_TEST_SUITE_END()