diff --git a/3d-viewer/3d_draw_basic_functions.cpp b/3d-viewer/3d_draw_basic_functions.cpp index 854866213f..635d3c66e1 100644 --- a/3d-viewer/3d_draw_basic_functions.cpp +++ b/3d-viewer/3d_draw_basic_functions.cpp @@ -217,7 +217,7 @@ void Draw3D_SolidHorizontalPolyPolygons( const std::vector& aPolysList, /* draw the solid polygon found in aPolysList - * The first polygonj is the main polygon, others are holes + * The first polygon is the main polygon, others are holes * See Draw3D_SolidHorizontalPolyPolygons for more info */ void Draw3D_SolidHorizontalPolygonWithHoles( const std::vector& aPolysList, diff --git a/3d-viewer/modelparsers.h b/3d-viewer/modelparsers.h index 7153c21ba2..147a0fda16 100644 --- a/3d-viewer/modelparsers.h +++ b/3d-viewer/modelparsers.h @@ -112,7 +112,8 @@ public: * Function GetNodeProperties * Collects all node properties to map. * - * @param aProps contains map of found properties + * @param aNode is an XML node. + * @param aProps contains map of found properties. */ static void GetNodeProperties( wxXmlNode* aNode, PROPERTY_MAP& aProps ); diff --git a/TODO.txt b/TODO.txt index 2dce8bed09..7a7a30ec34 100644 --- a/TODO.txt +++ b/TODO.txt @@ -10,7 +10,7 @@ WXMAC Platform Common ------ * Grep for @TODO or TODO for sourcecode tasks -* Use doxygen compatible comments on member functions (.h files) +* Use Doxygen compatible comments on member functions (.h files) * Add tooltip text to all non-obvious controls in every dialog window. Use wxFormBuilder. * Component and module search displays in which library the @@ -113,9 +113,9 @@ const wxString FP_LIB_TABLE::ExpandSubtitutions( const wxString aString ) -EESchema +Eeschema -------- -* Drag and drop between two EESchema windows. +* Drag and drop between two Eeschema windows. Wayne: E3) Hook up perform last library search hot key to replace search libraries for @@ -159,5 +159,6 @@ PCBNew of PLUGIN::Footprint*() functions. At least LEGACY and KICAD are both needed concurrently. - +*) Add a hot key to toggle the 45 degree constraint on and off so that it can be + changed when drawing a trace. diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index b40f33a1ff..26880e0c56 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -93,6 +93,7 @@ set(COMMON_SRCS newstroke_font.cpp projet_config.cpp ptree.cpp + reporter.cpp richio.cpp selcolor.cpp string.cpp @@ -145,6 +146,9 @@ set(PCB_COMMON_SRCS ../pcbnew/class_zone_settings.cpp ../pcbnew/classpcb.cpp ../pcbnew/collectors.cpp + ../pcbnew/netlist_reader_common.cpp + ../pcbnew/netlist_reader_firstformat.cpp + ../pcbnew/netlist_reader_kicad.cpp ../pcbnew/sel_layer.cpp ../pcbnew/pcb_plot_params.cpp ../pcbnew/io_mgr.cpp diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp index 20aca80eb9..dc1f93da08 100644 --- a/common/dialogs/dialog_page_settings.cpp +++ b/common/dialogs/dialog_page_settings.cpp @@ -51,7 +51,7 @@ // the translated and the not translated version. // when displayed in dialog we should explicitely call wxGetTranslation() // to show the translated version. -const wxString pageFmts[] = +static const wxString pageFmts[] = { _("A4 210x297mm"), _("A3 297x420mm"), @@ -63,11 +63,10 @@ const wxString pageFmts[] = _("C 17x22in"), _("D 22x34in"), _("E 34x44in"), - _("US Letter 8.5x11in"), - _("US Legal 8.5x14in"), - _("US Ledger 11x17in"), + _("USLetter 8.5x11in"), // USLetter without space is correct + _("USLegal 8.5x14in"), // USLegal without space is correct + _("USLedger 11x17in"), // USLedger without space is correct _("User (Custom)"), - wxT("") // end of list }; void EDA_DRAW_FRAME::Process_PageSettings( wxCommandEvent& event ) @@ -115,11 +114,8 @@ void DIALOG_PAGES_SETTINGS::initDialog() // The first shows translated strings, the second contains not translated strings m_paperSizeComboBox->Clear(); - for( unsigned ii = 0; ; ii++ ) + for( unsigned ii = 0; iiAppend( wxGetTranslation( pageFmts[ii] ) ); } diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 52a4e42057..f3b8263f33 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -495,11 +495,6 @@ void EDA_DRAW_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg ) } -void EDA_DRAW_FRAME::OnGrid( int grid_type ) -{ -} - - wxPoint EDA_DRAW_FRAME::GetGridPosition( const wxPoint& aPosition ) const { wxPoint pos = aPosition; diff --git a/common/drawtxt.cpp b/common/drawtxt.cpp index a6aa906537..26f4f5bbf7 100644 --- a/common/drawtxt.cpp +++ b/common/drawtxt.cpp @@ -54,11 +54,9 @@ double s_HersheyScaleFactor = HERSHEY_SCALE_FACTOR; -/* Helper function for texts with over bar - */ -int OverbarPositionY( int size_v, int thickness ) +int OverbarPositionY( int size_v ) { - return KiROUND( ( (double) size_v * 1.1 ) + ( (double) thickness * 1.5 ) ); + return KiROUND( size_v * 1.22 ); } @@ -155,7 +153,7 @@ static const char* GetHersheyShapeDescription( int AsciiCode ) AsciiCode = '?'; if( AsciiCode < 32 ) - AsciiCode = 32; /* Clamp control chars */ + AsciiCode = 32; // Clamp control chars AsciiCode -= 32; @@ -391,9 +389,9 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel, /* if a text size is too small, the text cannot be drawn, and it is drawn as a single * graphic line */ - if( std::abs( aSize.x ) < 3 ) + if( aDC && ( aDC->LogicalToDeviceYRel( std::abs( aSize.y ) ) < MIN_DRAWABLE_TEXT_SIZE )) { - /* draw the text as a line always vertically centered */ + // draw the text as a line always vertically centered wxPoint end( current_char_pos.x + dx, current_char_pos.y ); RotatePoint( ¤t_char_pos, aPos, aOrient ); @@ -417,7 +415,7 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel, if( aItalic ) { - overbar_italic_comp = OverbarPositionY( size_v, aWidth ) / 8; + overbar_italic_comp = OverbarPositionY( size_v ) / 8; if( italic_reverse ) { @@ -450,7 +448,7 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel, // Starting the overbar overbar_pos = current_char_pos; overbar_pos.x += overbar_italic_comp; - overbar_pos.y -= OverbarPositionY( size_v, aWidth ); + overbar_pos.y -= OverbarPositionY( size_v ); RotatePoint( &overbar_pos, aPos, aOrient ); } else @@ -459,7 +457,7 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel, coord[0] = overbar_pos; overbar_pos = current_char_pos; overbar_pos.x += overbar_italic_comp; - overbar_pos.y -= OverbarPositionY( size_v, aWidth ); + overbar_pos.y -= OverbarPositionY( size_v ); RotatePoint( &overbar_pos, aPos, aOrient ); coord[1] = overbar_pos; // Plot the overbar segment @@ -520,7 +518,7 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel, else { wxPoint currpoint; - hc1 -= xsta; hc2 -= 11; // Align the midpoint + hc1 -= xsta; hc2 -= 10; // Align the midpoint hc1 = KiROUND( hc1 * size_h * s_HersheyScaleFactor ); hc2 = KiROUND( hc2 * size_v * s_HersheyScaleFactor ); @@ -551,7 +549,7 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel, // Close the last overbar coord[0] = overbar_pos; overbar_pos = current_char_pos; - overbar_pos.y -= OverbarPositionY( size_v, aWidth ); + overbar_pos.y -= OverbarPositionY( size_v ); RotatePoint( &overbar_pos, aPos, aOrient ); coord[1] = overbar_pos; @@ -585,12 +583,12 @@ void DrawGraphicHaloText( EDA_DRAW_PANEL * aPanel, aColor2 = c; } - DrawGraphicText( aPanel, aDC, aPos, aColor1, aText, aOrient, aSize, - aH_justify, aV_justify, aWidth, aItalic, aBold, + DrawGraphicText( aPanel, aDC, aPos, aColor1, aText, aOrient, aSize, + aH_justify, aV_justify, aWidth, aItalic, aBold, aCallback, aPlotter ); - - DrawGraphicText( aPanel, aDC, aPos, aColor2, aText, aOrient, aSize, - aH_justify, aV_justify, aWidth / 4, aItalic, aBold, + + DrawGraphicText( aPanel, aDC, aPos, aColor2, aText, aOrient, aSize, + aH_justify, aV_justify, aWidth / 4, aItalic, aBold, aCallback, aPlotter ); } diff --git a/common/fpid.cpp b/common/fpid.cpp index 48433985cd..984604d3cc 100644 --- a/common/fpid.cpp +++ b/common/fpid.cpp @@ -310,6 +310,26 @@ std::string FPID::Format( const std::string& aLogicalLib, const std::string& aFo } +int FPID::compare( const FPID& aFPID ) const +{ + // Don't bother comparing the same object. + if( this == &aFPID ) + return 0; + + int retv = nickname.compare( aFPID.nickname ); + + if( retv != 0 ) + return retv; + + retv = footprint.compare( aFPID.footprint ); + + if( retv != 0 ) + return retv; + + return revision.compare( aFPID.revision ); +} + + #if 0 && defined(DEBUG) // build this with Debug CMAKE_BUILD_TYPE diff --git a/common/hotkeys_basic.cpp b/common/hotkeys_basic.cpp index 46cea5969e..dc5c9ffba8 100644 --- a/common/hotkeys_basic.cpp +++ b/common/hotkeys_basic.cpp @@ -563,7 +563,7 @@ int EDA_BASE_FRAME::ReadHotkeyConfigFile( const wxString& aFilename, ParseHotkeyConfig( data, aDescList ); /* cleanup */ - delete buffer; + delete[] buffer; cfgfile.Close(); return 1; } diff --git a/common/reporter.cpp b/common/reporter.cpp new file mode 100644 index 0000000000..8402d0c2b8 --- /dev/null +++ b/common/reporter.cpp @@ -0,0 +1,46 @@ +/** + * @file reporter.h + */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 Wayne Stambaugh + * Copyright (C) 1992-2013 KiCad Developers, see change_log.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + + +REPORTER& REPORTER::Report( const char *aText ) +{ + Report( FROM_UTF8( aText ) ); + return *this; +} + + +REPORTER& WX_TEXT_CTRL_REPORTER::Report( const wxString& aText ) +{ + wxCHECK_MSG( m_textCtrl != NULL, *this, + wxT( "No wxTextCtrl object defined in WX_TEXT_CTRL_REPORTER." ) ); + + m_textCtrl->AppendText( aText ); + return *this; +} diff --git a/common/wildcards_and_files_ext.cpp b/common/wildcards_and_files_ext.cpp index 2a09e046fb..9149ae229c 100644 --- a/common/wildcards_and_files_ext.cpp +++ b/common/wildcards_and_files_ext.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 20012 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2012 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2008-2012 Wayne Stambaugh * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * @@ -96,3 +96,4 @@ const wxString PSFileWildcard( _( "PostScript files (.ps)|*.ps" ) ); const wxString ReportFileWildcard = _( "Report files (*.rpt)|*.rpt" ); const wxString FootprintPlaceFileWildcard = _( "Footprint place files (*.pos)|*.pos" ); const wxString Shapes3DFileWildcard( _( "Vrml and x3d files (*.wrl *.x3d)|*.wrl;*.x3d" ) ); +const wxString TextWildcard( _( "Text files (*.txt)|*.txt" ) ); diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 2851747337..96f260acac 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -27,9 +27,6 @@ set(CVPCB_DIALOGS set(CVPCB_SRCS ../common/base_units.cpp - ../pcbnew/netlist_reader_common.cpp - ../pcbnew/netlist_reader_kicad.cpp - ../pcbnew/netlist_reader_firstformat.cpp ../pcbnew/class_drc_item.cpp autosel.cpp cfg.cpp diff --git a/cvpcb/autosel.cpp b/cvpcb/autosel.cpp index fd9fc906c4..0e96048b06 100644 --- a/cvpcb/autosel.cpp +++ b/cvpcb/autosel.cpp @@ -1,3 +1,26 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + /** * @file autosel.cpp */ @@ -39,10 +62,16 @@ typedef boost::ptr_vector< FOOTPRINT_ALIAS > FOOTPRINT_ALIAS_LIST; wxString GetQuotedText( wxString & text ) { int i = text.Find( QUOTE ); - if( wxNOT_FOUND == i ) return wxT( "" ); + + if( wxNOT_FOUND == i ) + return wxT( "" ); + wxString shrt = text.Mid( i + 1 ); i = shrt.Find( QUOTE ); - if( wxNOT_FOUND == i ) return wxT( "" ); + + if( wxNOT_FOUND == i ) + return wxT( "" ); + text = shrt.Mid( i + 1 ); return shrt.Mid( 0, i ); } @@ -52,13 +81,14 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) { FOOTPRINT_ALIAS_LIST aliases; FOOTPRINT_ALIAS* alias; + COMPONENT* component; wxFileName fn; wxString msg, tmp; char Line[1024]; FILE* file; size_t ii; - if( m_components.empty() ) + if( m_netlist.IsEmpty() ) return; /* Find equivalents in all available files. */ @@ -79,8 +109,8 @@ void CVPCB_MAINFRAME::AssocieModule( wxCommandEvent& event ) if( !tmp ) { - msg.Printf( _( "Footprint alias library file <%s> could not be \ -found in the default search paths." ), + msg.Printf( _( "Footprint alias library file <%s> could not be found in the " + "default search paths." ), GetChars( fn.GetFullName() ) ); wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR ); continue; @@ -127,18 +157,21 @@ found in the default search paths." ), m_skipComponentSelect = true; ii = 0; - BOOST_FOREACH( COMPONENT_INFO& component, m_components ) + + for( unsigned kk = 0; kk < m_netlist.GetCount(); kk++ ) { + component = m_netlist.GetComponent( kk ); + bool found = false; m_ListCmp->SetSelection( ii++, true ); - if( !component.m_Footprint.IsEmpty() ) + if( !component->GetFootprintLibName().IsEmpty() ) continue; BOOST_FOREACH( FOOTPRINT_ALIAS& alias, aliases ) { - if( alias.m_Name.CmpNoCase( component.m_Value ) != 0 ) + if( alias.m_Name.CmpNoCase( component->GetValue() ) != 0 ) continue; /* filter alias so one can use multiple aliases (for polar and nonpolar caps for @@ -147,23 +180,23 @@ found in the default search paths." ), if( module ) { - size_t filtercount = component.m_FootprintFilter.GetCount(); + size_t filtercount = component->GetFootprintFilters().GetCount(); found = ( 0 == filtercount ); // if no entries, do not filter for( size_t jj = 0; jj < filtercount && !found; jj++ ) { - found = module->m_Module.Matches( component.m_FootprintFilter[jj] ); + found = module->m_Module.Matches( component->GetFootprintFilters()[jj] ); } } else { - msg.Printf( _( "Component %s: footprint %s not found in \ -any of the project footprint libraries." ), - GetChars( component.m_Reference ), + msg.Printf( _( "Component %s: footprint %s not found in any of the project " + "footprint libraries." ), + GetChars( component->GetReference() ), GetChars( alias.m_FootprintName ) ); - wxMessageBox( msg, _( "CvPcb Error" ), wxOK | wxICON_ERROR, - this ); + wxMessageBox( msg, _( "CvPcb Error" ), wxOK | wxICON_ERROR, this ); } + if( found ) { SetNewPkg( alias.m_FootprintName ); @@ -171,15 +204,20 @@ any of the project footprint libraries." ), } } + /* obviously the last chance: there's only one filter matching one footprint */ - if( !found && 1 == component.m_FootprintFilter.GetCount() ) { + if( !found && 1 == component->GetFootprintFilters().GetCount() ) + { /* we do not need to analyse wildcards: single footprint do not contain them */ /* and if there are wildcards it just will not match any */ - FOOTPRINT_INFO *module = m_footprints.GetModuleInfo( component.m_FootprintFilter[0] ); - if( module ) { - SetNewPkg( component.m_FootprintFilter[0] ); + FOOTPRINT_INFO *module = m_footprints.GetModuleInfo( component->GetFootprintFilters()[0] ); + + if( module ) + { + SetNewPkg( component->GetFootprintFilters()[0] ); } } } + m_skipComponentSelect = false; } diff --git a/cvpcb/class_footprints_listbox.cpp b/cvpcb/class_footprints_listbox.cpp index 605ed6f944..38421a34f7 100644 --- a/cvpcb/class_footprints_listbox.cpp +++ b/cvpcb/class_footprints_listbox.cpp @@ -1,6 +1,30 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + /** * @file class_footprints_listbox.cpp - * class to display the list fo available footprints + * class to display the list of available footprints */ #include @@ -119,7 +143,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFullList( FOOTPRINT_LIST& list ) for( unsigned ii = 0; ii < list.GetCount(); ii++ ) { FOOTPRINT_INFO & footprint = list.GetItem(ii); - msg.Printf( wxT( "%3d %s" ), (int) m_FullFootprintList.GetCount() + 1, + msg.Printf( wxT( "%3zu %s" ), m_FullFootprintList.GetCount() + 1, GetChars(footprint.m_Module) ); m_FullFootprintList.Add( msg ); } @@ -132,7 +156,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFullList( FOOTPRINT_LIST& list ) } -void FOOTPRINTS_LISTBOX::SetFootprintFilteredList( COMPONENT_INFO* Component, +void FOOTPRINTS_LISTBOX::SetFootprintFilteredList( COMPONENT* aComponent, FOOTPRINT_LIST& list ) { wxString msg; @@ -149,13 +173,16 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredList( COMPONENT_INFO* Component, // The search is case insensitive wxString module = footprint.m_Module.Upper(); wxString candidate; - for( jj = 0; jj < Component->m_FootprintFilter.GetCount(); jj++ ) + + for( jj = 0; jj < aComponent->GetFootprintFilters().GetCount(); jj++ ) { - candidate = Component->m_FootprintFilter[jj].Upper(); + candidate = aComponent->GetFootprintFilters()[jj].Upper(); + if( !module.Matches( candidate ) ) continue; - msg.Printf( wxT( "%3d %s" ), m_FilteredFootprintList.GetCount() + 1, - footprint.m_Module.GetData() ); + + msg.Printf( wxT( "%3zu %s" ), m_FilteredFootprintList.GetCount() + 1, + footprint.m_Module.GetData() ); m_FilteredFootprintList.Add( msg ); hasItem = true; } @@ -172,8 +199,10 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredList( COMPONENT_INFO* Component, Refresh(); } -void FOOTPRINTS_LISTBOX::SetFootprintFilteredByPinCount( COMPONENT_INFO* Component, - FOOTPRINT_LIST& list ) { + +void FOOTPRINTS_LISTBOX::SetFootprintFilteredByPinCount( COMPONENT* aComponent, + FOOTPRINT_LIST& list ) +{ wxString msg; int oldSelection = GetSelection(); bool hasItem = false; @@ -184,10 +213,10 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredByPinCount( COMPONENT_INFO* Compone { FOOTPRINT_INFO& footprint = list.GetItem(ii); - if( Component->m_pinCount == footprint.m_padCount ) + if( aComponent->GetNetCount() == footprint.m_padCount ) { - msg.Printf( wxT( "%3d %s" ), m_FilteredFootprintList.GetCount() + 1, - footprint.m_Module.GetData() ); + msg.Printf( wxT( "%3zu %s" ), m_FilteredFootprintList.GetCount() + 1, + footprint.m_Module.GetData() ); m_FilteredFootprintList.Add( msg ); hasItem = true; } @@ -204,13 +233,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFilteredByPinCount( COMPONENT_INFO* Compone Refresh(); } -/** Set the footprint list. We can have 2 footprint list: - * The full footprint list - * The filtered footprint list (if the current selected component has a - * filter for footprints) - * @param FullList true = full footprint list, false = filtered footprint list - * @param Redraw = true to redraw the window - */ + void FOOTPRINTS_LISTBOX::SetActiveFootprintList( bool FullList, bool Redraw ) { bool old_selection = m_UseFootprintFullList; @@ -226,10 +249,12 @@ void FOOTPRINTS_LISTBOX::SetActiveFootprintList( bool FullList, bool Redraw ) if( m_ActiveFootprintList ) { bool new_selection; + if( FullList ) new_selection = true; else new_selection = false; + if( new_selection != old_selection ) SetSelection( 0, true ); } @@ -264,14 +289,12 @@ void FOOTPRINTS_LISTBOX::SetActiveFootprintList( bool FullList, bool Redraw ) /**************************************/ BEGIN_EVENT_TABLE( FOOTPRINTS_LISTBOX, ITEMS_LISTBOX_BASE ) -EVT_SIZE( ITEMS_LISTBOX_BASE::OnSize ) -EVT_CHAR( FOOTPRINTS_LISTBOX::OnChar ) + EVT_SIZE( ITEMS_LISTBOX_BASE::OnSize ) + EVT_CHAR( FOOTPRINTS_LISTBOX::OnChar ) END_EVENT_TABLE() -/********************************************************/ void FOOTPRINTS_LISTBOX::OnLeftClick( wxListEvent& event ) -/********************************************************/ { FOOTPRINT_INFO* Module; wxString footprintName = GetSelectedFootprint(); @@ -297,9 +320,7 @@ void FOOTPRINTS_LISTBOX::OnLeftClick( wxListEvent& event ) } -/******************************************************/ void FOOTPRINTS_LISTBOX::OnLeftDClick( wxListEvent& event ) -/******************************************************/ { wxString footprintName = GetSelectedFootprint(); @@ -307,21 +328,10 @@ void FOOTPRINTS_LISTBOX::OnLeftDClick( wxListEvent& event ) } -/** - * Function OnChar - * called on a key pressed - * Call default handler for some special keys, - * and for "ascii" keys, select the first footprint - * that the name starts by the letter. - * This is the defaut behaviour of a listbox, but because we use - * virtual lists, the listbox does not know anything to what is displayed, - * we must handle this behaviour here. - * Furthermore the footprint name is not at the beginning of - * displayed lines (the first word is the line number) - */ void FOOTPRINTS_LISTBOX::OnChar( wxKeyEvent& event ) { int key = event.GetKeyCode(); + switch( key ) { case WXK_LEFT: @@ -343,16 +353,20 @@ void FOOTPRINTS_LISTBOX::OnChar( wxKeyEvent& event ) default: break; } + // Search for an item name starting by the key code: key = toupper(key); + for( unsigned ii = 0; ii < m_ActiveFootprintList->GetCount(); ii++ ) { wxString text = m_ActiveFootprintList->Item(ii); + /* search for the start char of the footprint name. * we must skip the line number - */ + */ text.Trim(false); // Remove leading spaces in line unsigned jj = 0; + for( ; jj < text.Len(); jj++ ) { // skip line number @@ -367,6 +381,7 @@ void FOOTPRINTS_LISTBOX::OnChar( wxKeyEvent& event ) } int start_char = toupper( text[jj] ); + if( key == start_char ) { Focus( ii ); diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index c3c271c318..4098dc44f7 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -334,7 +334,7 @@ void CVPCB_MAINFRAME::ToFirstNA( wxCommandEvent& event ) int ii = 0; int selection; - if( m_components.empty() ) + if( m_netlist.IsEmpty() ) return; selection = m_ListCmp->GetSelection(); @@ -342,9 +342,9 @@ void CVPCB_MAINFRAME::ToFirstNA( wxCommandEvent& event ) if( selection < 0 ) selection = 0; - BOOST_FOREACH( COMPONENT_INFO & component, m_components ) + for( unsigned jj = 0; jj < m_netlist.GetCount(); jj++ ) { - if( component.m_Footprint.IsEmpty() && ii > selection ) + if( m_netlist.GetComponent( jj )->GetFootprintLibName().IsEmpty() && ii > selection ) { m_ListCmp->SetSelection( ii ); SendMessageToEESCHEMA(); @@ -363,7 +363,7 @@ void CVPCB_MAINFRAME::ToPreviousNA( wxCommandEvent& event ) int ii; int selection; - if( m_components.empty() ) + if( m_netlist.IsEmpty() ) return; ii = m_ListCmp->GetCount() - 1; @@ -372,9 +372,9 @@ void CVPCB_MAINFRAME::ToPreviousNA( wxCommandEvent& event ) if( selection < 0 ) selection = m_ListCmp->GetCount() - 1; - BOOST_REVERSE_FOREACH( COMPONENT_INFO & component, m_components ) + for( unsigned kk = m_netlist.GetCount() - 1; kk >= 0; kk-- ) { - if( component.m_Footprint.IsEmpty() && ii < selection ) + if( m_netlist.GetComponent( kk )->GetFootprintLibName().IsEmpty() && ii < selection ) { m_ListCmp->SetSelection( ii ); SendMessageToEESCHEMA(); @@ -412,15 +412,15 @@ void CVPCB_MAINFRAME::DelAssociations( wxCommandEvent& event ) m_skipComponentSelect = true; m_ListCmp->SetSelection( 0 ); - BOOST_FOREACH( COMPONENT_INFO & component, m_components ) + for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) { - component.m_Footprint.Empty(); + m_netlist.GetComponent( i )->SetFootprintLibName( wxEmptyString ); SetNewPkg( wxEmptyString ); } m_skipComponentSelect = false; m_ListCmp->SetSelection( 0 ); - m_undefinedComponentCnt = m_components.size(); + m_undefinedComponentCnt = m_netlist.GetCount(); } DisplayStatus(); @@ -538,18 +538,18 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event ) else { - if( &m_components[ selection ] == NULL ) + if( m_netlist.GetComponent( selection ) == NULL ) m_FootprintList->SetActiveFootprintList( SELECT_FULL_LIST, REDRAW_LIST ); else { if( m_mainToolBar->GetToolToggled( ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST ) ) { - m_FootprintList->SetFootprintFilteredByPinCount( &m_components[ selection ], + m_FootprintList->SetFootprintFilteredByPinCount( m_netlist.GetComponent( selection ), m_footprints ); } else { - m_FootprintList->SetFootprintFilteredList( &m_components[ selection ], + m_FootprintList->SetFootprintFilteredList( m_netlist.GetComponent( selection ), m_footprints ); } } @@ -568,7 +568,7 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event ) if( FindFocus() == m_ListCmp ) { - wxString module = *(&m_components[ selection ].m_Footprint); + wxString module = m_netlist.GetComponent( selection )->GetFootprintLibName(); bool found = false; for( int ii = 0; ii < m_FootprintList->GetCount(); ii++ ) @@ -642,7 +642,8 @@ void CVPCB_MAINFRAME::DisplayStatus() { wxString msg; - msg.Printf( _( "Components: %d (free: %d)" ), (int) m_components.size(), m_undefinedComponentCnt ); + msg.Printf( _( "Components: %d (free: %d)" ), (int) m_netlist.GetCount(), + m_undefinedComponentCnt ); SetStatusText( msg, 0 ); SetStatusText( wxEmptyString, 1 ); @@ -733,9 +734,9 @@ void CVPCB_MAINFRAME::SendMessageToEESCHEMA() { char cmd[1024]; int selection; - COMPONENT_INFO* Component; + COMPONENT* Component; - if( m_components.empty() ) + if( m_netlist.IsEmpty() ) return; selection = m_ListCmp->GetSelection(); @@ -743,12 +744,12 @@ void CVPCB_MAINFRAME::SendMessageToEESCHEMA() if ( selection < 0 ) selection = 0; - if( &m_components[ selection ] == NULL ) + if( m_netlist.GetComponent( selection ) == NULL ) return; - Component = &m_components[ selection ]; + Component = m_netlist.GetComponent( selection ); - sprintf( cmd, "$PART: \"%s\"", TO_UTF8( Component->m_Reference ) ); + sprintf( cmd, "$PART: \"%s\"", TO_UTF8( Component->GetReference() ) ); SendCommand( MSG_TO_SCH, cmd ); diff --git a/cvpcb/cvpcb.h b/cvpcb/cvpcb.h index 08b8b6e209..c506ea41df 100644 --- a/cvpcb/cvpcb.h +++ b/cvpcb/cvpcb.h @@ -21,10 +21,6 @@ #define LISTB_STYLE (wxSUNKEN_BORDER | wxLC_NO_HEADER | wxLC_REPORT | wxLC_VIRTUAL) -#include - -typedef boost::ptr_vector< COMPONENT_INFO > COMPONENT_LIST; - extern const wxString FootprintAliasFileExtension; extern const wxString RetroFileExtension; diff --git a/cvpcb/cvpcb_mainframe.h b/cvpcb/cvpcb_mainframe.h index 7e3a665fd8..49d8fe0ac3 100644 --- a/cvpcb/cvpcb_mainframe.h +++ b/cvpcb/cvpcb_mainframe.h @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2011 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + /** * @file cvpcb_mainframe.h */ @@ -7,6 +31,7 @@ #include #include +#include #include #include @@ -28,19 +53,19 @@ class CVPCB_MAINFRAME : public EDA_BASE_FRAME { public: - bool m_KeepCvpcbOpen; + bool m_KeepCvpcbOpen; FOOTPRINTS_LISTBOX* m_FootprintList; COMPONENTS_LISTBOX* m_ListCmp; DISPLAY_FOOTPRINTS_FRAME* m_DisplayFootprintFrame; - wxAuiToolBar* m_mainToolBar; - wxFileName m_NetlistFileName; + wxAuiToolBar* m_mainToolBar; + wxFileName m_NetlistFileName; wxArrayString m_ModuleLibNames; wxArrayString m_AliasLibNames; - wxString m_UserLibraryPath; - wxString m_NetlistFileExtension; - wxString m_DocModulesFileName; - FOOTPRINT_LIST m_footprints; - COMPONENT_LIST m_components; + wxString m_UserLibraryPath; + wxString m_NetlistFileExtension; + wxString m_DocModulesFileName; + FOOTPRINT_LIST m_footprints; + NETLIST m_netlist; protected: int m_undefinedComponentCnt; @@ -60,7 +85,7 @@ public: /** * Function OnSelectComponent * Called when clicking on a component in component list window - * * Updates the filtered foorprint list, if the filtered list option is selected + * * Updates the filtered footprint list, if the filtered list option is selected * * Updates the current selected footprint in footprint list * * Updates the footprint shown in footprint display window (if opened) */ @@ -141,22 +166,12 @@ public: * file name of the netlist or cmp file. * If aFullFileName is empty, a file name will be asked to the user * @return 0 if an error occurred saving the link file to \a aFullFileName. - * -1 if cancelled + * -1 if canceled * 1 if OK */ int SaveCmpLinkFile( const wxString& aFullFileName ); - /** - * Function LoadComponentFile - * loads the .cmp link file \a aCmpFileName which stores - * the component/footprint association. - * - * @param aFileName The full filename of .cmp file to load - * If empty, a filename will be asked to the user - */ - bool LoadComponentLinkFile( const wxString& aFileName ); - /** * Function WriteComponentLinkFile * Writes the component footprint link file \a aFullFileName on disk. @@ -166,16 +181,6 @@ public: */ bool WriteComponentLinkFile( const wxString& aFullFileName ); - /** - * Function ReadComponentLinkFile - * Reads the component footprint link file \a aFullFileName. - * - * @param aFile = the opened the opened file to read. - * ReadComponentLinkFile will close the file - * @return true if OK, false if error. - */ - bool ReadComponentLinkFile( FILE * aFile ); - /** * Function ReadNetList * reads the netlist (.net) file defined by #m_NetlistFileName. diff --git a/cvpcb/cvstruct.h b/cvpcb/cvstruct.h index 5d7ed48187..6bfbf3c445 100644 --- a/cvpcb/cvstruct.h +++ b/cvpcb/cvstruct.h @@ -1,6 +1,29 @@ -/*********************************************************/ -/* cvstruct.h */ -/*********************************************************/ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file cvstruct.h + */ #ifndef CVSTRUCT_H #define CVSTRUCT_H @@ -10,6 +33,8 @@ /* Forward declarations of all top-level window classes. */ class CVPCB_MAINFRAME; +class COMPONENT; + /*********************************************************************/ /* ListBox (base class) to display lists of components or footprints */ @@ -53,10 +78,19 @@ public: void SetString( unsigned linecount, const wxString& text ); void AppendLine( const wxString& text ); void SetFootprintFullList( FOOTPRINT_LIST& list ); - void SetFootprintFilteredList( COMPONENT_INFO* Component, - FOOTPRINT_LIST& list ); - void SetFootprintFilteredByPinCount( COMPONENT_INFO* Component, - FOOTPRINT_LIST& list ); + void SetFootprintFilteredList( COMPONENT* aComponent, + FOOTPRINT_LIST& aList ); + void SetFootprintFilteredByPinCount( COMPONENT* aComponent, + FOOTPRINT_LIST& aList ); + + /** + * Set the footprint list. We can have 2 footprint list: + * The full footprint list + * The filtered footprint list (if the current selected component has a + * filter for footprints) + * @param FullList true = full footprint list, false = filtered footprint list + * @param Redraw = true to redraw the window + */ void SetActiveFootprintList( bool FullList, bool Redraw = false ); wxString GetSelectedFootprint(); @@ -65,6 +99,19 @@ public: // Events functions: void OnLeftClick( wxListEvent& event ); void OnLeftDClick( wxListEvent& event ); + + /** + * Function OnChar + * called on a key pressed + * Call default handler for some special keys, + * and for "ascii" keys, select the first footprint + * that the name starts by the letter. + * This is the default behavior of a listbox, but because we use + * virtual lists, the listbox does not know anything to what is displayed, + * we must handle this behavior here. + * Furthermore the footprint name is not at the beginning of + * displayed lines (the first word is the line number) + */ void OnChar( wxKeyEvent& event ); DECLARE_EVENT_TABLE() @@ -78,7 +125,7 @@ class COMPONENTS_LISTBOX : public ITEMS_LISTBOX_BASE { public: wxArrayString m_ComponentList; - CVPCB_MAINFRAME* m_Parent; + CVPCB_MAINFRAME* m_Parent; public: diff --git a/cvpcb/listboxes.cpp b/cvpcb/listboxes.cpp index c1e68a5910..b1fd0627b1 100644 --- a/cvpcb/listboxes.cpp +++ b/cvpcb/listboxes.cpp @@ -1,3 +1,26 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + /** * @file listboxes.cpp * @brief Implementation of class for displaying footprint list and component lists. @@ -67,9 +90,10 @@ CVPCB_MAINFRAME* ITEMS_LISTBOX_BASE::GetParent() */ void CVPCB_MAINFRAME::BuildCmpListBox() { - wxString msg; - wxSize size( 10, 10 ); - wxFont guiFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); + COMPONENT* component; + wxString msg; + wxSize size( 10, 10 ); + wxFont guiFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); if( m_ListCmp == NULL ) { @@ -86,11 +110,14 @@ void CVPCB_MAINFRAME::BuildCmpListBox() m_ListCmp->m_ComponentList.Clear(); - BOOST_FOREACH( COMPONENT_INFO & component, m_components ) { + for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) + { + component = m_netlist.GetComponent( i ); + msg.Printf( CMP_FORMAT, m_ListCmp->GetCount() + 1, - GetChars(component.m_Reference), - GetChars(component.m_Value), - GetChars(component.m_Footprint) ); + GetChars( component->GetReference() ), + GetChars( component->GetValue() ), + GetChars( component->GetFootprintLibName() ) ); m_ListCmp->m_ComponentList.Add( msg ); } diff --git a/cvpcb/loadcmp.cpp b/cvpcb/loadcmp.cpp index d01699a8be..21cc0cc961 100644 --- a/cvpcb/loadcmp.cpp +++ b/cvpcb/loadcmp.cpp @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -45,9 +46,9 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName ) if( !libPath ) { - wxString msg = wxString::Format( - _("PCB foot print library file <%s> could not be found in the default search paths." ), - fn.GetFullName().GetData() ); + wxString msg = wxString::Format( _( "PCB footprint library file <%s> could not " + "be found in the default search paths." ), + fn.GetFullName().GetData() ); // @todo we should not be using wxMessageBox directly. wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR, this ); @@ -58,7 +59,7 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName ) if( footprint ) { - footprint->SetParent( GetBoard() ); + footprint->SetParent( (EDA_ITEM*) GetBoard() ); footprint->SetPosition( wxPoint( 0, 0 ) ); return footprint; } @@ -74,4 +75,3 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName ) DisplayError( this, msg ); return NULL; } - diff --git a/cvpcb/read_write_cmpfile.cpp b/cvpcb/read_write_cmpfile.cpp index c527b09f51..fc0a0bc23f 100644 --- a/cvpcb/read_write_cmpfile.cpp +++ b/cvpcb/read_write_cmpfile.cpp @@ -54,6 +54,7 @@ static char HeaderLinkFile[] = { "Cmp-Mod V01" }; bool CVPCB_MAINFRAME::WriteComponentLinkFile( const wxString& aFullFileName ) { + COMPONENT* component; FILE* outputFile; wxFileName fn( aFullFileName ); wxString Title = wxGetApp().GetTitle() + wxT( " " ) + GetBuildVersion(); @@ -69,13 +70,15 @@ bool CVPCB_MAINFRAME::WriteComponentLinkFile( const wxString& aFullFileName ) retval |= fprintf( outputFile, " Created by %s", TO_UTF8( Title ) ); retval |= fprintf( outputFile, " date = %s\n", TO_UTF8( DateAndTime() ) ); - BOOST_FOREACH( COMPONENT_INFO& component, m_components ) + for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) { + component = m_netlist.GetComponent( i ); retval |= fprintf( outputFile, "\nBeginCmp\n" ); - retval |= fprintf( outputFile, "TimeStamp = %s;\n", TO_UTF8( component.m_TimeStamp ) ); - retval |= fprintf( outputFile, "Reference = %s;\n", TO_UTF8( component.m_Reference ) ); - retval |= fprintf( outputFile, "ValeurCmp = %s;\n", TO_UTF8( component.m_Value ) ); - retval |= fprintf( outputFile, "IdModule = %s;\n", TO_UTF8( component.m_Footprint ) ); + retval |= fprintf( outputFile, "TimeStamp = %s;\n", TO_UTF8( component->GetTimeStamp() ) ); + retval |= fprintf( outputFile, "Reference = %s;\n", TO_UTF8( component->GetReference() ) ); + retval |= fprintf( outputFile, "ValeurCmp = %s;\n", TO_UTF8( component->GetValue() ) ); + retval |= fprintf( outputFile, "IdModule = %s;\n", + TO_UTF8( component->GetFootprintLibName() ) ); retval |= fprintf( outputFile, "EndCmp\n" ); } @@ -83,98 +86,3 @@ bool CVPCB_MAINFRAME::WriteComponentLinkFile( const wxString& aFullFileName ) fclose( outputFile ); return retval >= 0; } - -bool CVPCB_MAINFRAME::ReadComponentLinkFile( FILE * aFile ) -{ - wxString timestamp, valeur, ilib, namecmp, msg; - bool read_cmp_data = false, eof = false; - char Line[1024], * ident, * data; - - // Identification of the type of link file - if( fgets( Line, sizeof(Line), aFile ) == 0 || - strnicmp( Line, HeaderLinkFile, 11 ) != 0 ) - { - fclose( aFile ); - return false; - } - - while( !eof && fgets( Line, sizeof(Line), aFile ) != 0 ) - { - if( strnicmp( Line, "EndListe", 8 ) == 0 ) - break; - - /* Search the beginning of the component description. */ - if( strnicmp( Line, "BeginCmp", 8 ) != 0 ) - continue; - - timestamp.Empty(); - valeur.Empty(); - ilib.Empty(); - namecmp.Empty(); - read_cmp_data = true; - - while( !eof && read_cmp_data ) - { - if( fgets( Line, 1024, aFile ) == 0 ) - { - eof = true; - break; - } - - if( strnicmp( Line, "EndCmp", 6 ) == 0 ) - { - read_cmp_data = true; - break; - } - - ident = strtok( Line, "=;\n\r" ); - data = strtok( NULL, ";\n\r" ); - - if( strnicmp( ident, "TimeStamp", 9 ) == 0 ) - { - timestamp = FROM_UTF8( data ); - timestamp.Trim( true ); - timestamp.Trim( false ); - continue; - } - - if( strnicmp( ident, "Reference", 9 ) == 0 ) - { - namecmp = FROM_UTF8( data ); - namecmp.Trim( true ); - namecmp.Trim( false ); - continue; - } - - if( strnicmp( ident, "ValeurCmp", 9 ) == 0 ) - { - valeur = FROM_UTF8( data ); - valeur.Trim( true ); - valeur.Trim( false ); - continue; - } - - if( strnicmp( ident, "IdModule", 8 ) == 0 ) - { - ilib = FROM_UTF8( data ); - ilib.Trim( true ); - ilib.Trim( false ); - continue; - } - } // End reading one component link block. - - // Search corresponding component info in list and update its parameters. - BOOST_FOREACH( COMPONENT_INFO& component, m_components ) - { - if( namecmp != component.m_Reference ) - continue; - - /* Copy the name of the corresponding module. */ - component.m_Footprint = ilib; - } - } - - fclose( aFile ); - return true; -} - diff --git a/cvpcb/readschematicnetlist.cpp b/cvpcb/readschematicnetlist.cpp index 06e0a36bbf..402443bb98 100644 --- a/cvpcb/readschematicnetlist.cpp +++ b/cvpcb/readschematicnetlist.cpp @@ -26,7 +26,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/* Read a nelist type Eeschema (New and Old format) +/* Read a netlist type Eeschema (New and Old format) * or OrcadPCB2 and build the component list */ @@ -35,82 +35,56 @@ #include #include #include +#include #include #include - #include -// COMPONENT_INFO object list sort function: -bool operator < ( const COMPONENT_INFO& item1, const COMPONENT_INFO& item2 ) -{ - return StrNumCmp( item1.m_Reference, item2.m_Reference, INT_MAX, true ) < 0; -} - int CVPCB_MAINFRAME::ReadSchematicNetlist() { - FILE* netfile = wxFopen( m_NetlistFileName.GetFullPath(), wxT( "rt" ) ); + wxBusyCursor dummy; // Shows an hourglass while loading. + NETLIST_READER* netlistReader; + wxString msg; + wxString compFootprintLinkFileName; + wxFileName fn = m_NetlistFileName; - if( netfile == NULL ) + // Load the footprint association file if it has already been created. + fn.SetExt( ComponentFileExtension ); + + if( fn.FileExists() && fn.IsFileReadable() ) + compFootprintLinkFileName = fn.GetFullPath(); + + m_netlist.Clear(); + + try { - wxString msg; - msg.Printf( _( "Could not open file <%>" ), - GetChars( m_NetlistFileName.GetFullPath() ) ); - wxMessageBox( msg ); - return -1; + netlistReader = NETLIST_READER::GetNetlistReader( &m_netlist, + m_NetlistFileName.GetFullPath(), + compFootprintLinkFileName ); + std::auto_ptr< NETLIST_READER > nlr( netlistReader ); + netlistReader->LoadNetlist(); + } + catch( IO_ERROR& ioe ) + { + msg = wxString::Format( _( "Error loading netlist.\n%s" ), ioe.errorText.GetData() ); + wxMessageBox( msg, _( "Netlist Load Error" ), wxOK | wxICON_ERROR ); + return 1; } - NETLIST_READER netList_Reader( NULL, NULL ); - netList_Reader.m_UseTimeStamp = false; - netList_Reader.m_ChangeFootprints = false; - netList_Reader.m_UseCmpFile = false; - netList_Reader.SetFilesnames( m_NetlistFileName.GetFullPath(), wxEmptyString ); - // True to read footprint filters section: true for CvPcb, false for Pcbnew - netList_Reader.ReadLibpartSectionSetOpt( true ); - - // on OSX otherwise reloading a file you will see duplicates - m_components.clear(); - - bool success = netList_Reader.ReadNetList( netfile ); - if( !success ) + // We also remove footprint name if it is "$noname" because this is a dummy name, + // not the actual name of the footprint. + for( unsigned ii = 0; ii < m_netlist.GetCount(); ii++ ) { - wxMessageBox( _("Netlist read error") ); - return false; + if( m_netlist.GetComponent( ii )->GetFootprintLibName() == wxT( "$noname" ) ) + m_netlist.GetComponent( ii )->SetFootprintLibName( wxEmptyString ); } - // Now copy footprints info into Cvpcb list: - // We also remove footprint name if it is "$noname" - // because this is a dummy name,, not an actual name - COMPONENT_INFO_LIST& cmpInfo = netList_Reader.GetComponentInfoList(); - for( unsigned ii = 0; ii < cmpInfo.size(); ii++ ) - { - m_components.push_back( cmpInfo[ii] ); - if( cmpInfo[ii]->m_Footprint == wxT( "$noname" ) ) - cmpInfo[ii]->m_Footprint.Empty(); - } - cmpInfo.clear(); // cmpInfo is no more owner of the list. - // Sort components by reference: - sort( m_components.begin(), m_components.end() ); - - // Now copy filters in m_components, if netlist type is KICAD - // ( when the format is the "old" PCBNEW format, filters are already in - // m_component list - if( NETLIST_TYPE_KICAD == netList_Reader.GetNetlistType() ) - { - for( unsigned ii = 0; ii < m_components.size(); ii++ ) - { - LIPBART_INFO* libpart = netList_Reader.GetLibpart(m_components[ii].m_Libpart); - if( libpart == NULL ) - continue; - - // now copy filter list - m_components[ii].m_FootprintFilter = libpart->m_FootprintFilter; - } - } + m_netlist.SortByReference(); return 0; } diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index 881b0fbef3..4027980809 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -41,17 +41,17 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) { - COMPONENT_INFO* component; + COMPONENT* component; bool hasFootprint = false; int componentIndex; wxString description; - if( m_components.empty() ) + if( m_netlist.IsEmpty() ) return; - // if no component is selected, select the first one + // If no component is selected, select the first one - if(m_ListCmp->GetFirstSelected() < 0) + if( m_ListCmp->GetFirstSelected() < 0 ) { componentIndex = 0; m_ListCmp->SetSelection( componentIndex, true ); @@ -61,28 +61,28 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) while( m_ListCmp->GetFirstSelected() != -1) { - // get the component for the current iteration + // Get the component for the current iteration componentIndex = m_ListCmp->GetFirstSelected(); - component = &m_components[componentIndex]; + component = m_netlist.GetComponent( componentIndex ); if( component == NULL ) return; - // check to see if the component has allready a footprint set. + // Check to see if the component has already a footprint set. - hasFootprint = !(component->m_Footprint.IsEmpty()); + hasFootprint = !(component->GetFootprintLibName().IsEmpty()); - component->m_Footprint = aFootprintName; + component->SetFootprintLibName( aFootprintName ); // create the new component description description.Printf( CMP_FORMAT, componentIndex + 1, - GetChars( component->m_Reference ), - GetChars( component->m_Value ), - GetChars( component->m_Footprint ) ); + GetChars( component->GetReference() ), + GetChars( component->GetValue() ), + GetChars( component->GetFootprintLibName() ) ); - // if the component hasn't had a footprint associated with it + // If the component hasn't had a footprint associated with it // it now has, so we decrement the count of components without // a footprint assigned. @@ -92,12 +92,12 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) m_undefinedComponentCnt -= 1; } - // set the new description and deselect the processed component + // Set the new description and deselect the processed component m_ListCmp->SetString( componentIndex, description ); m_ListCmp->SetSelection( componentIndex, false ); } - // mark this "session" as modified + // Mark this "session" as modified m_modified = true; // select the next component, if there is one @@ -113,22 +113,10 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName ) bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() { + COMPONENT* component; wxString msg; - int error_level; - error_level = ReadSchematicNetlist(); - - if( error_level < 0 ) - { - msg.Printf( _( "File <%s> does not appear to be a valid KiCad net list file." ), - GetChars( m_NetlistFileName.GetFullPath() ) ); - wxMessageBox( msg, _( "File Error" ), wxOK | wxICON_ERROR, this ); - m_NetlistFileName.Clear(); - UpdateTitle(); - return false; - } - - LoadComponentLinkFile( m_NetlistFileName.GetFullPath() ); + ReadSchematicNetlist(); if( m_ListCmp == NULL ) return false; @@ -140,19 +128,21 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() m_ListCmp->Clear(); m_undefinedComponentCnt = 0; - BOOST_FOREACH( COMPONENT_INFO& component, m_components ) + for( unsigned i = 0; i < m_netlist.GetCount(); i++ ) { + component = m_netlist.GetComponent( i ); + msg.Printf( CMP_FORMAT, m_ListCmp->GetCount() + 1, - GetChars( component.m_Reference ), - GetChars( component.m_Value ), - GetChars( component.m_Footprint ) ); + GetChars( component->GetReference() ), + GetChars( component->GetValue() ), + GetChars( component->GetFootprintLibName() ) ); m_ListCmp->AppendLine( msg ); - if( component.m_Footprint.IsEmpty() ) + if( component->GetFootprintLibName().IsEmpty() ) m_undefinedComponentCnt += 1; } - if( !m_components.empty() ) + if( !m_netlist.IsEmpty() ) m_ListCmp->SetSelection( 0, true ); DisplayStatus(); @@ -165,37 +155,6 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles() } -bool CVPCB_MAINFRAME::LoadComponentLinkFile( const wxString& aFileName ) -{ - FILE* linkfile; - wxFileName fn = aFileName; - - fn.SetExt( ComponentFileExtension ); - - linkfile = wxFopen( fn.GetFullPath(), wxT( "rt" ) ); - if( linkfile == NULL ) - { - wxString msg; - msg.Printf( _( "Cannot open CvPcb component file <%s>." ), - GetChars( fn.GetFullPath() ) ); - msg << wxT( "\n" ) << _( "This is normal if you are opening a new netlist file" ); - wxMessageBox( msg, titleComponentLibErr, wxOK | wxICON_ERROR ); - return false; - } - - // read and close the file - if( ! ReadComponentLinkFile( linkfile ) ) - { - wxString msg; - msg.Printf( _( " <%s> does not appear to be a valid KiCad component link file." ), - GetChars( fn.GetFullPath() ) ); - wxMessageBox( msg, titleComponentLibErr, wxOK | wxICON_ERROR ); - return false; - } - - return true; -} - int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) { wxFileName fn; @@ -207,7 +166,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) } else { - wxFileDialog dlg( this, _( "Save Component/Footprint Link File" ), wxGetCwd(), + wxFileDialog dlg( this, _( "Save Component Footprint Link File" ), wxGetCwd(), wxEmptyString, ComponentFileWildcard, wxFD_SAVE ); if( dlg.ShowModal() == wxID_CANCEL ) @@ -224,7 +183,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) if( WriteComponentLinkFile( fn.GetFullPath() ) == 0 ) { - DisplayError( this, _( "Unable to create component file (.cmp)" ) ); + DisplayError( this, _( "Unable to create component footprint link file (.cmp)" ) ); return 0; } diff --git a/eeschema/class_library.cpp b/eeschema/class_library.cpp index d5ef45001a..53e69728d7 100644 --- a/eeschema/class_library.cpp +++ b/eeschema/class_library.cpp @@ -148,7 +148,7 @@ void CMP_LIBRARY::GetEntryNames( wxArrayString& aNames, bool aSort, bool aMakeUp * simple function used as comparator to sort a std::vector&. * * @param aItem1 is the first comparison parameter. - * @param aItem1 is the second. + * @param aItem2 is the second. * @return bool - which item should be put first in the sorted list. */ bool sortFunction( wxArrayString aItem1, wxArrayString aItem2 ) diff --git a/eeschema/dialogs/dialog_netlist.cpp b/eeschema/dialogs/dialog_netlist.cpp index 3914a3c3aa..0964609497 100644 --- a/eeschema/dialogs/dialog_netlist.cpp +++ b/eeschema/dialogs/dialog_netlist.cpp @@ -188,9 +188,6 @@ NETLIST_DIALOG::NETLIST_DIALOG( SCH_EDIT_FRAME* parent ) : long tmp; m_config->Read( NETLIST_USE_DEFAULT_NETNAME, &tmp, 0l ); m_cbUseDefaultNetlistName->SetValue( tmp ); - m_config->Read( NETLIST_PSPICE_USE_NETNAME, &m_spiceNetlistUseNames, true ); - - m_NetFmtName = m_Parent->GetNetListFormatName(); for( int ii = 0; ii < PANELCUSTOMBASE + CUSTOMPANEL_COUNTMAX; ii++ ) @@ -268,18 +265,6 @@ void NETLIST_DIALOG::InstallPageSpice() page->m_AddSubPrefix->SetValue( m_Parent->GetAddReferencePrefix() ); page->m_LeftBoxSizer->Add( page->m_AddSubPrefix, 0, wxGROW | wxALL, 5 ); - - wxString netlist_opt[2] = { _( "Use Net Names" ), _( "Use Net Numbers" ) }; - page->m_NetOption = new wxRadioBox( page, -1, _( "Netlist Options:" ), - wxDefaultPosition, wxDefaultSize, - 2, netlist_opt, 1, - wxRA_SPECIFY_COLS ); - - if( !m_spiceNetlistUseNames ) - page->m_NetOption->SetSelection( 1 ); - - page->m_LeftBoxSizer->Add( page->m_NetOption, 0, wxGROW | wxALL, 5 ); - page->m_LowBoxSizer->Add( new wxStaticText( page, -1, _( "Simulator command:" ) ), 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 ); @@ -438,11 +423,6 @@ void NETLIST_DIALOG::NetlistUpdateOpt() if( m_PanelNetType[ii]->m_IsCurrentFormat->GetValue() == true ) m_Parent->SetNetListFormatName( m_PanelNetType[ii]->GetPageNetFmtName() ); } - - m_spiceNetlistUseNames = true; // Used for pspice, gnucap - - if( m_PanelNetType[PANELSPICE]->m_NetOption->GetSelection() == 1 ) - m_spiceNetlistUseNames = false; } @@ -475,8 +455,6 @@ void NETLIST_DIALOG::GenNetlist( wxCommandEvent& event ) { case NET_TYPE_SPICE: // Set spice netlist options: - if( m_spiceNetlistUseNames ) - netlist_opt |= NET_USE_NETNAMES; if( currPage->m_AddSubPrefix->GetValue() ) netlist_opt |= NET_USE_X_PREFIX; break; @@ -647,13 +625,10 @@ void NETLIST_DIALOG::RunSimulator( wxCommandEvent& event ) NETLIST_PAGE_DIALOG* currPage; currPage = (NETLIST_PAGE_DIALOG*) m_NoteBook->GetCurrentPage(); - m_spiceNetlistUseNames = currPage->m_NetOption->GetSelection() == 0; // Set spice netlist options: unsigned netlist_opt = 0; - if( m_spiceNetlistUseNames ) - netlist_opt |= NET_USE_NETNAMES; if( currPage->m_AddSubPrefix && currPage->m_AddSubPrefix->GetValue() ) netlist_opt |= NET_USE_X_PREFIX; @@ -676,7 +651,6 @@ void NETLIST_DIALOG::WriteCurrentNetlistSetup( void ) NetlistUpdateOpt(); m_config->Write( NETLIST_USE_DEFAULT_NETNAME, GetUseDefaultNetlistName() ); - m_config->Write( NETLIST_PSPICE_USE_NETNAME, m_spiceNetlistUseNames ); // Update the new titles for( int ii = 0; ii < CUSTOMPANEL_COUNTMAX; ii++ ) diff --git a/eeschema/dialogs/dialog_netlist.h b/eeschema/dialogs/dialog_netlist.h index 686cbceef5..33311e4750 100644 --- a/eeschema/dialogs/dialog_netlist.h +++ b/eeschema/dialogs/dialog_netlist.h @@ -110,7 +110,6 @@ public: // Options for Spice netlist generation (OR'ed bits enum netlistOptions { - NET_USE_NETNAMES = 1, // for Spice netlist : use netnames instead of numbers NET_USE_X_PREFIX = 2, // for Spice netlist : change "U" and "IC" reference prefix to "X" NET_PCBNEW_USE_NEW_FORMAT = 1, // For Pcbnew use the new format (S expression and SWEET) }; @@ -125,8 +124,6 @@ public: private: wxConfig* m_config; - bool m_spiceNetlistUseNames; /* true to use names rather than net - * numbers (PSPICE netlist only) */ public: diff --git a/eeschema/events_called_functions_for_edit.cpp b/eeschema/events_called_functions_for_edit.cpp index dda4c0e193..2939d28da8 100644 --- a/eeschema/events_called_functions_for_edit.cpp +++ b/eeschema/events_called_functions_for_edit.cpp @@ -32,10 +32,9 @@ void SCH_EDIT_FRAME::OnCopySchematicItemRequest( wxCommandEvent& event ) newitem->SetTimeStamp( GetNewTimeStamp() ); newitem->ClearAnnotation( NULL ); newitem->SetFlags( IS_NEW ); - MoveItem( (SCH_ITEM*) newitem, &dc ); - - // Redraw the original part, because StartMovePart() erased it from screen. - curr_item->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode ); + // Draw the new part, MoveItem() expects it to be already on screen. + newitem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode ); + MoveItem( newitem, &dc ); } break; @@ -46,10 +45,9 @@ void SCH_EDIT_FRAME::OnCopySchematicItemRequest( wxCommandEvent& event ) { SCH_TEXT* newitem = (SCH_TEXT*) curr_item->Clone(); newitem->SetFlags( IS_NEW ); - MoveItem( (SCH_ITEM*) newitem, &dc ); - - /* Redraw the original part in XOR mode */ - curr_item->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode ); + // Draw the new item, MoveItem() expects it to be already on screen. + newitem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), g_XorMode ); + MoveItem( newitem, &dc ); } break; diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index 9a39af7109..1d5e1ae7b8 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -298,12 +298,10 @@ public: * .-PSpice or .-gnucap put at beginning of the netlist * .+PSpice or .-genucap are put at end of the netList * @param f = the file to write to - * @param use_netnames = true, to use netnames in netlist, - * false to use net number. * @param aUsePrefix = true, adds an 'X' prefix to any reference designator starting with "U" or "IC", * false to leave reference designator unchanged. */ - bool WriteNetListPspice( FILE* f, bool use_netnames, bool aUsePrefix ); + bool WriteNetListPspice( FILE* f, bool aUsePrefix ); /** * Function MakeCommandLine @@ -360,8 +358,6 @@ wxString NETLIST_EXPORT_TOOL::MakeCommandLine( const wxString& aFormatString, * param aFullFileName = full netlist file name * param aNetlistOptions = netlist options using OR'ed bits. * For SPICE netlist only: - * if NET_USE_NETNAMES is set, use net names from labels in schematic - * else use net numbers (net codes) * if NET_USE_X_PREFIX is set : change "U" and "IC" refernce prefix to "X" * return true if success. */ @@ -381,7 +377,7 @@ bool SCH_EDIT_FRAME::WriteNetListFile( int aFormat, const wxString& aFullFileNam if( ( f = wxFopen( aFullFileName, wxT( "wt" ) ) ) == NULL ) { wxString msg; - msg.Printf( _( "Failed to create file <%s>" ), + msg.Printf( _( "Failed to create file <%s>" ), GetChars( aFullFileName ) ); DisplayError( this, msg ); return false; @@ -413,9 +409,7 @@ bool SCH_EDIT_FRAME::WriteNetListFile( int aFormat, const wxString& aFullFileNam break; case NET_TYPE_SPICE: - ret = helper.WriteNetListPspice( f, - aNetlistOptions & NET_USE_NETNAMES, - aNetlistOptions & NET_USE_X_PREFIX ); + ret = helper.WriteNetListPspice( f, aNetlistOptions & NET_USE_X_PREFIX ); fclose( f ); break; @@ -1086,110 +1080,16 @@ bool NETLIST_EXPORT_TOOL::WriteGENERICNetList( const wxString& aOutFileName ) for( unsigned ii = 0; ii < g_NetObjectslist.size(); ii++ ) g_NetObjectslist[ii]->m_Flag = 0; -#if 1 // output the XML format netlist. wxXmlDocument xdoc; xdoc.SetRoot( makeGenericRoot() ); return xdoc.Save( aOutFileName, 2 /* indent bug, today was ignored by wxXml lib */ ); - -#else // output the well established/old generic net list format which was not XML. - - wxString field; - wxString footprint; - wxString netname; - FILE* out; - int ret = 0; // OR on each call, test sign bit at very end. - - if( ( out = wxFopen( aOutFileName, wxT( "wt" ) ) ) == NULL ) - { - wxString msg; - msg.Printf( _( "Failed to create file <%s>" ), GetChars( aOutFileName ) ); - DisplayError( NULL, msg ); - return false; - } - - m_ReferencesAlreadyFound.Clear(); - - ret |= fprintf( out, "$BeginNetlist\n" ); - - // Create netlist module section - ret |= fprintf( out, "$BeginComponentList\n" ); - - SCH_SHEET_LIST sheetList; - - for( SCH_SHEET_PATH* path = sheetList.GetFirst(); path; path = sheetList.GetNext() ) - { - for( EDA_ITEM* schItem = path->LastDrawList(); schItem; schItem = schItem->Next() ) - { - SCH_COMPONENT* comp = findNextComponentAndCreatePinList( schItem, path ); - if( !comp ) - break; // No component left - - schItem = comp; - - footprint.Empty(); - if( !comp->GetField( FOOTPRINT )->IsVoid() ) - { - footprint = comp->GetField( FOOTPRINT )->m_Text; - footprint.Replace( wxT( " " ), wxT( "_" ) ); - } - - ret |= fprintf( out, "\n$BeginComponent\n" ); - ret |= fprintf( out, "TimeStamp=%8.8lX\n", comp->m_TimeStamp ); - ret |= fprintf( out, "Footprint=%s\n", TO_UTF8( footprint ) ); - - field = wxT( "Reference=" ) + comp->GetRef( path ) + wxT( "\n" ); - field.Replace( wxT( " " ), wxT( "_" ) ); - ret |= fputs( TO_UTF8( field ), out ); - - field = comp->GetField( VALUE )->m_Text; - field.Replace( wxT( " " ), wxT( "_" ) ); - ret |= fprintf( out, "Value=%s\n", TO_UTF8( field ) ); - - field = comp->GetLibName(); - field.Replace( wxT( " " ), wxT( "_" ) ); - ret |= fprintf( out, "Libref=%s\n", TO_UTF8( field ) ); - - // Write pin list: - ret |= fprintf( out, "$BeginPinList\n" ); - for( unsigned ii = 0; ii < m_SortedComponentPinList.size(); ii++ ) - { - NETLIST_OBJECT* Pin = m_SortedComponentPinList[ii]; - if( !Pin ) - continue; - - sprintPinNetName( &netname, wxT( "$-%.6d" ), Pin ); - if( netname.IsEmpty() ) - netname = wxT( "?" ); - - ret |= fprintf( out, "%.4s=%s\n", (char*) &Pin->m_PinNum, TO_UTF8( netname ) ); - } - - ret |= fprintf( out, "$EndPinList\n" ); - ret |= fprintf( out, "$EndComponent\n" ); - } - } - - ret |= fprintf( out, "$EndComponentList\n" ); - - ret |= fprintf( out, "\n$BeginNets\n" ); - - if( !writeGENERICListOfNets( out, g_NetObjectslist ) ) - ret = -1; - - ret |= fprintf( out, "$EndNets\n" ); - - ret |= fprintf( out, "\n$EndNetlist\n" ); - ret |= fclose( out ); - - return ret >= 0; -#endif } -bool NETLIST_EXPORT_TOOL::WriteNetListPspice( FILE* f, bool use_netnames, bool aUsePrefix ) +bool NETLIST_EXPORT_TOOL::WriteNetListPspice( FILE* f, bool aUsePrefix ) { int ret = 0; int nbitems; @@ -1406,17 +1306,8 @@ bool NETLIST_EXPORT_TOOL::WriteNetListPspice( FILE* f, bool use_netnames, bool a if( netName.IsEmpty() ) netName = wxT( "?" ); - if( use_netnames ) - ret |= fprintf( f, " %s", TO_UTF8( netName ) ); + ret |= fprintf( f, " %s", TO_UTF8( netName ) ); - else // Use number for net names (net number = 0 for "GND") - { - // NetName = "0" is "GND" net for Spice - if( netName == wxT( "0" ) || netName == wxT( "GND" ) ) - ret |= fprintf( f, " 0" ); - else - ret |= fprintf( f, " %d", pin->GetNet() ); - } } // Get Component Value Name: diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp index d6c0471a8e..9ca38ee584 100644 --- a/eeschema/netlist.cpp +++ b/eeschema/netlist.cpp @@ -146,7 +146,10 @@ void SCH_EDIT_FRAME::BuildNetListBase() if( g_NetObjectslist.size() == 0 ) return; // no objects - activity += wxString::Format( _( " net count = %u" ), g_NetObjectslist.size() ); + /* The new %zu specification is needed to properly format a size_t + * value (returned by size(), here) */ + activity += wxString::Format( _( " net count = %zu" ), + g_NetObjectslist.size() ); SetStatusText( activity ); /* Sort objects by Sheet */ diff --git a/eeschema/plugins/CMakeLists.txt b/eeschema/plugins/CMakeLists.txt index 1dfbf6ebcd..ebc2aed1b4 100644 --- a/eeschema/plugins/CMakeLists.txt +++ b/eeschema/plugins/CMakeLists.txt @@ -1,14 +1,18 @@ -if(UNIX) - add_definitions(-D__UNIX__) -endif(UNIX) - -# add_executable(netlist_form_pads-pcb netlist_form_pads-pcb.cpp) -# install(TARGETS netlist_form_pads-pcb DESTINATION ${KICAD_PLUGINS} COMPONENT binary) - -# install the *.xsl file(s), user will need to install 'xsltproc' and setup +# Install the *.xsl file(s), user will need to install 'xsltproc' and setup # EESCHEMA's netlist plugins -install( FILES - netlist_form_pads-pcb.xsl - DESTINATION ${KICAD_PLUGINS} - COMPONENT binary - ) +# See chapter 14 of eeschema.pdf + + +set( xsl_lst + bom2csv.xsl + bom_cvs.xsl + netlist_form_cadstar-RINF.xsl + netlist_form_cadstar.xsl + netlist_form_OrcadPcb2.xsl + netlist_form_pads-pcb.xsl + ) + +install( FILES ${xsl_lst} + DESTINATION ${KICAD_PLUGINS} + COMPONENT binary + ) diff --git a/eeschema/plugins/bom2csv.xsl b/eeschema/plugins/bom2csv.xsl new file mode 100644 index 0000000000..3140609928 --- /dev/null +++ b/eeschema/plugins/bom2csv.xsl @@ -0,0 +1,85 @@ + + + +]> + + + + + + + + + + + Reference, Value, Footprint, Datasheet + + + + , + + + &nl; + + + + + + + + , + , + , + + + &nl; + + + + + + + + + + + + , + + + + + + + + + + + + + + + diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 6eb22f2574..3e0f1baa7e 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -46,7 +46,6 @@ extern void IncrementLabelMember( wxString& name ); -extern int OverbarPositionY( int size_v, int thickness ); /* Names of sheet label types. */ @@ -1320,11 +1319,11 @@ void SCH_GLOBALLABEL::CreateGraphicShape( std::vector & aPoints, const int x = symb_len + linewidth + 3; // Use negation bar Y position to calculate full vertical size - #define Y_CORRECTION 1.22 + #define Y_CORRECTION 1.3 // Note: this factor is due to the fact the negation bar Y position // does not give exactly the full Y size of text // and is experimentally set to this value - int y = KiROUND( OverbarPositionY( HalfSize, linewidth ) * Y_CORRECTION ); + int y = KiROUND( OverbarPositionY( HalfSize ) * Y_CORRECTION ); // add room for line thickness and space between top of text and graphic shape y += linewidth; diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 605c28cbfc..3f509a6b55 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -1,9 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2008-2011 Wayne Stambaugh - * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2008-2013 Wayne Stambaugh + * Copyright (C) 2004-2013 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/gerbview/rs274x.cpp b/gerbview/rs274x.cpp index 893698a0ed..d65cc3bafa 100644 --- a/gerbview/rs274x.cpp +++ b/gerbview/rs274x.cpp @@ -758,6 +758,8 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command, break; } + (void) seq_len; // quiet g++, or delete the unused variable. + ok = GetEndOfBlock( buff, text, m_Current_File ); return ok; @@ -788,6 +790,7 @@ bool GetEndOfBlock( char buff[GERBER_BUFZ], char*& text, FILE* gerber_file ) return false; } + /** * Function GetNextLine * test for an end of line diff --git a/include/appl_wxstruct.h b/include/appl_wxstruct.h index e793795dd3..014de9a7e1 100644 --- a/include/appl_wxstruct.h +++ b/include/appl_wxstruct.h @@ -259,7 +259,7 @@ public: * true. * @param aList = array of PARAM_CFG_BASE pointers */ - void SaveCurrentSetupValues( const PARAM_CFG_ARRAY& List ); + void SaveCurrentSetupValues( const PARAM_CFG_ARRAY& aList ); /** * Function ReadCurrentSetupValues @@ -268,7 +268,7 @@ public: * true. * @param aList = array of PARAM_CFG_BASE pointers */ - void ReadCurrentSetupValues( const PARAM_CFG_ARRAY& List ); + void ReadCurrentSetupValues( const PARAM_CFG_ARRAY& aList ); /** * Function ReadProjectConfig diff --git a/include/dialog_helpers.h b/include/dialog_helpers.h index 9f5bb90cd1..45e3ecfb13 100644 --- a/include/dialog_helpers.h +++ b/include/dialog_helpers.h @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2010 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + /** * @file dialog_helpers.h * @brief Helper dialog and control classes. @@ -38,6 +62,7 @@ public: * Constructor: * @param aParent Pointer to the parent window. * @param aTitle = The title shown on top. + * @param aItemHeaders is an array containing the column header names for the dialog. * @param aItemList = A wxArrayString of the list of elements. * @param aRefText = An item name if an item must be preselected. * @param aCallBackFunction = callback function to display comments diff --git a/include/drawtxt.h b/include/drawtxt.h index cbbd9fadd7..7ef8b7198e 100644 --- a/include/drawtxt.h +++ b/include/drawtxt.h @@ -10,9 +10,20 @@ #include #include // EDA_TEXT_HJUSTIFY_T and EDA_TEXT_VJUSTIFY_T -/// Minimum dimension in pixel for drawing text +/* Minimum dimension in pixel for drawing/no drawing a text + * used in Pcbnew to decide to draw (or not) some texts + * ( like net names on pads/tracks ) + * When a text height is smaller than MIN_TEXT_SIZE, + * it is not drawn by Pcbnew + */ #define MIN_TEXT_SIZE 5 +/* Absolute minimum dimension in pixel to draw a text as text or a line + * When a text height is smaller than MIN_DRAWABLE_TEXT_SIZE, + * it is drawn, but like a line by the draw text function +*/ +#define MIN_DRAWABLE_TEXT_SIZE 3 + class EDA_DRAW_PANEL; class PLOTTER; @@ -50,6 +61,12 @@ int ReturnGraphicTextWidth( const wxString& aText, int size_h, bool italic, bool * Return the text length of a negable string, excluding the ~ markers */ int NegableTextLength( const wxString& aText ); +/** + * Helper function for texts with over bar, can be used as strut value + * for multiline text (add interline spacing) + */ +int OverbarPositionY( int size_v ); + /** * Function DrawGraphicText * Draw a graphic text (like module texts) diff --git a/include/fpid.h b/include/fpid.h index 221e9c6a1a..657a6a7101 100644 --- a/include/fpid.h +++ b/include/fpid.h @@ -133,8 +133,31 @@ public: const std::string& aRevision ) throw( PARSE_ERROR ); + /** + * Function clear + * clears the contents of the library nickname, footprint name, and revision strings. + */ void clear(); + /** + * Function empty + * @return a boolean true value if the FPID is empty. Otherwise return false. + */ + bool empty() const { return nickname.empty() && footprint.empty() && revision.empty(); } + + /** + * Function Compare + * compares the contents of FPID objects by performing a std::string comparison of the + * library nickname, footprint name, and revision strings respectively. + * + * @param aFPID is the FPID to compare against. + * @return -1 if less than \a aFPID, 1 if greater than \a aFPID, and 0 if equal to \a aFPID. + */ + int compare( const FPID& aFPID ) const; + + bool operator <( const FPID& aFPID ) const { return this->compare( aFPID ) < 0; } + bool operator ==( const FPID& aFPID ) const { return this->compare( aFPID ) == 0; } + #if defined(DEBUG) static void Test(); #endif diff --git a/include/reporter.h b/include/reporter.h new file mode 100644 index 0000000000..9f2081a8a6 --- /dev/null +++ b/include/reporter.h @@ -0,0 +1,89 @@ +#ifndef _REPORTER_H_ +#define _REPORTER_H_ + +/** + * @file reporter.h + * @author Wayne Stambaugh + * @note A special thanks to Dick Hollenbeck who came up with the idea that inspired + * me to write this. + */ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 Wayne Stambaugh + * Copyright (C) 1992-2013 KiCad Developers, see change_log.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +class wxString; +class wxTextCtrl; + + +/** + * Class REPORTER + * is a pure virtual class used to derive REPORTOR objects from. + * + * The purpose of the REPORTER object is to hide an object that take a string as an input + * from other objects. This prevents objects such as wxWidgets UI control internals from + * being exposed to low level KiCad objects dervice from #BOARD_ITEM and #SCH_ITEM. + */ +class REPORTER +{ +public: + /** + * Function Report + * is a pure virtual function to override in the derived object. + * + * @param aText is the string to report. + */ + virtual REPORTER& Report( const wxString& aText ) = 0; + + REPORTER& Report( const char *aText ); + + REPORTER& operator <<( const wxString& aText ) { return Report( aText ); } + + REPORTER& operator <<( const wxChar* aText ) { return Report( wxString( aText ) ); } + + REPORTER& operator <<( wxChar aChar ) { return Report( wxString( aChar ) ); } + + REPORTER& operator <<( const char* aText ) { return Report( aText ); } +}; + + +/** + * Class WX_TEXT_CTRL_REPORTER + * is wrapper for reporting to a wxTextCtrl object. + */ +class WX_TEXT_CTRL_REPORTER : public REPORTER +{ + wxTextCtrl* m_textCtrl; + +public: + WX_TEXT_CTRL_REPORTER( wxTextCtrl* aTextCtrl ) : + REPORTER(), + m_textCtrl( aTextCtrl ) + { + } + + REPORTER& Report( const wxString& aText ); +}; + +#endif // _REPORTER_H_ diff --git a/include/wildcards_and_files_ext.h b/include/wildcards_and_files_ext.h index 9f1368eabb..39dc4f5165 100644 --- a/include/wildcards_and_files_ext.h +++ b/include/wildcards_and_files_ext.h @@ -98,6 +98,7 @@ extern const wxString KiCadFootprintLibFileWildcard; extern const wxString KiCadFootprintLibPathWildcard; extern const wxString GedaPcbFootprintLibFileWildcard; extern const wxString EagleFootprintLibPathWildcard; +extern const wxString TextWildcard; #endif // INCLUDE_WILDCARDS_AND_FILES_EXT_H_ diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index cdc7b19cf7..964b4163d4 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -91,6 +91,19 @@ protected: void updateZoomSelectBox(); virtual void unitsChangeRefresh(); + /** + * Function loadFootprint + * attempts to load \a aFootprintName from the list of libraries. + * + * @param aFootprintName is the name of component footprint to load. + * @return the #MODULE if found or NULL if \a aFootprintName not found in any of the + * libraries. + * @throw IO_ERROR if an I/O error occurs or a #PARSE_ERROR if a file parsing error + * occurs while reading footprint library files. + */ + MODULE* loadFootprint( const wxString& aFootprintName ) + throw( IO_ERROR, PARSE_ERROR ); + public: PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, const wxString& aTitle, diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index dabdb2ece0..95f3c0ac37 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -59,6 +59,10 @@ class PCB_LAYER_WIDGET; class MARKER_PCB; class BOARD_ITEM; class PCB_LAYER_BOX_SELECTOR; +class NETLIST; +class REPORTER; +class PARSE_ERROR; +class IO_ERROR; /** @@ -80,6 +84,18 @@ class PCB_EDIT_FRAME : public PCB_BASE_FRAME /// The auxiliary right vertical tool bar used to access the microwave tools. wxAuiToolBar* m_microWaveToolBar; + /** + * Function loadFootprints + * loads the footprints for each #COMPONENT in \a aNetlist from the list of libraries. + * + * @param aNetlist is the netlist of components to load the footprints into. + * @param aReporter is the #REPORTER object to report to. + * @throw IO_ERROR if an I/O error occurs or a #PARSE_ERROR if a file parsing error + * occurs while reading footprint library files. + */ + void loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) + throw( IO_ERROR, PARSE_ERROR ); + protected: #ifdef KICAD_SCRIPTING_WXPYTHON @@ -414,27 +430,6 @@ public: m_useCmpFileForFpNames = aUseCmpfile; } - /** - * Function Test_Duplicate_Missing_And_Extra_Footprints - * Build a list of duplicate, missing and extra footprints - * from the current board and a netlist netlist : - * Shows 3 lists: - * 1 - duplicate footprints on board - * 2 - missing footprints (found in netlist but not on board) - * 3 - footprints not in netlist but on board - * @param aFilename = the full filename netlist - * @param aDuplicate = the list of duplicate modules to populate - * @param aMissing = the list of missing module references and values - * to populate. For each missing item, the first string is the ref, - * the second is the value. - * @param aNotInNetlist = the list of not-in-netlist modules to populate - * @return true if the netlist was read, or false - */ - bool Test_Duplicate_Missing_And_Extra_Footprints( const wxString& aFilename, - std::vector & aDuplicate, - wxArrayString& aMissing, - std::vector & aNotInNetlist ); - /** * Function OnHotKey. * ** Commands are case insensitive ** @@ -967,6 +962,11 @@ public: */ void Access_to_External_Tool( wxCommandEvent& event ); + /** + * Function ListAndSelectModuleName + * builds and shows a list of existing modules on board that the user can select. + * @return a pointer to the selected module or NULL. + */ MODULE* ListAndSelectModuleName(); /** @@ -1428,29 +1428,31 @@ public: /** * Function ReadPcbNetlist - * Update footprints (load missing footprints and delete on demand extra - * footprints) + * reads \a aNetlistFileName and ppdates the footprints (load missing footprints and + * delete on demand extra footprints) on the board. * Update connectivity info, references, values and "TIME STAMP" - * @param aNetlistFullFilename = netlist file name (*.net) - * @param aCmpFullFileName = cmp/footprint link file name (*.cmp). - * if not found or empty, only the netlist will be used - * @param aMessageWindow = a reference to a wxTextCtrl where to display messages. - * can be NULL + * + * @param aNetlistFileName = netlist file name (*.net) + * @param aCmpFileName = cmp/footprint link file name (*.cmp). + * if not found or empty, only the netlist will be used + * @param aReporter is a pointer to a #REPORTER object to write display messages. + * can be NULL. * @param aChangeFootprint if true, footprints that have changed in netlist will be changed * @param aDeleteBadTracks if true, erroneous tracks will be deleted * @param aDeleteExtraFootprints if true, remove unlocked footprints that are not in netlist - * @param aSelect_By_Timestamp if true, use timestamp instead of reference to identify - * footprints from components (use after reannotation of the - * schematic) - * @return true if Ok + * @param aSelectByTimestamp if true, use timestamp instead of reference to identify + * footprints from components (use after reannotation of the + * schematic) + * @param aIsDryRun performs a dry run without making any changes if true. */ - bool ReadPcbNetlist( const wxString& aNetlistFullFilename, - const wxString& aCmpFullFileName, - wxTextCtrl* aMessageWindow, + void ReadPcbNetlist( const wxString& aNetlistFileName, + const wxString& aCmpFileName, + REPORTER* aReporter, bool aChangeFootprint, bool aDeleteBadTracks, bool aDeleteExtraFootprints, - bool aSelect_By_Timestamp ); + bool aSelectByTimestamp, + bool aIsDryRun ); /** * Function RemoveMisConnectedTracks @@ -1487,8 +1489,7 @@ public: * @param include_fixe = true to orient locked footprints * @return true if some footprints modified, false if no change */ - bool ReOrientModules( const wxString& ModuleMask, int Orient, - bool include_fixe ); + bool ReOrientModules( const wxString& ModuleMask, int Orient, bool include_fixe ); void LockModule( MODULE* aModule, bool aLocked ); void AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb ); diff --git a/include/wxstruct.h b/include/wxstruct.h index 46aaffed42..39a01906e8 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -670,7 +670,6 @@ public: void OnEraseBackground( wxEraseEvent& SizeEvent ); virtual void OnZoom( wxCommandEvent& event ); - void OnGrid( int grid_type ); /** * Function RedrawScreen diff --git a/kicad/dialogs/dialog_template_selector.cpp b/kicad/dialogs/dialog_template_selector.cpp index 800b36e2c1..ec8ef90c20 100644 --- a/kicad/dialogs/dialog_template_selector.cpp +++ b/kicad/dialogs/dialog_template_selector.cpp @@ -114,7 +114,7 @@ void TEMPLATE_WIDGET::OnMouse( wxMouseEvent& event ) void DIALOG_TEMPLATE_SELECTOR::onNotebookResize(wxSizeEvent& event) { - for ( size_t i=0; i < m_notebook->GetPageCount(); i++ ) + for( size_t i=0; i < m_notebook->GetPageCount(); i++ ) { m_panels[i]->SetSize( m_notebook->GetSize().GetWidth() - 6, 140 ); m_panels[i]->m_SizerBase->FitInside( m_panels[i] ); @@ -190,24 +190,29 @@ void DIALOG_TEMPLATE_SELECTOR::AddPage( const wxString& aTitle, wxFileName& aPat m_panels.push_back( p ); // Get a list of files under the template path to include as choices... - wxArrayString files; - wxDir dir, sub; + wxArrayString files; + wxDir dir; - if ( dir.Open( aPath.GetPath() ) ) + wxString path = aPath.GetFullPath(); // caller ensures this ends with file separator. + + if( dir.Open( path ) ) { - wxString filename; - bool cont = dir.GetFirst( &filename, wxEmptyString, wxDIR_FILES | wxDIR_DIRS ); + wxDir sub_dir; + wxString sub_name; + bool cont = dir.GetFirst( &sub_name, wxEmptyString, wxDIR_DIRS ); while( cont ) { - if( sub.Open( aPath.GetPathWithSep() + filename ) ) + wxString sub_full = path + sub_name; + if( sub_dir.Open( sub_full ) ) { - files.Add( filename ); - PROJECT_TEMPLATE* pt = new PROJECT_TEMPLATE( aPath.GetPathWithSep() + filename ); + files.Add( sub_name ); + + PROJECT_TEMPLATE* pt = new PROJECT_TEMPLATE( sub_full ); AddTemplate( m_notebook->GetPageCount() - 1, pt ); } - cont = dir.GetNext( &filename ); + cont = dir.GetNext( &sub_name ); } } } diff --git a/kicad/prjconfig.cpp b/kicad/prjconfig.cpp index 58ab903e17..c33e59f76d 100644 --- a/kicad/prjconfig.cpp +++ b/kicad/prjconfig.cpp @@ -56,10 +56,12 @@ static const wxString GeneralGroupName( wxT( "/general" ) ); PARAM_CFG_ARRAY s_KicadManagerParams; -void KICAD_MANAGER_FRAME::CreateNewProject( const wxString aPrjFullFileName, bool aTemplateSelector = false ) +void KICAD_MANAGER_FRAME::CreateNewProject( const wxString aPrjFullFileName, + bool aTemplateSelector = false ) { - wxString filename; - wxFileName newProjectName = aPrjFullFileName; + wxString filename; + wxFileName newProjectName = aPrjFullFileName; + wxChar sep[2] = { SEP(), 0 }; // nul terminated separator wxChar string. ClearMsg(); @@ -71,50 +73,62 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxString aPrjFullFileName, boo { DIALOG_TEMPLATE_SELECTOR* ps = new DIALOG_TEMPLATE_SELECTOR( this ); - wxFileName templatePath; + wxFileName templatePath; + wxString envStr; + + wxGetEnv( wxT( "KICAD" ), &envStr ); // Add a new tab for system templates - if( ::wxGetEnv( wxT( "KICAD" ), NULL ) ) + if( !envStr.empty() ) { - wxString kicadEnv; - wxGetEnv( wxT( "KICAD"), &kicadEnv ); - templatePath = kicadEnv + SEP() + wxT("template")+SEP(); + // user may or may not have including terminating separator. + if( !envStr.EndsWith( sep ) ) + envStr += sep; + + templatePath = envStr + wxT("template") + sep; } else { - wxFileName templatePath = wxPathOnly(wxStandardPaths::Get().GetExecutablePath()) + - SEP() + wxT( ".." ) + SEP() + wxT( "share" ) + SEP() + wxT( "template" ) + SEP(); + templatePath = wxPathOnly(wxStandardPaths::Get().GetExecutablePath()) + + sep + wxT( ".." ) + sep + wxT( "share" ) + sep + wxT( "template" ) + sep; } ps->AddPage( _( "System Templates" ), templatePath ); // Add a new tab for user templates wxFileName userPath = wxStandardPaths::Get().GetDocumentsDir() + - SEP() + wxT( "kicad" ) + SEP() + wxT( "template" ) + SEP(); + sep + wxT( "kicad" ) + sep + wxT( "template" ) + sep; ps->AddPage( _( "User Templates" ), userPath ); - // Check to see if a custom template location is available and setup a new selection tab - // if there is - wxString envStr; - wxGetEnv( wxT("KICAD_PTEMPLATES"), &envStr ); - wxFileName envPath = envStr; + // Check to see if a custom template location is available and setup a + // new selection tab if there is. + envStr.clear(); + wxGetEnv( wxT( "KICAD_PTEMPLATES" ), &envStr ); - if( envStr != wxEmptyString ) + if( !envStr.empty() ) { + if( !envStr.EndsWith( sep ) ) + envStr += sep; + wxFileName envPath = envStr; - ps->AddPage( _("Portable Templates"), envPath ); + + ps->AddPage( _( "Portable Templates" ), envPath ); } // Show the project template selector dialog int result = ps->ShowModal(); - if( result != wxID_OK ) + if( (result != wxID_OK) || (ps->GetWidget() == NULL) ) { - wxMessageBox( _( "Did not generate new project from template" ), - _( "Cancelled new project from template" ), - wxOK | wxICON_EXCLAMATION, - this ); + if( ps->GetWidget() == NULL ) + { + wxMessageBox( _( "No project template was selected. Cannot generate new " + "project." ), + _( "Error" ), + wxOK | wxICON_ERROR, + this ); + } } else { @@ -123,7 +137,7 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxString aPrjFullFileName, boo if( !ps->GetWidget()->GetTemplate()->CreateProject( newProjectName ) ) { wxMessageBox( _( "Problem whilst creating new project from template!" ), - _( "Could not generate new project" ), + _( "Template Error" ), wxOK | wxICON_ERROR, this ); } @@ -196,17 +210,19 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) // Check if the project directory is empty wxDir directory ( m_ProjectFileName.GetPath() ); + if( directory.HasFiles() ) { - wxString msg = _( "The selected directory is not empty. " - "We recommend you create projects in their own clean directory.\n\n" - "Do you want to create a new empty directory for the project?" ); + wxString msg = _( "The selected directory is not empty. We recommend you " + "create projects in their own clean directory.\n\nDo you " + "want to create a new empty directory for the project?" ); if( IsOK( this, msg ) ) { // Append a new directory with the same name of the project file // and try to create it m_ProjectFileName.AppendDir( m_ProjectFileName.GetName() ); + if( !wxMkdir( m_ProjectFileName.GetPath() ) ) // There was a problem, undo m_ProjectFileName.RemoveLastDir(); @@ -236,7 +252,7 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) if( !m_ProjectFileName.FileExists() && !filename.IsSameAs( nameless_prj ) ) { wxString msg; - msg.Printf( _( "KiCad project file <%s> not found" ), + msg.Printf( _( "KiCad project file <%s> not found" ), GetChars( m_ProjectFileName.GetFullPath() ) ); DisplayError( this, msg ); @@ -256,6 +272,7 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) SetTitle( title ); UpdateFileHistory( m_ProjectFileName.GetFullPath() ); m_LeftWin->ReCreateTreePrj(); + #ifdef KICAD_USE_FILES_WATCHER // Rebuild the list of watched paths. // however this is possible only when the main loop event handler is running, @@ -263,6 +280,7 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED, ID_INIT_WATCHED_PATHS ); wxPostEvent( this, cmd); #endif + wxString msg; msg.Format( _( "Working dir: <%s>\nProject: <%s>\n" ), GetChars( m_ProjectFileName.GetPath() ), diff --git a/kicad/project_template.h b/kicad/project_template.h index c97ba5e4ad..0014703ba9 100644 --- a/kicad/project_template.h +++ b/kicad/project_template.h @@ -96,7 +96,7 @@ wxStandardPaths::GetExecutableDir()/../share/template/ wxStandardPaths::GetUserDataDir()/templates/ - wxGetEnv(wxT("KICAD_TEMPLATES")) + wxGetEnv(wxT("KICAD_PTEMPLATES")) wxGetEnv(wxT("KICAD"))/template/ */ diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp index 63ef5b328f..451d016573 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 17 2012) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "UnitSelector.h" + #include "pcb_calculator_frame_base.h" #include "../bitmaps/arrow_bottom.xpm" @@ -74,7 +76,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow bSizerRegulRight = new wxBoxSizer( wxVERTICAL ); wxFlexGridSizer* fgSizerRegParams; - fgSizerRegParams = new wxFlexGridSizer( 5, 4, 0, 0 ); + fgSizerRegParams = new wxFlexGridSizer( 6, 4, 0, 0 ); fgSizerRegParams->AddGrowableCol( 2 ); fgSizerRegParams->SetFlexibleDirection( wxBOTH ); fgSizerRegParams->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); @@ -88,6 +90,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerRegParams->Add( m_labelRegultR1, 0, wxALL, 5 ); m_RegulR1Value = new wxTextCtrl( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_RegulR1Value->SetMaxLength( 0 ); fgSizerRegParams->Add( m_RegulR1Value, 0, wxALL|wxEXPAND, 5 ); m_UnitRegultR11 = new wxStaticText( m_panelRegulators, wxID_ANY, _("KOhm"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -102,6 +105,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerRegParams->Add( m_labelRegultR2, 0, wxALL, 5 ); m_RegulR2Value = new wxTextCtrl( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_RegulR2Value->SetMaxLength( 0 ); fgSizerRegParams->Add( m_RegulR2Value, 0, wxALL|wxEXPAND, 5 ); m_UnitRegultR1 = new wxStaticText( m_panelRegulators, wxID_ANY, _("KOhm"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -116,6 +120,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerRegParams->Add( m_labelVout, 0, wxALL, 5 ); m_RegulVoutValue = new wxTextCtrl( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_RegulVoutValue->SetMaxLength( 0 ); fgSizerRegParams->Add( m_RegulVoutValue, 0, wxALL|wxEXPAND, 5 ); m_unitsVout = new wxStaticText( m_panelRegulators, wxID_ANY, _("V"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -132,6 +137,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerRegParams->Add( m_labelVRef, 0, wxALL, 5 ); m_RegulVrefValue = new wxTextCtrl( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_RegulVrefValue->SetMaxLength( 0 ); fgSizerRegParams->Add( m_RegulVrefValue, 0, wxALL|wxEXPAND, 5 ); m_unitsVref = new wxStaticText( m_panelRegulators, wxID_ANY, _("V"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -148,6 +154,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerRegParams->Add( m_RegulIadjTitle, 0, wxALL, 5 ); m_RegulIadjValue = new wxTextCtrl( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_RegulIadjValue->SetMaxLength( 0 ); fgSizerRegParams->Add( m_RegulIadjValue, 0, wxALL|wxEXPAND, 5 ); m_IadjUnitLabel = new wxStaticText( m_panelRegulators, wxID_ANY, _("uA"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -196,6 +203,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow bSizerDataFile = new wxBoxSizer( wxHORIZONTAL ); m_regulators_fileNameCtrl = new wxTextCtrl( m_panelRegulators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_regulators_fileNameCtrl->SetMaxLength( 0 ); bSizerDataFile->Add( m_regulators_fileNameCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_buttonDataFile = new wxButton( m_panelRegulators, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -264,6 +272,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTWprms->Add( m_staticTextCurrent, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_TrackCurrentValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_TrackCurrentValue->SetMaxLength( 0 ); fgSizerTWprms->Add( m_TrackCurrentValue, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_staticText62 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -275,6 +284,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTWprms->Add( m_staticText63, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_TrackDeltaTValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_TrackDeltaTValue->SetMaxLength( 0 ); fgSizerTWprms->Add( m_TrackDeltaTValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_staticText64 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("deg C"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -286,6 +296,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTWprms->Add( m_staticText65, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); m_TrackThicknessValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_TrackThicknessValue->SetMaxLength( 0 ); fgSizerTWprms->Add( m_TrackThicknessValue, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); wxArrayString m_TW_CuThickness_choiceUnitChoices; @@ -298,6 +309,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTWprms->Add( m_staticText66, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); m_TrackLengthValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_TrackLengthValue->SetMaxLength( 0 ); fgSizerTWprms->Add( m_TrackLengthValue, 0, wxEXPAND|wxALL, 5 ); wxArrayString m_TW_CuLength_choiceUnitChoices; @@ -334,6 +346,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTW_Results->Add( m_staticTextWidth, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_ExtTrackWidthValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ExtTrackWidthValue->SetMaxLength( 0 ); fgSizerTW_Results->Add( m_ExtTrackWidthValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); wxArrayString m_TW_ExtTrackWidth_choiceUnitChoices; @@ -346,6 +359,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTW_Results->Add( m_staticTextArea, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_ExtTrackAreaValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ExtTrackAreaValue->SetMaxLength( 0 ); fgSizerTW_Results->Add( m_ExtTrackAreaValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_ExtTrackAreaUnitLabel = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("mm ^ 2"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -357,6 +371,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTW_Results->Add( m_staticText651, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); m_ExtTrackResistValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ExtTrackResistValue->SetMaxLength( 0 ); fgSizerTW_Results->Add( m_ExtTrackResistValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_staticText84 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -368,6 +383,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTW_Results->Add( m_staticText661, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); m_ExtTrackVDropValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ExtTrackVDropValue->SetMaxLength( 0 ); fgSizerTW_Results->Add( m_ExtTrackVDropValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_staticText83 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("Volt"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -379,6 +395,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTW_Results->Add( m_staticText79, 0, wxRIGHT|wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); m_ExtTrackLossValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ExtTrackLossValue->SetMaxLength( 0 ); fgSizerTW_Results->Add( m_ExtTrackLossValue, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_staticText791 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("Watt"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -405,6 +422,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTW_Results1->Add( m_staticTextWidth11, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_IntTrackWidthValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_IntTrackWidthValue->SetMaxLength( 0 ); fgSizerTW_Results1->Add( m_IntTrackWidthValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); wxArrayString m_TW_IntTrackWidth_choiceUnitChoices; @@ -417,6 +435,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTW_Results1->Add( m_staticTextArea1, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_IntTrackAreaValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_IntTrackAreaValue->SetMaxLength( 0 ); fgSizerTW_Results1->Add( m_IntTrackAreaValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_IntTrackAreaUnitLabel = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("mm ^ 2"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -428,6 +447,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTW_Results1->Add( m_staticText6511, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); m_IntTrackResistValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_IntTrackResistValue->SetMaxLength( 0 ); fgSizerTW_Results1->Add( m_IntTrackResistValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_staticText841 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("Ohm"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -439,6 +459,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTW_Results1->Add( m_staticText6611, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); m_IntTrackVDropValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_IntTrackVDropValue->SetMaxLength( 0 ); fgSizerTW_Results1->Add( m_IntTrackVDropValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_staticText831 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("Volt"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -450,6 +471,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerTW_Results1->Add( m_staticText792, 0, wxRIGHT|wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); m_IntTrackLossValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_IntTrackLossValue->SetMaxLength( 0 ); fgSizerTW_Results1->Add( m_IntTrackLossValue, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_staticText7911 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("Watt"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -490,6 +512,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow bLeftSizerElectricalClearance->Add( m_staticText891, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_ElectricalSpacingVoltage = new wxTextCtrl( m_panelElectricalSpacing, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ElectricalSpacingVoltage->SetMaxLength( 0 ); bLeftSizerElectricalClearance->Add( m_ElectricalSpacingVoltage, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_buttonElectSpacingRefresh = new wxButton( m_panelElectricalSpacing, wxID_ANY, _("Update Values"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -602,6 +625,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerSubstPrms->Add( m_EpsilonR_label, 0, wxRIGHT|wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); m_Value_EpsilonR = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Value_EpsilonR->SetMaxLength( 0 ); fgSizerSubstPrms->Add( m_Value_EpsilonR, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_button_EpsilonR = new wxButton( m_panelTransline, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); @@ -612,6 +636,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerSubstPrms->Add( m_TanD_label, 0, wxRIGHT|wxLEFT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); m_Value_TanD = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Value_TanD->SetMaxLength( 0 ); fgSizerSubstPrms->Add( m_Value_TanD, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_button_TanD = new wxButton( m_panelTransline, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); @@ -624,6 +649,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerSubstPrms->Add( m_Rho_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_Value_Rho = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Value_Rho->SetMaxLength( 0 ); fgSizerSubstPrms->Add( m_Value_Rho, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_button_Rho = new wxButton( m_panelTransline, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); @@ -634,6 +660,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerSubstPrms->Add( m_substrate_prm4_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_Substrate_prm4_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Substrate_prm4_Value->SetMaxLength( 0 ); fgSizerSubstPrms->Add( m_Substrate_prm4_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); wxArrayString m_SubsPrm4_choiceUnitChoices; @@ -646,6 +673,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerSubstPrms->Add( m_substrate_prm5_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_Substrate_prm5_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Substrate_prm5_Value->SetMaxLength( 0 ); fgSizerSubstPrms->Add( m_Substrate_prm5_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); wxArrayString m_SubsPrm5_choiceUnitChoices; @@ -658,6 +686,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerSubstPrms->Add( m_substrate_prm6_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_Substrate_prm6_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Substrate_prm6_Value->SetMaxLength( 0 ); fgSizerSubstPrms->Add( m_Substrate_prm6_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); wxArrayString m_SubsPrm6_choiceUnitChoices; @@ -670,6 +699,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerSubstPrms->Add( m_substrate_prm7_label, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); m_Substrate_prm7_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Substrate_prm7_Value->SetMaxLength( 0 ); fgSizerSubstPrms->Add( m_Substrate_prm7_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); wxArrayString m_SubsPrm7_choiceUnitChoices; @@ -682,6 +712,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerSubstPrms->Add( m_substrate_prm8_label, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); m_Substrate_prm8_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Substrate_prm8_Value->SetMaxLength( 0 ); fgSizerSubstPrms->Add( m_Substrate_prm8_Value, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); wxArrayString m_SubsPrm8_choiceUnitChoices; @@ -694,6 +725,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerSubstPrms->Add( m_substrate_prm9_label, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_Substrate_prm9_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Substrate_prm9_Value->SetMaxLength( 0 ); fgSizerSubstPrms->Add( m_Substrate_prm9_Value, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); wxArrayString m_SubsPrm9_choiceUnitChoices; @@ -721,6 +753,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizeCmpPrms->Add( m_Frequency_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_Value_Frequency_Ctrl = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Value_Frequency_Ctrl->SetMaxLength( 0 ); fgSizeCmpPrms->Add( m_Value_Frequency_Ctrl, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); wxArrayString m_choiceUnit_FrequencyChoices; @@ -757,6 +790,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerPhysPrms->Add( m_phys_prm1_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_Phys_prm1_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Phys_prm1_Value->SetMaxLength( 0 ); fgSizerPhysPrms->Add( m_Phys_prm1_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); wxArrayString m_choiceUnit_Param1Choices; @@ -772,6 +806,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerPhysPrms->Add( m_phys_prm2_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_Phys_prm2_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Phys_prm2_Value->SetMaxLength( 0 ); fgSizerPhysPrms->Add( m_Phys_prm2_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); wxArrayString m_choiceUnit_Param2Choices; @@ -787,6 +822,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerPhysPrms->Add( m_phys_prm3_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_Phys_prm3_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Phys_prm3_Value->SetMaxLength( 0 ); fgSizerPhysPrms->Add( m_Phys_prm3_Value, 0, wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); wxArrayString m_choiceUnit_Param3Choices; @@ -844,6 +880,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerResults->Add( m_elec_prm1_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_Elec_prm1_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Elec_prm1_Value->SetMaxLength( 0 ); fgSizerResults->Add( m_Elec_prm1_Value, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 ); wxArrayString m_choiceUnit_ElecPrm1Choices; @@ -856,6 +893,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerResults->Add( m_elec_prm2_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_Elec_prm2_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Elec_prm2_Value->SetMaxLength( 0 ); fgSizerResults->Add( m_Elec_prm2_Value, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); wxArrayString m_choiceUnit_ElecPrm2Choices; @@ -868,6 +906,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerResults->Add( m_elec_prm3_label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); m_Elec_prm3_Value = new wxTextCtrl( m_panelTransline, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Elec_prm3_Value->SetMaxLength( 0 ); fgSizerResults->Add( m_Elec_prm3_Value, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); wxArrayString m_choiceUnit_ElecPrm3Choices; @@ -996,6 +1035,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerAttPrms->Add( m_attenuationLabel, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_AttValueCtrl = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_AttValueCtrl->SetMaxLength( 0 ); fgSizerAttPrms->Add( m_AttValueCtrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_attUnit = new wxStaticText( m_panelAttenuators, wxID_ANY, _("dB"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -1007,6 +1047,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerAttPrms->Add( m_attenuationZinLabel, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_ZinValueCtrl = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ZinValueCtrl->SetMaxLength( 0 ); fgSizerAttPrms->Add( m_ZinValueCtrl, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_attZinUnit = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -1018,6 +1059,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerAttPrms->Add( m_ZoutLabel, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_ZoutValueCtrl = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ZoutValueCtrl->SetMaxLength( 0 ); fgSizerAttPrms->Add( m_ZoutValueCtrl, 0, wxALL, 5 ); m_attZoutUnit = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -1056,6 +1098,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerAttResults->Add( m_attenuatorR1Label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_Att_R1_Value = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Att_R1_Value->SetMaxLength( 0 ); fgSizerAttResults->Add( m_Att_R1_Value, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_attR1Unit = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -1067,6 +1110,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerAttResults->Add( m_attenuatorR2Label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_Att_R2_Value = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Att_R2_Value->SetMaxLength( 0 ); fgSizerAttResults->Add( m_Att_R2_Value, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_attR2Unit1 = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -1078,6 +1122,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow fgSizerAttResults->Add( m_attenuatorR3Label, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); m_Att_R3_Value = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_Att_R3_Value->SetMaxLength( 0 ); fgSizerAttResults->Add( m_Att_R3_Value, 0, wxALL, 5 ); m_attR3Unit = new wxStaticText( m_panelAttenuators, wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -1095,6 +1140,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow bMiddleSizerAtt->Add( m_staticTextAttMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_Attenuator_Messages = new wxTextCtrl( m_panelAttenuators, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); + m_Attenuator_Messages->SetMaxLength( 0 ); bMiddleSizerAtt->Add( m_Attenuator_Messages, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp index 3103035ae3..e583f509b3 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp @@ -25,62 +25,28 @@ 0 0 - 1 - 1 - 1 - 1 - 0 - - - - + wxAUI_MGR_DEFAULT - - 1 wxBOTH - 0 - 1 1 - 0 - Dock - 0 - Left 1 impl_virtual - 1 - 0 0 wxID_ANY - - 0 - - 0 - 1 PCB_CALCULATOR_FRAME_BASE - 1 - - - 1 - Resizable - 1 670,489 wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER Pcb Calculator - 0 - - wxFILTER_NONE - wxDefaultValidator - wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL @@ -121,59 +87,24 @@ - 1 - 1 - 1 - 1 - - - - - - - 1 - 0 - 1 1 - 0 - Dock - 0 - Left 1 - 1 - 0 0 wxID_ANY MyMenuBar - - 0 - - 0 - 1 m_menubar - 1 - - protected - 1 - Resizable - 1 - 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -202,59 +133,24 @@ - 1 - 1 - 1 - 1 - - - - - - - 1 - 0 - 1 1 - 0 - Dock - 0 - Left 1 1 - 1 - 0 0 wxID_ANY - - 0 - - 0 - 1 m_statusBar - 1 - - protected - 1 - Resizable - 1 wxST_SIZEGRIP - 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -341,10 +237,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -425,10 +317,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxTAB_TRAVERSAL @@ -541,10 +429,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -626,10 +510,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -736,10 +616,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -796,7 +672,7 @@ fgSizerRegParams wxFLEX_GROWMODE_SPECIFIED none - 5 + 6 0 5 @@ -940,10 +816,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -1118,10 +990,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -1293,10 +1161,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -1471,10 +1335,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -1646,10 +1506,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -1824,10 +1680,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -1921,10 +1773,6 @@ 0 The internal reference voltage of the regulator. Should not be 0. - - wxFILTER_NONE - wxDefaultValidator - @@ -2099,10 +1947,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -2196,10 +2040,6 @@ 0 For 3 terminal regulators only, the Adjust pin current. - - wxFILTER_NONE - wxDefaultValidator - @@ -2374,10 +2214,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -2471,10 +2307,6 @@ 0 Type of the regulator. There are 2 types: - regulators which have a dedicted sense pin for the voltage regulation. - 3 terminal pins. - - wxFILTER_NONE - wxDefaultValidator - @@ -2846,10 +2678,6 @@ 0 The name of the data file which stores known regulators parameters. - - wxFILTER_NONE - wxDefaultValidator - @@ -3400,10 +3228,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -3490,10 +3314,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxTAB_TRAVERSAL @@ -3591,10 +3411,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -3694,10 +3510,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -3872,10 +3684,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -3959,10 +3767,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -4137,10 +3941,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -4224,10 +4024,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -4490,10 +4286,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -4757,10 +4549,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxSIMPLE_BORDER @@ -4973,10 +4761,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -5239,10 +5023,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -5417,10 +5197,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -5504,10 +5280,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -5682,10 +5454,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -5769,10 +5537,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -5947,10 +5711,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -6034,10 +5794,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -6212,10 +5968,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -6331,10 +6083,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -6597,10 +6345,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -6775,10 +6519,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -6862,10 +6602,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -7040,10 +6776,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -7127,10 +6859,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -7305,10 +7033,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -7392,10 +7116,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -7570,10 +7290,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -7664,10 +7380,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxTAB_TRAVERSAL @@ -7849,10 +7561,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -7935,10 +7643,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -8212,10 +7916,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -8328,10 +8028,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -8446,10 +8142,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -8536,10 +8228,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxTAB_TRAVERSAL @@ -8722,10 +8410,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxTAB_TRAVERSAL @@ -8809,10 +8493,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -8932,10 +8612,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -9198,10 +8874,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -9464,10 +9136,6 @@ 0 Specific resistance in ohms * meters - - wxFILTER_NONE - wxDefaultValidator - @@ -9730,10 +9398,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -9996,10 +9660,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -10262,10 +9922,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -10528,10 +10184,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -10794,10 +10446,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -11060,10 +10708,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -11358,10 +11002,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -11676,10 +11316,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -12030,10 +11666,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -12384,10 +12016,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -12683,10 +12311,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -12944,10 +12568,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -13062,10 +12682,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -13328,10 +12944,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -13594,10 +13206,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -13892,10 +13500,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -13979,10 +13583,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -14066,10 +13666,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -14153,10 +13749,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -14240,10 +13832,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -14327,10 +13915,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -14414,10 +13998,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -14501,10 +14081,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -14588,10 +14164,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -14675,10 +14247,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -14762,10 +14330,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -14849,10 +14413,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -14936,10 +14496,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -15023,10 +14579,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -15117,10 +14669,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxTAB_TRAVERSAL @@ -15306,10 +14854,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxSIMPLE_BORDER|wxTAB_TRAVERSAL @@ -15431,10 +14975,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -15609,10 +15149,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -15696,10 +15232,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -15874,10 +15406,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -15961,10 +15489,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -16139,10 +15663,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -16326,10 +15846,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -16442,10 +15958,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -16620,10 +16132,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -16707,10 +16215,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -16885,10 +16389,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -16972,10 +16472,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -17150,10 +16646,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -17241,10 +16733,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -17431,10 +16919,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxSIMPLE_BORDER|wxTAB_TRAVERSAL @@ -17520,10 +17004,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxTAB_TRAVERSAL @@ -17715,10 +17195,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -17802,10 +17278,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -17889,10 +17361,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -17976,10 +17444,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -18063,10 +17527,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -18150,10 +17610,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -18236,10 +17692,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -18321,10 +17773,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -18406,10 +17854,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -18491,10 +17935,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -18576,10 +18016,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -18661,10 +18097,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -18750,10 +18182,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxTAB_TRAVERSAL @@ -18936,10 +18364,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -19052,10 +18476,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -19168,10 +18588,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxTAB_TRAVERSAL diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.h b/pcb_calculator/dialogs/pcb_calculator_frame_base.h index a4e7f80ae5..370750eb6a 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.h +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 17 2012) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,7 +11,11 @@ #include #include #include -#include "UnitSelector.h" +class UNIT_SELECTOR_ANGLE; +class UNIT_SELECTOR_FREQUENCY; +class UNIT_SELECTOR_LEN; +class UNIT_SELECTOR_RESISTOR; + #include #include #include diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 3d2226f6e6..09925f289a 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -181,9 +181,6 @@ set(PCBNEW_CLASS_SRCS muonde.cpp muwave_command.cpp netlist.cpp - netlist_reader_common.cpp - netlist_reader_firstformat.cpp - netlist_reader_kicad.cpp onleftclick.cpp onrightclick.cpp pad_edition_functions.cpp diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index eb7c6d540b..6d9fbd1d25 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -39,6 +39,8 @@ #include #include #include +#include +#include #include #include @@ -1411,6 +1413,26 @@ MODULE* BOARD::FindModuleByReference( const wxString& aReference ) const } +MODULE* BOARD::FindModule( const wxString& aRefOrTimeStamp, bool aSearchByTimeStamp ) +{ + for( MODULE* module = m_Modules; module != NULL; module = module->Next() ) + { + if( aSearchByTimeStamp ) + { + if( aRefOrTimeStamp.CmpNoCase( module->GetPath() ) == 0 ) + return module; + } + else + { + if( aRefOrTimeStamp.CmpNoCase( module->GetReference() ) == 0 ) + return module; + } + } + + return NULL; +} + + // Sort nets by decreasing pad count static bool s_SortByNodes( const NETINFO_ITEM* a, const NETINFO_ITEM* b ) { @@ -2310,6 +2332,251 @@ bool BOARD::NormalizeAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList, ZONE_CONTAI } +void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) +{ + unsigned i; + wxPoint bestPosition; + wxString msg; + D_PAD* pad; + MODULE* footprint; + COMPONENT* component; + COMPONENT_NET net; + + if( !IsEmpty() ) + { + // Position new components below any existing board features. + EDA_RECT bbbox = ComputeBoundingBox( true ); + + if( bbbox.GetWidth() || bbbox.GetHeight() ) + { + bestPosition.x = bbbox.Centre().x; + bestPosition.y = bbbox.GetBottom() + DMils2iu( 5000 ); + } + } + else + { + // Position new components in the center of the page when the board is empty. + wxSize pageSize = m_paper.GetSizeIU(); + + bestPosition.x = pageSize.GetWidth() / 2; + bestPosition.y = pageSize.GetHeight() / 2; + } + + m_Status_Pcb = 0; + + for( i = 0; i < aNetlist.GetCount(); i++ ) + { + component = aNetlist.GetComponent( i ); + + if( aReporter ) + { + msg.Printf( _( "Checking netlist component footprint \"%s:%s:%s\".\n" ), + GetChars( component->GetReference() ), + GetChars( component->GetTimeStamp() ), + GetChars( component->GetFootprintLibName() ) ); + aReporter->Report( msg ); + } + + if( aNetlist.IsFindByTimeStamp() ) + footprint = FindModule( aNetlist.GetComponent( i )->GetTimeStamp(), true ); + else + footprint = FindModule( aNetlist.GetComponent( i )->GetReference() ); + + if( footprint == NULL ) // A new footprint. + { + if( aReporter ) + { + msg.Printf( _( "Adding new component \"%s:%s\" footprint \"%s\".\n" ), + GetChars( component->GetReference() ), + GetChars( component->GetTimeStamp() ), + GetChars( component->GetFootprintLibName() ) ); + aReporter->Report( msg ); + } + + // Owned by NETLIST, can only copy and read it. + footprint = component->GetModule(); + + wxCHECK2_MSG( footprint != NULL, continue, + wxString::Format( wxT( "No footprint loaded for component \"%s\"." ), + GetChars( component->GetReference() ) ) ); + + if( !aNetlist.IsDryRun() ) + { + footprint = new MODULE( *footprint ); + footprint->SetParent( this ); + footprint->SetPosition( bestPosition ); + footprint->SetTimeStamp( GetNewTimeStamp() ); + Add( footprint, ADD_APPEND ); + } + } + else // An existing footprint. + { + // Test for footprint change. + if( !component->GetFootprintLibName().IsEmpty() && + footprint->GetLibRef() != component->GetFootprintLibName() ) + { + if( aNetlist.GetReplaceFootprints() ) + { + if( aReporter ) + { + msg.Printf( _( "Replacing component \"%s:%s\" footprint \"%s\" with \"%s\".\n" ), + GetChars( footprint->GetReference() ), + GetChars( footprint->GetPath() ), + GetChars( footprint->GetLibRef() ), + GetChars( component->GetFootprintLibName() ) ); + aReporter->Report( msg ); + } + + if( !aNetlist.IsDryRun() ) + { + wxASSERT( footprint != NULL ); + MODULE* newFootprint = new MODULE( *component->GetModule() ); + + if( aNetlist.IsFindByTimeStamp() ) + newFootprint->SetReference( footprint->GetReference() ); + else + newFootprint->SetPath( footprint->GetPath() ); + + footprint->CopyNetlistSettings( newFootprint ); + Remove( footprint ); + Add( newFootprint, ADD_APPEND ); + footprint = newFootprint; + } + } + } + + // Test for reference designator field change. + if( footprint->GetReference() != component->GetReference() ) + { + if( aReporter ) + { + msg.Printf( _( "Changing footprint \"%s:%s\" reference to \"%s\".\n" ), + GetChars( footprint->GetReference() ), + GetChars( footprint->GetPath() ), + GetChars( component->GetReference() ) ); + aReporter->Report( msg ); + } + + if( !aNetlist.IsDryRun() ) + footprint->SetReference( component->GetReference() ); + } + + // Test for value field change. + if( footprint->GetValue() != component->GetValue() ) + { + if( aReporter ) + { + msg.Printf( _( "Changing footprint \"%s:%s\" value from \"%s\" to \"%s\".\n" ), + GetChars( footprint->GetReference() ), + GetChars( footprint->GetPath() ), + GetChars( footprint->GetValue() ), + GetChars( component->GetValue() ) ); + aReporter->Report( msg ); + } + + if( !aNetlist.IsDryRun() ) + footprint->SetValue( component->GetValue() ); + } + + // Test for time stamp change. + if( footprint->GetPath() != component->GetTimeStamp() ) + { + if( aReporter ) + { + msg.Printf( _( "Changing footprint path \"%s:%s\" to \"%s\".\n" ), + GetChars( footprint->GetReference() ), + GetChars( footprint->GetPath() ), + GetChars( component->GetTimeStamp() ) ); + aReporter->Report( msg ); + } + + if( !aNetlist.IsDryRun() ) + footprint->SetPath( component->GetTimeStamp() ); + } + } + + wxASSERT( component != NULL ); + + // At this point, the component footprint is updated. Now update the nets. + for( pad = footprint->Pads(); pad; pad = pad->Next() ) + { + net = component->GetNet( pad->GetPadName() ); + + if( !net.IsValid() ) // Footprint pad had no net. + { + if( !pad->GetNetname().IsEmpty() ) + { + if( aReporter ) + { + msg.Printf( _( "Clearing component \"%s:%s\" pin \"%s\" net name.\n" ), + GetChars( footprint->GetReference() ), + GetChars( footprint->GetPath() ), + GetChars( pad->GetPadName() ) ); + aReporter->Report( msg ); + } + + if( !aNetlist.IsDryRun() ) + pad->SetNetname( wxEmptyString ); + } + } + else // Footprint pad has a net. + { + if( net.GetNetName() != pad->GetNetname() ) + { + if( aReporter ) + { + msg.Printf( _( "Changing component \"%s:%s\" pin \"%s\" net name from " + "\"%s\" to \"%s\".\n" ), + GetChars( footprint->GetReference() ), + GetChars( footprint->GetPath() ), + GetChars( pad->GetPadName() ), + GetChars( pad->GetNetname() ), + GetChars( net.GetNetName() ) ); + aReporter->Report( msg ); + } + + if( !aNetlist.IsDryRun() ) + pad->SetNetname( net.GetNetName() ); + } + } + } + } + + // Remove all components not in the netlist. + if( aNetlist.GetDeleteExtraFootprints() ) + { + MODULE* nextModule; + + for( MODULE* module = m_Modules; module != NULL; module = nextModule ) + { + nextModule = module->Next(); + + if( module->IsLocked() ) + continue; + + if( aNetlist.IsFindByTimeStamp() ) + component = aNetlist.GetComponentByTimeStamp( module->GetPath() ); + else + component = aNetlist.GetComponentByReference( module->GetReference() ); + + if( component == NULL ) + { + if( aReporter ) + { + msg.Printf( _( "Removing footprint \"%s:%s\".\n" ), + GetChars( module->GetReference() ), + GetChars( module->GetPath() ) ); + aReporter->Report( msg ); + } + + if( !aNetlist.IsDryRun() ) + module->DeleteStructure(); + } + } + } +} + + #if defined(DEBUG) void BOARD::Show( int nestLevel, std::ostream& os ) const diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index bd0b33ea4e..6e28cb9028 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + /** * @file class_board.h * @brief Class BOARD to handle a board. @@ -30,6 +54,8 @@ class TRACK; class D_PAD; class MARKER_PCB; class MSG_PANEL_ITEM; +class NETLIST; +class REPORTER; // non-owning container of item candidates when searching for items on the same track. @@ -282,6 +308,12 @@ public: BOARD(); ~BOARD(); + bool IsEmpty() const + { + return m_Drawings.GetCount() == 0 && m_Modules.GetCount() == 0 && + m_Track.GetCount() == 0 && m_Zone.GetCount() == 0; + } + void Move( const wxPoint& aMoveVector ); // overload void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; } @@ -849,6 +881,47 @@ public: */ MODULE* FindModuleByReference( const wxString& aReference ) const; + /** + * Function FindModule + * searches for a module matching \a aRefOrTimeStamp depending on the state of + * \a aSearchByTimeStamp. + * @param aRefOrTimeStamp is the search string. + * @param aSearchByTimeStamp searches by the module time stamp value if true. Otherwise + * search by reference designator. + * @return the module found or NULL if not module is found that meets the search criteria. + */ + MODULE* FindModule( const wxString& aRefOrTimeStamp, bool aSearchByTimeStamp = false ); + + /** + * Function ReplaceNetlist + * updates the #BOARD according to \a aNetlist. + * + * The changes are made to the board are as follows they are not disabled in the status + * settings in the #NETLIST: + * - If a new component is found in the #NETLIST and not in the #BOARD, it is added + * to the #BOARD. + * - If a the component in the #NETLIST is already on the #BOARD, then one or more of the + * following actions can occur: + * + If the footprint name in the #NETLIST does not match the footprint name on the + * #BOARD, the footprint on the #BOARD is replaced with the footprint specified in + * the #NETLIST and the proper parameters are copied from the existing footprint. + * + If the reference designator in the #NETLIST does not match the reference designator + * on the #BOARD, the reference designator is updated from the #NETLIST. + * + If the value field in the #NETLIST does not match the value field on the #BOARD, + * the value field is updated from the #NETLIST. + * + If the time stamp in the #NETLIST does not match the time stamp on the #BOARD, + * the time stamp is updated from the #NETLIST. + * - After each footprint is added or update as described above, each footprint pad net + * name is compared and updated to the value defined in the #NETLIST. + * - After all of the footprints have been added, updated, and net names properly set, + * any extra unlock footprints are removed from the #BOARD. + * + * @param aNetlist is the new netlist to revise the contents of the #BOARD with. + * @param aReporter is a #REPORTER object to report the changes \a aNetlist makes to + * the #BOARD. If NULL, no change reporting occurs. + */ + void ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter = NULL ); + /** * Function ReturnSortedNetnamesList * @param aNames An array string to fill with net names. @@ -1229,12 +1302,12 @@ public: /** * Function GetPadFast - * return pad found at \a aPosition on \a aLayer using the fast search method. + * return pad found at \a aPosition on \a aLayerMask using the fast search method. *

* The fast search method only works if the pad list has already been built. *

* @param aPosition A wxPoint object containing the position to hit test. - * @param aLayer A layer or layers to mask the hit test. + * @param aLayerMask A layer or layers to mask the hit test. * @return A pointer to a D_PAD object if found or NULL if not found. */ D_PAD* GetPadFast( const wxPoint& aPosition, LAYER_MSK aLayerMask ); diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 1ecd428739..82b37f41f7 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -320,8 +320,7 @@ void DRAWSEGMENT::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) wxString msg; wxString coords; - BOARD* board = (BOARD*) m_Parent; - wxASSERT( board ); + wxASSERT( m_Parent ); msg = wxT( "DRAWING" ); diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index b000a609ca..3324585d52 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -290,15 +290,45 @@ void MODULE::Copy( MODULE* aModule ) } -/** - * Function Draw - * Draws the footprint to the current Device Context - * @param aPanel = draw panel, Used to know the clip box - * @param aDC = Current Device Context - * @param aDrawMode = GR_OR, GR_XOR.. - * @param aOffset = draw offset (usually wxPoint(0,0) - */ -void MODULE::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aOffset ) +void MODULE::CopyNetlistSettings( MODULE* aModule ) +{ + // Don't do anything foolish like trying to copy to yourself. + wxCHECK_RET( aModule != NULL && aModule != this, wxT( "Cannot copy to NULL or yourself." ) ); + + // Not sure what to do with the value field. Use netlist for now. + aModule->SetPosition( GetPosition() ); + + if( aModule->GetLayer() != GetLayer() ) + aModule->Flip( aModule->GetPosition() ); + + if( aModule->GetOrientation() != GetOrientation() ) + aModule->Rotate( aModule->GetPosition(), GetOrientation() ); + + aModule->SetLocalSolderMaskMargin( GetLocalSolderMaskMargin() ); + aModule->SetLocalClearance( GetLocalClearance() ); + aModule->SetLocalSolderPasteMargin( GetLocalSolderPasteMargin() ); + aModule->SetLocalSolderPasteMarginRatio( GetLocalSolderPasteMarginRatio() ); + aModule->SetZoneConnection( GetZoneConnection() ); + aModule->SetThermalWidth( GetThermalWidth() ); + aModule->SetThermalGap( GetThermalGap() ); + + for( D_PAD* pad = Pads(); pad; pad = pad->Next() ) + { + D_PAD* newPad = aModule->FindPadByName( pad->GetPadName() ); + + if( newPad ) + pad->CopyNetlistSettings( newPad ); + } + + // Not sure about copying description, keywords, 3D models or any other + // local user changes to footprint. Stick with the new footprint settings + // called out in the footprint loaded in the netlist. + aModule->CalculateBoundingBox(); +} + + +void MODULE::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode, + const wxPoint& aOffset ) { if( (m_Flags & DO_NOT_DRAW) || (IsMoving()) ) return; @@ -354,14 +384,6 @@ void MODULE::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode, con } -/** - * Function DrawEdgesOnly - * Draws the footprint edges only to the current Device Context - * @param panel = The active Draw Panel (used to know the clip box) - * @param DC = current Device Context - * @param offset = draw offset (usually wxPoint(0,0) - * @param draw_mode = GR_OR, GR_XOR, GR_AND - */ void MODULE::DrawEdgesOnly( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset, GR_DRAWMODE draw_mode ) { @@ -687,6 +709,7 @@ EDA_ITEM* MODULE::Clone() const return new MODULE( *this ); } + /* Test for validity of the name in a library of the footprint * ( no spaces, dir separators ... ) * return true if the given name is valid @@ -874,6 +897,7 @@ void MODULE::SetPosition( const wxPoint& newpos ) CalculateBoundingBox(); } + void MODULE::MoveAnchorPosition( const wxPoint& aMoveVector ) { /* Move the reference point of the footprint @@ -932,6 +956,7 @@ void MODULE::MoveAnchorPosition( const wxPoint& aMoveVector ) CalculateBoundingBox(); } + void MODULE::SetOrientation( double newangle ) { double angleChange = newangle - m_Orient; // change in rotation diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 507d38e0b1..a8239fcb05 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -229,6 +229,14 @@ public: /* drawing functions */ + /** + * Function Draw + * draws the footprint to the \a aDC. + * @param aPanel = draw panel, Used to know the clip box + * @param aDC = Current Device Context + * @param aDrawMode = GR_OR, GR_XOR.. + * @param aOffset = draw offset (usually wxPoint(0,0) + */ void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode, @@ -236,6 +244,14 @@ public: void Draw3D( EDA_3D_CANVAS* glcanvas ); + /** + * Function DrawEdgesOnly + * Draws the footprint edges only to the current Device Context + * @param panel = The active Draw Panel (used to know the clip box) + * @param DC = current Device Context + * @param offset = draw offset (usually wxPoint(0,0) + * @param draw_mode = GR_OR, GR_XOR, GR_AND + */ void DrawEdgesOnly( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset, GR_DRAWMODE draw_mode ); @@ -306,7 +322,7 @@ public: /** * Function GetPad - * get a pad at \a aPosition on \a aLayer in the footprint. + * get a pad at \a aPosition on \a aLayerMask in the footprint. * * @param aPosition A wxPoint object containing the position to hit test. * @param aLayerMask A layer or layers to mask the hit test. @@ -361,6 +377,19 @@ public: EDA_ITEM* Clone() const; + /** + * Function CopyNetlistSettings + * copies the netlist settings to \a aModule. + * + * The netlist settings are all of the #MODULE settings not define by a #MODULE in + * a netlist. These setting include position, orientation, local clearances, ets. + * The reference designator, value, path, and physical geometry settings are not + * copied. + * + * @param aModule is the #MODULE to copy the settings to. + */ + void CopyNetlistSettings( MODULE* aModule ); + /** * static function IsLibNameValid * Test for validity of a name of a footprint to be used in a footprint library diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 1080ddcbe1..926d5c1c56 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + /** * @file class_netinfo.h */ @@ -384,6 +408,13 @@ public: */ void SetNetname( const wxString& aNetname ); + /** + * Function GetMsgPanelInfo + * returns the information about the #NETINFO_ITEM in \a aList to display in the + * message panel. + * + * @param aList is the list in which to place the status information. + */ void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ); }; diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index cb3622ef62..f96132dfc1 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -99,13 +99,6 @@ void NETINFO_ITEM::Draw( EDA_DRAW_PANEL* panel, } -/** - * Function DisplayInfo - * has knowledge about the frame and how and where to put status information - * about this object into the frame's message panel. - * Is virtual from EDA_ITEM. - * @param frame A EDA_DRAW_FRAME in which to print status information. - */ void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { int count; diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 379001647e..6f30eed498 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -301,10 +301,6 @@ void D_PAD::SetPadName( const wxString& name ) } -/** - * Function SetNetname - * @param aNetname: the new netname - */ void D_PAD::SetNetname( const wxString& aNetname ) { m_Netname = aNetname; @@ -348,14 +344,23 @@ void D_PAD::Copy( D_PAD* source ) } -/** - * Function GetClearance (virtual) - * returns the clearance in internal units. If \a aItem is not NULL then the - * returned clearance is the greater of this object's clearance and - * aItem's clearance. If \a aItem is NULL, then this object clearance is returned. - * @param aItem is another BOARD_CONNECTED_ITEM or NULL - * @return int - the clearance in internal units. - */ +void D_PAD::CopyNetlistSettings( D_PAD* aPad ) +{ + // Don't do anything foolish like trying to copy to yourself. + wxCHECK_RET( aPad != NULL && aPad != this, wxT( "Cannot copy to NULL or yourself." ) ); + + aPad->SetNetname( GetNetname() ); + + aPad->SetLocalClearance( m_LocalClearance ); + aPad->SetLocalSolderMaskMargin( m_LocalSolderMaskMargin ); + aPad->SetLocalSolderPasteMargin( m_LocalSolderPasteMargin ); + aPad->SetLocalSolderPasteMarginRatio( m_LocalSolderPasteMarginRatio ); + aPad->SetZoneConnection( m_ZoneConnection ); + aPad->SetThermalWidth( m_ThermalWidth ); + aPad->SetThermalGap( m_ThermalGap ); +} + + int D_PAD::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const { // A pad can have specific clearance parameters that @@ -387,15 +392,6 @@ int D_PAD::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const // Mask margins handling: -/** - * Function GetSolderMaskMargin - * @return the margin for the solder mask layer - * usually > 0 (mask shape bigger than pad - * value is - * 1 - the local value - * 2 - if null, the parent footprint value - * 1 - if null, the global value - */ int D_PAD::GetSolderMaskMargin() { int margin = m_LocalSolderMaskMargin; @@ -429,15 +425,6 @@ int D_PAD::GetSolderMaskMargin() } -/** - * Function GetSolderPasteMargin - * @return the margin for the solder mask layer - * usually < 0 (mask shape smaller than pad - * value is - * 1 - the local value - * 2 - if null, the parent footprint value - * 3 - if null, the global value - */ wxSize D_PAD::GetSolderPasteMargin() { int margin = m_LocalSolderPasteMargin; @@ -538,7 +525,7 @@ void D_PAD::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM>& aList ) board = GetBoard(); - aList.push_back( MSG_PANEL_ITEM( _( "Layer" ), + aList.push_back( MSG_PANEL_ITEM( _( "Layer" ), LayerMaskDescribe( board, m_layerMask ), DARKGREEN ) ); aList.push_back( MSG_PANEL_ITEM( ShowPadShape(), ShowPadAttr(), DARKGREEN ) ); @@ -754,6 +741,7 @@ wxString D_PAD::GetSelectMenuText() const return text; } + EDA_ITEM* D_PAD::Clone() const { return new D_PAD( *this ); diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 1aa1404b8f..371ca02f28 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -398,6 +398,18 @@ public: /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + /** + * Function CopyNetlistSettings + * copies the netlist settings to \a aPad. + * + * The netlist settings are all of the #D_PAD settings not define by a #D_PAD in + * a netlist. These setting include local clearances, net names, etc. The pad + * physical geometry settings are not copied. + * + * @param aPad is the #D_PAD to copy the settings to. + */ + void CopyNetlistSettings( D_PAD* aPad ); + #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const; // overload #endif diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index 5d14ba78b3..5de313758c 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -551,7 +551,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) if( aDC->LogicalToDeviceXRel( tsize ) >= MIN_TEXT_SIZE ) // Not drawable when size too small. { // tsize reserve room for marges and segments thickness - tsize = ( tsize * 8 ) / 10; + tsize = ( tsize * 7 ) / 10; DrawGraphicHaloText( aDrawInfo.m_DrawPanel, aDC, tpos, aDrawInfo.m_Color, BLACK, WHITE, buffer, t_angle, @@ -578,7 +578,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) RotatePoint( &tpos, shape_pos, angle ); // tsize reserve room for marges and segments thickness - tsize = ( tsize * 8 ) / 10; + tsize = ( tsize * 7 ) / 10; DrawGraphicHaloText( aDrawInfo.m_DrawPanel, aDC, tpos, aDrawInfo.m_Color, BLACK, WHITE, m_ShortNetname, t_angle, diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index f3877edfa3..668a7efc34 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -214,9 +214,14 @@ void PCB_LAYER_WIDGET::ReFillRender() ClearRenderRows(); // Add "Render" tab rows to LAYER_WIDGET, after setting color and checkbox state. + // Because s_render_rows is created static, we must explicitely call + // wxGetTranslation for texts which are internationalized (tool tips + // and item names) for( unsigned row=0; rowGetLayerName( layer ), layer, brd->GetLayerColor( layer ), dsc, true ) ); + brd->GetLayerName( layer ), layer, brd->GetLayerColor( layer ), + dsc, true ) ); } } // technical layers are shown in this order: + // Because they are static, wxGetTranslation must be explicitely + // called for tooltips. static const struct { LAYER_NUM layerId; wxString tooltip; @@ -327,7 +335,7 @@ void PCB_LAYER_WIDGET::ReFill() AppendLayerRow( LAYER_WIDGET::ROW( brd->GetLayerName( layer ), layer, brd->GetLayerColor( layer ), - techLayerSeq[i].tooltip, true ) ); + wxGetTranslation( techLayerSeq[i].tooltip ), true ) ); } installRightLayerClickHandler(); diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp index c5fc88bb37..89cbfed473 100644 --- a/pcbnew/class_pcb_text.cpp +++ b/pcbnew/class_pcb_text.cpp @@ -111,17 +111,18 @@ void TEXTE_PCB::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, void TEXTE_PCB::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { wxString msg; - BOARD* board; - BOARD_ITEM* parent = (BOARD_ITEM*) m_Parent; +#if defined(DEBUG) + BOARD_ITEM* parent = (BOARD_ITEM*) m_Parent; wxASSERT( parent ); + BOARD* board; if( parent->Type() == PCB_DIMENSION_T ) board = (BOARD*) parent->GetParent(); else board = (BOARD*) parent; - wxASSERT( board ); +#endif if( m_Parent && m_Parent->Type() == PCB_DIMENSION_T ) aList.push_back( MSG_PANEL_ITEM( _( "Dimension" ), m_Text, DARKGREEN ) ); diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 3bb6bc2c49..5526caf9c8 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -750,7 +750,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, if( (aDrawMode & GR_XOR) == 0 ) GRSetDrawMode( aDC, GR_COPY ); - tsize = (tsize * 8) / 10; // small reduction to give a better look + tsize = (tsize * 7) / 10; // small reduction to give a better look DrawGraphicHaloText( panel, aDC, tpos, color, BLACK, WHITE, net->GetShortNetname(), angle, wxSize( tsize, tsize ), @@ -961,7 +961,7 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, if( aDC->LogicalToDeviceXRel( tsize ) >= MIN_TEXT_SIZE ) { - tsize = (tsize * 8) / 10; // small reduction to give a better look, inside via + tsize = (tsize * 7) / 10; // small reduction to give a better look, inside via if( (aDrawMode & GR_XOR) == 0 ) GRSetDrawMode( aDC, GR_COPY ); diff --git a/pcbnew/dialogs/dialog_SVG_print.cpp b/pcbnew/dialogs/dialog_SVG_print.cpp index 39eab85e9d..0a962d35c5 100644 --- a/pcbnew/dialogs/dialog_SVG_print.cpp +++ b/pcbnew/dialogs/dialog_SVG_print.cpp @@ -118,11 +118,11 @@ void DIALOG_SVG_PRINT::initDialog() // (Front or Top to Back or Bottom) DECLARE_LAYERS_ORDER_LIST( layersOrder ); - for( LAYER_NUM layer_idx = FIRST_LAYER; layer_idx < NB_LAYERS; ++layer_idx ) + for( LAYER_NUM layer_idx = FIRST_LAYER; layer_idx < NB_PCB_LAYERS; ++layer_idx ) { layer = layersOrder[layer_idx]; - wxASSERT( layer < NB_LAYERS ); + wxASSERT( layer < NB_PCB_LAYERS ); if( m_boxSelectLayer[layer] == NULL ) continue; @@ -148,7 +148,7 @@ void DIALOG_SVG_PRINT::initDialog() { wxString layerKey; - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_LAYERS; ++layer ) + for( LAYER_NUM layer = FIRST_LAYER; layer < NB_PCB_LAYERS; ++layer ) { bool option; @@ -237,7 +237,7 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile ) // Build layers mask LAYER_MSK printMaskLayer = NO_LAYERS; - for( LAYER_NUM layer = FIRST_LAYER; layer < NB_LAYERS; ++layer ) + for( LAYER_NUM layer = FIRST_LAYER; layer < NB_PCB_LAYERS; ++layer ) { if( m_boxSelectLayer[layer] && m_boxSelectLayer[layer]->GetValue() ) printMaskLayer |= GetLayerMask( layer ); @@ -363,7 +363,7 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event ) wxString layerKey; - for( LAYER_NUM layer = FIRST_LAYER; layerSetMaxLength( 0 ); m_outputDirectoryName->SetToolTip( _("Enter a filename if you do not want to use default file names\nCan be used only when printing the current sheet") ); m_outputDirectoryName->SetMinSize( wxSize( 450,-1 ) ); @@ -64,6 +65,7 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c sbOptionsSizer->Add( m_TextPenWidth, 0, wxRIGHT|wxLEFT, 5 ); m_DialogDefaultPenSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_DialogDefaultPenSize->SetMaxLength( 0 ); sbOptionsSizer->Add( m_DialogDefaultPenSize, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") }; @@ -118,6 +120,7 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c bMainSizer->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); + m_messagesBox->SetMaxLength( 0 ); m_messagesBox->SetMinSize( wxSize( -1,100 ) ); bMainSizer->Add( m_messagesBox, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); diff --git a/pcbnew/dialogs/dialog_SVG_print_base.h b/pcbnew/dialogs/dialog_SVG_print_base.h index bc56d76fb2..aa3e893d69 100644 --- a/pcbnew/dialogs/dialog_SVG_print_base.h +++ b/pcbnew/dialogs/dialog_SVG_print_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,8 @@ #include #include #include +class DIALOG_SHIM; + #include "dialog_shim.h" #include #include diff --git a/pcbnew/dialogs/dialog_edit_module_text.cpp b/pcbnew/dialogs/dialog_edit_module_text.cpp index c4630694f6..317f823b7d 100644 --- a/pcbnew/dialogs/dialog_edit_module_text.cpp +++ b/pcbnew/dialogs/dialog_edit_module_text.cpp @@ -1,6 +1,6 @@ /** - * @file dialog_edit_module_text.cpp. - * @brief dialog editor for texts (fields) in footprints + * @file dialog_edit_module_text.cpp + * @brief dialog editor for texts (fields) in footprints. */ /* diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index a9ad301876..55b4966004 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -33,6 +33,8 @@ #include #include #include +#include +#include #include #include @@ -65,20 +67,20 @@ void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC ) // Save project settings if needed. // Project settings are saved in the corresponding .pro file bool configChanged = lastNetlistName != GetLastNetListRead(); + if( dlg.UseCmpFileForFpNames() != GetUseCmpFileForFpNames() ) { SetUseCmpFileForFpNames( dlg.UseCmpFileForFpNames() ); configChanged = true; } - if( configChanged && - !GetBoard()->GetFileName().IsEmpty() && - IsOK(NULL, _("Project config has changed. Save it ?") ) ) + if( configChanged + && !GetBoard()->GetFileName().IsEmpty() + && IsOK( NULL, _( "The project configuration has changed. Do you want to save it?" ) ) ) { wxFileName fn = GetBoard()->GetFileName(); fn.SetExt( ProjectFileExtension ); - wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, - GetProjectFileParameters() ); + wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); } } @@ -126,20 +128,50 @@ void DIALOG_NETLIST::OnOpenNetlistClick( wxCommandEvent& event ) void DIALOG_NETLIST::OnReadNetlistFileClick( wxCommandEvent& event ) { - wxString fullNetfileName = m_NetlistFilenameCtrl->GetValue(); - wxString cmpFilename; + wxString msg; + wxString netlistFileName = m_NetlistFilenameCtrl->GetValue(); + wxString cmpFileName; + if( UseCmpFileForFpNames() ) { wxFileName fn = m_NetlistFilenameCtrl->GetValue(); fn.SetExt( ComponentFileExtension ); - cmpFilename = fn.GetFullPath(); + cmpFileName = fn.GetFullPath(); } - m_parent->ReadPcbNetlist( fullNetfileName, cmpFilename, m_MessageWindow, - m_ChangeExistingFootprintCtrl->GetSelection() == 1 ? true : false, - m_DeleteBadTracks->GetSelection() == 1 ? true : false, - m_RemoveExtraFootprintsCtrl->GetSelection() == 1 ? true : false, - m_Select_By_Timestamp->GetSelection() == 1 ? true : false ); + // Give the user a chance to bail out when making changes from a netlist. + if( !m_parent->GetBoard()->IsEmpty() + && !IsOK( NULL, _( "The changes made by reading the netlist cannot be undone. Are you " + "sure you want to read the netlist?" ) ) ) + return; + + wxBusyCursor busy(); + m_MessageWindow->Clear(); + + msg.Printf( _( "Reading netlist file \"%s\".\n" ), GetChars( netlistFileName ) ); + m_MessageWindow->AppendText( msg ); + + if( !cmpFileName.IsEmpty() ) + { + msg.Printf( _( "Using component footprint link file \"%s\".\n" ), GetChars( cmpFileName ) ); + m_MessageWindow->AppendText( msg ); + } + + if( m_Select_By_Timestamp->GetSelection() == 1 ) + { + msg.Printf( _( "Using time stamps to select footprints in file \"%s\".\n" ), + GetChars( cmpFileName ) ); + m_MessageWindow->AppendText( msg ); + } + + WX_TEXT_CTRL_REPORTER reporter( m_MessageWindow ); + + m_parent->ReadPcbNetlist( netlistFileName, cmpFileName, &reporter, + m_ChangeExistingFootprintCtrl->GetSelection() == 1, + m_DeleteBadTracks->GetSelection() == 1, + m_RemoveExtraFootprintsCtrl->GetSelection() == 1, + m_Select_By_Timestamp->GetSelection() == 1, + m_checkDryRun->GetValue() ); } @@ -156,14 +188,18 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event ) wxArrayString missing; std::vector notInNetlist; wxString netlistFilename = m_NetlistFilenameCtrl->GetValue(); + wxString cmpFilename; - if( ! m_parent->Test_Duplicate_Missing_And_Extra_Footprints( - netlistFilename, duplicate, missing, notInNetlist ) ) + if( UseCmpFileForFpNames() ) { - wxMessageBox( _("Netlist file not found!") ); - return; + wxFileName fn = m_NetlistFilenameCtrl->GetValue(); + fn.SetExt( ComponentFileExtension ); + cmpFilename = fn.GetFullPath(); } + if( !verifyFootprints( netlistFilename, cmpFilename, duplicate, missing, notInNetlist ) ) + return; + #define ERR_CNT_MAX 100 // Max number of errors to output in dialog // to avoid a too long message list @@ -221,24 +257,24 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event ) // Search for modules found on board but not in net list. if( notInNetlist.size() == 0 ) - list << wxT("

") << _( "No extra modules." ) << wxT("

"); + list << wxT( "

" ) << _( "No extra modules." ) << wxT( "

" ); else { - list << wxT("

") << _( "Not in Netlist:" ) << wxT("

"); + list << wxT( "

" ) << _( "Not in Netlist:" ) << wxT( "

" ); for( unsigned ii = 0; ii < notInNetlist.size(); ii++ ) { MODULE* module = notInNetlist[ii]; if( module->GetReference().IsEmpty() ) - list << wxT("
") << wxT("[noref)"); + list << wxT( "
" ) << wxT( "[noref)" ); else - list << wxT("
") << module->GetReference() ; + list << wxT( "
" ) << module->GetReference() ; - list << wxT(" (") << module->GetValue() << wxT(")"); - list << wxT(" @ "); + list << wxT( " (" ) << module->GetValue() << wxT( ")" ); + list << wxT( " @ " ); list << CoordinateToString( module->GetPosition().x ), - list << wxT(", ") << CoordinateToString( module->GetPosition().y ), + list << wxT( ", " ) << CoordinateToString( module->GetPosition().y ), err_cnt++; if( ERR_CNT_MAX < err_cnt ) @@ -248,13 +284,13 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event ) if( ERR_CNT_MAX < err_cnt ) { - list << wxT("

") + list << wxT( "

" ) << _( "Too many errors: some are skipped" ) - << wxT("

"); + << wxT( "

" ); } HTML_MESSAGE_BOX dlg( this, _( "Check Modules" ) ); - dlg.AddHTML_Text(list); + dlg.AddHTML_Text( list ); dlg.ShowModal(); } @@ -277,3 +313,148 @@ void DIALOG_NETLIST::OnCancelClick( wxCommandEvent& event ) { EndModal( wxID_CANCEL ); } + + +void DIALOG_NETLIST::OnSaveMessagesToFile( wxCommandEvent& aEvent ) +{ + wxFileName fn; + + if( !m_parent->GetLastNetListRead().IsEmpty() ) + { + fn = m_parent->GetLastNetListRead(); + fn.SetExt( wxT( "txt" ) ); + } + else + { + fn.SetPath( wxFileName::GetCwd() ); + } + + wxFileDialog dlg( this, _( "Save contents of message window" ), fn.GetPath(), fn.GetName(), + TextWildcard, wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); + + if( dlg.ShowModal() != wxID_OK ) + return; + + fn = dlg.GetPath(); + + if( fn.GetExt().IsEmpty() ) + fn.SetExt( wxT( "txt" ) ); + + wxFile f( fn.GetFullPath(), wxFile::write ); + + if( !f.IsOpened() ) + { + wxString msg; + + msg.Printf( _( "Cannot write message contents to file \"%s\"." ), + GetChars( fn.GetFullPath() ) ); + wxMessageBox( msg, _( "File Write Error" ), wxOK | wxICON_ERROR, this ); + return; + } + + f.Write( m_MessageWindow->GetValue() ); +} + + +void DIALOG_NETLIST::OnUpdateUISaveMessagesToFile( wxUpdateUIEvent& aEvent ) +{ + aEvent.Enable( !m_MessageWindow->IsEmpty() ); +} + + +void DIALOG_NETLIST::OnUpdateUIValidNetlistFile( wxUpdateUIEvent& aEvent ) +{ + aEvent.Enable( !m_NetlistFilenameCtrl->GetValue().IsEmpty() ); +} + + +bool DIALOG_NETLIST::verifyFootprints( const wxString& aNetlistFilename, + const wxString & aCmpFilename, + std::vector< MODULE* >& aDuplicates, + wxArrayString& aMissing, + std::vector< MODULE* >& aNotInNetlist ) +{ + wxString msg; + MODULE* module; + MODULE* nextModule; + NETLIST netlist; + wxBusyCursor dummy; // Shows an hourglass while calculating. + NETLIST_READER* netlistReader; + COMPONENT* component; + + try + { + netlistReader = NETLIST_READER::GetNetlistReader( &netlist, aNetlistFilename, + aCmpFilename ); + + if( netlistReader == NULL ) + { + msg.Printf( _( "Cannot open netlist file \"%s\"." ), GetChars( aNetlistFilename ) ); + wxMessageBox( msg, _( "Netlist Load Error." ), wxOK | wxICON_ERROR ); + return false; + } + + std::auto_ptr< NETLIST_READER > nlr( netlistReader ); + netlistReader->LoadNetlist(); + } + catch( IO_ERROR& ioe ) + { + msg.Printf( _( "Error loading netlist file:\n%s" ), ioe.errorText.GetData() ); + wxMessageBox( msg, _( "Netlist Load Error" ), wxOK | wxICON_ERROR ); + return false; + } + + +#if defined( DEBUG ) + m_MessageWindow->Clear(); + WX_TEXT_CTRL_REPORTER rpt( m_MessageWindow ); + netlist.Show( 0, rpt ); +#endif + + BOARD* pcb = m_parent->GetBoard(); + + // Search for duplicate footprints. + module = pcb->m_Modules; + + for( ; module != NULL; module = module->Next() ) + { + nextModule = module->Next(); + + for( ; nextModule != NULL; nextModule = nextModule->Next() ) + { + if( module->GetReference().CmpNoCase( nextModule->GetReference() ) == 0 ) + { + aDuplicates.push_back( module ); + break; + } + } + } + + // Search for component footprints in the netlist but not on the board. + for( unsigned ii = 0; ii < netlist.GetCount(); ii++ ) + { + component = netlist.GetComponent( ii ); + + module = pcb->FindModuleByReference( component->GetReference() ); + + if( module == NULL ) + { + aMissing.Add( component->GetReference() ); + aMissing.Add( component->GetValue() ); + } + } + + // Search for component footprints found on board but not in netlist. + module = pcb->m_Modules; + + for( ; module != NULL; module = module->Next() ) + { + + component = netlist.GetComponentByReference( module->GetReference() ); + + if( component == NULL ) + aNotInNetlist.push_back( module ); + } + + return true; +} diff --git a/pcbnew/dialogs/dialog_netlist.h b/pcbnew/dialogs/dialog_netlist.h index dce8c83ef5..332403c57f 100644 --- a/pcbnew/dialogs/dialog_netlist.h +++ b/pcbnew/dialogs/dialog_netlist.h @@ -31,31 +31,68 @@ #include +class MODULE; +class NETLIST; + + class DIALOG_NETLIST : public DIALOG_NETLIST_FBP { private: - PCB_EDIT_FRAME * m_parent; - wxDC * m_dc; + PCB_EDIT_FRAME* m_parent; + wxDC* m_dc; public: - DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC * aDC, - const wxString & aNetlistFullFilename ); + DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC* aDC, const wxString & aNetlistFullFilename ); ~DIALOG_NETLIST() {}; - // return true if the user choice is tu use the .cmp file - // created by CvPcb to know footprin names associated to components - // and false tu use the netlist only + + // return true if the user choice is to use the .cmp file + // created by CvPcb to know footprint names associated to components + // and false to use the netlist only bool UseCmpFileForFpNames() { return m_cmpNameSourceOpt->GetSelection() == 1; } private: + /** + * Function verifyFootprints + * compares the netlist to the board and builds a list of duplicate, missing, and + * extra footprints. + * + * @param aNetlistFilename the netlist filename. + * @param aCmpFilename the component link filename. + * @param aDuplicate the list of duplicate modules to populate + * @param aMissing the list of missing module references and values to populate. For + * each missing item, the first string is the reference designator and + * the second is the value. + * @param aNotInNetlist is the list of component footprint found in the netlist but not on + * the board. + * @return true if no errors occurred while reading the netlist. Otherwise false. + */ + bool verifyFootprints( const wxString& aNetlistFilename, + const wxString& aCmpFilename, + std::vector< MODULE* >& aDuplicate, + wxArrayString& aMissing, + std::vector< MODULE* >& aNotInNetlist ); + + /** + * Function loadFootprints + * loads the footprints for each #COMPONENT in \a aNetlist from the list of libraries. + * + * @param aNetlist is the netlist of components to load the footprints into. + */ + void loadFootprints( NETLIST& aNetlist ); + // Virtual event handlers: void OnOpenNetlistClick( wxCommandEvent& event ); void OnReadNetlistFileClick( wxCommandEvent& event ); void OnTestFootprintsClick( wxCommandEvent& event ); void OnCompileRatsnestClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event ); + void OnSaveMessagesToFile( wxCommandEvent& aEvent ); + + void OnUpdateUISaveMessagesToFile( wxUpdateUIEvent& aEvent ); + void OnUpdateUIValidNetlistFile( wxUpdateUIEvent& aEvent ); }; diff --git a/pcbnew/dialogs/dialog_netlist_fbp.cpp b/pcbnew/dialogs/dialog_netlist_fbp.cpp index 8b84a06fb8..c6f1d115a5 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.cpp +++ b/pcbnew/dialogs/dialog_netlist_fbp.cpp @@ -24,7 +24,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w wxString m_Select_By_TimestampChoices[] = { _("Reference"), _("Timestamp") }; int m_Select_By_TimestampNChoices = sizeof( m_Select_By_TimestampChoices ) / sizeof( wxString ); - m_Select_By_Timestamp = new wxRadioBox( this, wxID_ANY, _("Module Selection:"), wxDefaultPosition, wxDefaultSize, m_Select_By_TimestampNChoices, m_Select_By_TimestampChoices, 1, wxRA_SPECIFY_COLS ); + m_Select_By_Timestamp = new wxRadioBox( this, wxID_ANY, _("Module Selection"), wxDefaultPosition, wxDefaultSize, m_Select_By_TimestampNChoices, m_Select_By_TimestampChoices, 1, wxRA_SPECIFY_COLS ); m_Select_By_Timestamp->SetSelection( 0 ); m_Select_By_Timestamp->SetToolTip( _("Select how footprints are recognized:\nby their reference (U1, R3...) (normal setting)\nor their time stamp (special setting after a full schematic reannotation)") ); @@ -32,7 +32,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w wxString m_cmpNameSourceOptChoices[] = { _("From netlist"), _("From separate .cmp file") }; int m_cmpNameSourceOptNChoices = sizeof( m_cmpNameSourceOptChoices ) / sizeof( wxString ); - m_cmpNameSourceOpt = new wxRadioBox( this, wxID_ANY, _("Module Name Source:"), wxDefaultPosition, wxDefaultSize, m_cmpNameSourceOptNChoices, m_cmpNameSourceOptChoices, 1, wxRA_SPECIFY_COLS ); + m_cmpNameSourceOpt = new wxRadioBox( this, wxID_ANY, _("Module Name Source"), wxDefaultPosition, wxDefaultSize, m_cmpNameSourceOptNChoices, m_cmpNameSourceOptChoices, 1, wxRA_SPECIFY_COLS ); m_cmpNameSourceOpt->SetSelection( 0 ); m_cmpNameSourceOpt->SetToolTip( _("Source of footprints names for component:\n- the netlist (if you have filled the footprint field of each component in schematic)\n- the .cmp file created by CvPcb") ); @@ -40,7 +40,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w wxString m_ChangeExistingFootprintCtrlChoices[] = { _("Keep"), _("Change") }; int m_ChangeExistingFootprintCtrlNChoices = sizeof( m_ChangeExistingFootprintCtrlChoices ) / sizeof( wxString ); - m_ChangeExistingFootprintCtrl = new wxRadioBox( this, wxID_ANY, _("Exchange Module:"), wxDefaultPosition, wxDefaultSize, m_ChangeExistingFootprintCtrlNChoices, m_ChangeExistingFootprintCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_ChangeExistingFootprintCtrl = new wxRadioBox( this, wxID_ANY, _("Exchange Module"), wxDefaultPosition, wxDefaultSize, m_ChangeExistingFootprintCtrlNChoices, m_ChangeExistingFootprintCtrlChoices, 1, wxRA_SPECIFY_COLS ); m_ChangeExistingFootprintCtrl->SetSelection( 0 ); m_ChangeExistingFootprintCtrl->SetToolTip( _("Keep or change an existing footprint when the netlist gives a different footprint") ); @@ -54,7 +54,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w wxString m_DeleteBadTracksChoices[] = { _("Keep"), _("Delete") }; int m_DeleteBadTracksNChoices = sizeof( m_DeleteBadTracksChoices ) / sizeof( wxString ); - m_DeleteBadTracks = new wxRadioBox( this, wxID_ANY, _("Bad Tracks Deletion:"), wxDefaultPosition, wxDefaultSize, m_DeleteBadTracksNChoices, m_DeleteBadTracksChoices, 1, wxRA_SPECIFY_COLS ); + m_DeleteBadTracks = new wxRadioBox( this, wxID_ANY, _("Unconnected Tracks"), wxDefaultPosition, wxDefaultSize, m_DeleteBadTracksNChoices, m_DeleteBadTracksChoices, 1, wxRA_SPECIFY_COLS ); m_DeleteBadTracks->SetSelection( 0 ); m_DeleteBadTracks->SetToolTip( _("Keep or delete bad tracks after a netlist change") ); @@ -74,7 +74,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w wxBoxSizer* bRightSizerButtons; bRightSizerButtons = new wxBoxSizer( wxVERTICAL ); - m_buttonBrowse = new wxButton( this, ID_OPEN_NELIST, _("Browse Netlist Files"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonBrowse = new wxButton( this, ID_OPEN_NELIST, _("Open Netlist File"), wxDefaultPosition, wxDefaultSize, 0 ); bRightSizerButtons->Add( m_buttonBrowse, 0, wxEXPAND|wxALL, 5 ); m_buttonRead = new wxButton( this, ID_READ_NETLIST_FILE, _("Read Current Netlist"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -83,7 +83,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w bRightSizerButtons->Add( m_buttonRead, 0, wxEXPAND|wxALL, 5 ); - m_buttonFPTest = new wxButton( this, ID_TEST_NETLIST, _("Footprints Test"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonFPTest = new wxButton( this, ID_TEST_NETLIST, _("Test Footprints"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonFPTest->SetToolTip( _("Read the current neltist file and list missing and extra footprints") ); bRightSizerButtons->Add( m_buttonFPTest, 0, wxEXPAND|wxALL, 5 ); @@ -93,15 +93,27 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w bRightSizerButtons->Add( m_buttonRebild, 0, wxEXPAND|wxALL, 5 ); + m_buttonSaveMessages = new wxButton( this, wxID_ANY, _("Save Messages to File"), wxDefaultPosition, wxDefaultSize, 0 ); + bRightSizerButtons->Add( m_buttonSaveMessages, 0, wxALL|wxEXPAND, 5 ); + m_buttonClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); bRightSizerButtons->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 ); - bUpperSizer->Add( bRightSizerButtons, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bUpperSizer->Add( bRightSizerButtons, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxTOP, 5 ); bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); + wxBoxSizer* bCenterSizer; + bCenterSizer = new wxBoxSizer( wxVERTICAL ); + + m_checkDryRun = new wxCheckBox( this, wxID_ANY, _("Only report changes in message panel"), wxDefaultPosition, wxDefaultSize, 0 ); + bCenterSizer->Add( m_checkDryRun, 0, wxALL, 5 ); + + + bMainSizer->Add( bCenterSizer, 0, wxALL|wxEXPAND, 5 ); + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); @@ -137,8 +149,13 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w // Connect Events m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNetlistClick ), NULL, this ); m_buttonRead->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this ); + m_buttonRead->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); m_buttonFPTest->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this ); + m_buttonFPTest->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); m_buttonRebild->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this ); + m_buttonRebild->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); + m_buttonSaveMessages->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnSaveMessagesToFile ), NULL, this ); + m_buttonSaveMessages->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUISaveMessagesToFile ), NULL, this ); m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this ); } @@ -147,8 +164,13 @@ DIALOG_NETLIST_FBP::~DIALOG_NETLIST_FBP() // Disconnect Events m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNetlistClick ), NULL, this ); m_buttonRead->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this ); + m_buttonRead->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); m_buttonFPTest->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this ); + m_buttonFPTest->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); m_buttonRebild->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this ); + m_buttonRebild->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); + m_buttonSaveMessages->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnSaveMessagesToFile ), NULL, this ); + m_buttonSaveMessages->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUISaveMessagesToFile ), NULL, this ); m_buttonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_netlist_fbp.fbp b/pcbnew/dialogs/dialog_netlist_fbp.fbp index d4dee8a418..2336b347e7 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.fbp +++ b/pcbnew/dialogs/dialog_netlist_fbp.fbp @@ -142,7 +142,7 @@ 0 0 wxID_ANY - Module Selection: + Module Selection 1 0 @@ -232,7 +232,7 @@ 0 0 wxID_ANY - Module Name Source: + Module Name Source 1 0 @@ -322,7 +322,7 @@ 0 0 wxID_ANY - Exchange Module: + Exchange Module 1 0 @@ -423,7 +423,7 @@ 0 0 wxID_ANY - Bad Tracks Deletion: + Unconnected Tracks 1 0 @@ -574,7 +574,7 @@
5 - wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxTOP 0 @@ -614,7 +614,7 @@ 0 0 ID_OPEN_NELIST - Browse Netlist Files + Open Netlist File 0 @@ -754,7 +754,7 @@ - + OnUpdateUIValidNetlistFile @@ -790,7 +790,7 @@ 0 0 ID_TEST_NETLIST - Footprints Test + Test Footprints 0 @@ -842,7 +842,7 @@ - + OnUpdateUIValidNetlistFile
@@ -930,7 +930,95 @@ - + OnUpdateUIValidNetlistFile + +
+ + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Save Messages to File + + 0 + + + 0 + + 1 + m_buttonSaveMessages + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnSaveMessagesToFile + + + + + + + + + + + + + + + + + + + + + + + OnUpdateUISaveMessagesToFile @@ -1025,6 +1113,105 @@ + + 5 + wxALL|wxEXPAND + 0 + + + bCenterSizer + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Only report changes in message panel + + 0 + + + 0 + + 1 + m_checkDryRun + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 wxEXPAND | wxALL diff --git a/pcbnew/dialogs/dialog_netlist_fbp.h b/pcbnew/dialogs/dialog_netlist_fbp.h index acf63e437f..271709b822 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.h +++ b/pcbnew/dialogs/dialog_netlist_fbp.h @@ -22,6 +22,7 @@ class DIALOG_SHIM; #include #include #include +#include #include #include #include @@ -54,7 +55,9 @@ class DIALOG_NETLIST_FBP : public DIALOG_SHIM wxButton* m_buttonRead; wxButton* m_buttonFPTest; wxButton* m_buttonRebild; + wxButton* m_buttonSaveMessages; wxButton* m_buttonClose; + wxCheckBox* m_checkDryRun; wxStaticLine* m_staticline1; wxStaticText* m_staticTextNetfilename; wxTextCtrl* m_NetlistFilenameCtrl; @@ -64,8 +67,11 @@ class DIALOG_NETLIST_FBP : public DIALOG_SHIM // Virtual event handlers, overide them in your derived class virtual void OnOpenNetlistClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnReadNetlistFileClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnUpdateUIValidNetlistFile( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnTestFootprintsClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCompileRatsnestClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSaveMessagesToFile( wxCommandEvent& event ) { event.Skip(); } + virtual void OnUpdateUISaveMessagesToFile( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } diff --git a/pcbnew/dialogs/dialog_orient_footprints.cpp b/pcbnew/dialogs/dialog_orient_footprints.cpp index 01cae40e27..bffc487ee8 100644 --- a/pcbnew/dialogs/dialog_orient_footprints.cpp +++ b/pcbnew/dialogs/dialog_orient_footprints.cpp @@ -1,5 +1,5 @@ /** - * @file DIALOG_ORIENT_FOOTPRINTS.cpp + * @file dialog_orient_footprints.cpp */ /* * This program source code file is part of KiCad, a free EDA CAD application. @@ -58,10 +58,12 @@ public: { return m_ApplyToLocked->IsChecked(); } + int GetOrientation() { return newOrientation; } + wxString GetFilter() { return m_FilterPattern->GetValue(); @@ -73,6 +75,8 @@ private: void OnOkClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event ); }; + + int DIALOG_ORIENT_FOOTPRINTS::newOrientation = 0; @@ -81,23 +85,18 @@ DIALOG_ORIENT_FOOTPRINTS::DIALOG_ORIENT_FOOTPRINTS( PCB_EDIT_FRAME* parent ) { m_Parent = parent; wxString txt; - txt.Printf(wxT("%g"), (double) newOrientation/10); - m_OrientationCtrl->SetValue(txt); - SetFocus( ); - GetSizer()->SetSizeHints(this); + txt.Printf( wxT( "%g" ), (double) newOrientation/10 ); + m_OrientationCtrl->SetValue( txt ); + SetFocus(); + GetSizer()->SetSizeHints( this ); Centre(); } -/****************************************************************/ void PCB_EDIT_FRAME::OnOrientFootprints( wxCommandEvent& event ) -/****************************************************************/ -/** - * Function OnOrientFootprints - * install the dialog box for the comman Orient Footprints - */ { - DIALOG_ORIENT_FOOTPRINTS dlg(this); + DIALOG_ORIENT_FOOTPRINTS dlg( this ); + if( dlg.ShowModal() != wxID_OK ) return; @@ -111,23 +110,13 @@ void PCB_EDIT_FRAME::OnOrientFootprints( wxCommandEvent& event ) } -/*******************************************************************/ -bool PCB_EDIT_FRAME::ReOrientModules( const wxString& ModuleMask, - int Orient, bool include_fixe ) -/*******************************************************************/ -/** - * Function ReOrientModules - * Set the orientation of footprints - * @param ModuleMask = mask (wildcard allowed) selection - * @param Orient = new orientation - * @param include_fixe = true to orient locked footprints - * @return true if some footprints modified, false if no change - */ +bool PCB_EDIT_FRAME::ReOrientModules( const wxString& ModuleMask, int Orient, bool include_fixe ) { wxString line; bool modified = false; line.Printf( _( "OK to set footprints orientation to %.1f degrees ?" ), (double)Orient / 10 ); + if( !IsOK( this, line ) ) return false; @@ -155,13 +144,13 @@ void DIALOG_ORIENT_FOOTPRINTS::OnOkClick( wxCommandEvent& event ) double d_orient; wxString text = m_OrientationCtrl->GetValue(); - if ( ! text.ToDouble(&d_orient) ) + if ( ! text.ToDouble( &d_orient ) ) { - DisplayError(this, _("Bad value for footprints orientation")); + DisplayError( this, _( "Bad value for footprints orientation" ) ); return; } - newOrientation = KiROUND(d_orient * 10); + newOrientation = KiROUND( d_orient * 10 ); NORMALIZE_ANGLE_180( newOrientation ); EndModal( wxID_OK ); } diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 6cecfca528..4046ee200f 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -1,6 +1,6 @@ /** - * @file dialog_pad_properties.cpp. - * @brief Pad editing functions and dialog pad editor + * @file dialog_pad_properties.cpp + * @brief Pad editing functions and dialog pad editor. */ /* diff --git a/pcbnew/gpcb_plugin.cpp b/pcbnew/gpcb_plugin.cpp index 230bae94d1..c1fbd51454 100644 --- a/pcbnew/gpcb_plugin.cpp +++ b/pcbnew/gpcb_plugin.cpp @@ -278,7 +278,7 @@ void GPCB_FPL_CACHE::Remove( const wxString& aFootprintName ) if( it == m_modules.end() ) { - THROW_IO_ERROR( wxString::Format( _( "library <%s> has no footprint %s to delete" ), + THROW_IO_ERROR( wxString::Format( _( "library <%s> has no footprint '%s' to delete" ), m_lib_path.GetPath().GetData(), aFootprintName.GetData() ) ); } diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index f1ef2fa000..0a155643f4 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -170,8 +170,10 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit if( GetCanvas()->IsMouseCaptured() ) GetCanvas()->CallMouseCapture( aDC, wxDefaultPosition, false ); - GetBoard()->SetTrackWidthIndex( ( GetBoard()->GetTrackWidthIndex() + 1 ) % - GetBoard()->m_TrackWidthList.size() ); + if( GetBoard()->GetTrackWidthIndex() < GetBoard()->m_TrackWidthList.size() - 1) + GetBoard()->SetTrackWidthIndex( GetBoard()->GetTrackWidthIndex() + 1 ); + else + GetBoard()->SetTrackWidthIndex( 0 ); if( GetCanvas()->IsMouseCaptured() ) GetCanvas()->CallMouseCapture( aDC, wxDefaultPosition, false ); @@ -182,10 +184,10 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit if( GetCanvas()->IsMouseCaptured() ) GetCanvas()->CallMouseCapture( aDC, wxDefaultPosition, false ); - if( GetBoard()->GetTrackWidthIndex() == 0 ) - GetBoard()->SetTrackWidthIndex( GetBoard()->m_TrackWidthList.size() ); - - GetBoard()->SetTrackWidthIndex( GetBoard()->GetTrackWidthIndex() - 1 ); + if( GetBoard()->GetTrackWidthIndex() <= 0 ) + GetBoard()->SetTrackWidthIndex( GetBoard()->m_TrackWidthList.size() -1 ); + else + GetBoard()->SetTrackWidthIndex( GetBoard()->GetTrackWidthIndex() - 1 ); if( GetCanvas()->IsMouseCaptured() ) GetCanvas()->CallMouseCapture( aDC, wxDefaultPosition, false ); diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 7c145c96ad..c63a6b65bd 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -249,7 +249,7 @@ void FP_CACHE::Remove( const wxString& aFootprintName ) if( it == m_modules.end() ) { - THROW_IO_ERROR( wxString::Format( _( "library <%s> has no footprint %s to delete" ), + THROW_IO_ERROR( wxString::Format( _( "library <%s> has no footprint '%s' to delete" ), m_lib_path.GetPath().GetData(), aFootprintName.GetData() ) ); } @@ -425,7 +425,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const m_out->Print( aNestLevel, "(layers\n" ); // Save only the used copper layers from front to back. - for( LAYER_NUM layer = LAST_COPPER_LAYER; layer >= FIRST_COPPER_LAYER; --layer) + for( LAYER_NUM layer = LAST_COPPER_LAYER; layer >= FIRST_COPPER_LAYER; --layer) { LAYER_MSK mask = GetLayerMask( layer ); if( mask & aBoard->GetEnabledLayers() ) @@ -1087,8 +1087,10 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const m_out->Print( 0, " (rect_delta %s )", FMT_IU( aPad->GetDelta() ).c_str() ); wxSize sz = aPad->GetDrillSize(); + wxPoint shapeoffset = aPad->GetOffset(); - if( (sz.GetWidth() > 0) || (sz.GetHeight() > 0) ) + if( (sz.GetWidth() > 0) || (sz.GetHeight() > 0) || + (shapeoffset.x > 0) || (shapeoffset.y > 0) ) { m_out->Print( 0, " (drill" ); @@ -1101,7 +1103,7 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const if( sz.GetHeight() > 0 && sz.GetWidth() != sz.GetHeight() ) m_out->Print( 0, " %s", FMT_IU( sz.GetHeight() ).c_str() ); - if( (aPad->GetOffset().x != 0) || (aPad->GetOffset().y != 0) ) + if( (shapeoffset.x != 0) || (shapeoffset.y != 0) ) m_out->Print( 0, " (offset %s)", FMT_IU( aPad->GetOffset() ).c_str() ); m_out->Print( 0, ")" ); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index e39698c58a..a80fe1a35c 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -4322,7 +4322,7 @@ void LEGACY_PLUGIN::FootprintDelete( const wxString& aLibraryPath, const wxStrin if( erasedCount != 1 ) { THROW_IO_ERROR( wxString::Format( - _( "library <%s> has no footprint %s to delete" ), + _( "library <%s> has no footprint '%s' to delete" ), aLibraryPath.GetData(), aFootprintName.GetData() ) ); } diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 847d9a70ed..f4d4070605 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -132,7 +132,12 @@ wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser( void ) wxMilliSleep( 50 ); } - wxString fpname = viewer->GetSelectedFootprint(); + // Returns the full fp name, i.e. the lib name and th fp name, + // separated by a '/' + // (/ is now an illegal char in fp names) + wxString fpname = viewer->GetSelectedLibraryFullName(); + fpname << wxT("/") << viewer->GetSelectedFootprint(); + viewer->Destroy(); return fpname; @@ -146,6 +151,7 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, MODULE* module; wxPoint curspos = GetScreen()->GetCrossHairPosition(); wxString moduleName, keys; + wxString libName = aLibrary; bool allowWildSeach = true; static wxArrayString HistoryList; @@ -162,7 +168,12 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, if( dlg.m_GetExtraFunction ) { - moduleName = SelectFootprintFromLibBrowser(); + // SelectFootprintFromLibBrowser() returns the + // "full" footprint name, i.e. + // / + wxString full_fpname = SelectFootprintFromLibBrowser(); + moduleName = full_fpname.AfterLast( '/' ); + libName = full_fpname.BeforeLast( '/' ); } else { @@ -179,7 +190,7 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, { allowWildSeach = false; keys = moduleName; - moduleName = Select_1_Module_From_List( this, aLibrary, wxEmptyString, keys ); + moduleName = Select_1_Module_From_List( this, libName, wxEmptyString, keys ); if( moduleName.IsEmpty() ) // Cancel command { @@ -191,7 +202,7 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, || ( moduleName.Contains( wxT( "*" ) ) ) ) // Selection wild card { allowWildSeach = false; - moduleName = Select_1_Module_From_List( this, aLibrary, moduleName, wxEmptyString ); + moduleName = Select_1_Module_From_List( this, libName, moduleName, wxEmptyString ); if( moduleName.IsEmpty() ) { @@ -200,7 +211,7 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, } } - module = GetModuleLibrary( aLibrary, moduleName, false ); + module = GetModuleLibrary( libName, moduleName, false ); if( !module && allowWildSeach ) // Search with wild card { @@ -209,7 +220,7 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, wxString wildname = wxChar( '*' ) + moduleName + wxChar( '*' ); moduleName = wildname; - moduleName = Select_1_Module_From_List( this, aLibrary, moduleName, wxEmptyString ); + moduleName = Select_1_Module_From_List( this, libName, moduleName, wxEmptyString ); if( moduleName.IsEmpty() ) { @@ -218,7 +229,7 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, } else { - module = GetModuleLibrary( aLibrary, moduleName, true ); + module = GetModuleLibrary( libName, moduleName, true ); } } @@ -258,15 +269,6 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, } -/* scans active libraries to find and load aFootprintName. - * If found the module is added to the BOARD, just for good measure. - * aLibraryPath is the full/short name of the library. - * if empty, search in all libraries - * aFootprintName is the footprint to load - * aDisplayError = true to display an error message if any. - * - * return a pointer to the new module, or NULL - */ MODULE* PCB_BASE_FRAME::GetModuleLibrary( const wxString& aLibraryPath, const wxString& aFootprintName, bool aDisplayError ) @@ -278,12 +280,6 @@ MODULE* PCB_BASE_FRAME::GetModuleLibrary( const wxString& aLibraryPath, } -/* loads aFootprintName from aLibraryPath. - * If found the module is added to the BOARD, just for good measure. - * - * aLibraryPath - the full filename or the short name of the library to read. - * if it is a short name, the file is searched in all library valid paths - */ MODULE* PCB_BASE_FRAME::loadFootprintFromLibrary( const wxString& aLibraryPath, const wxString& aFootprintName, bool aDisplayError, @@ -326,10 +322,6 @@ MODULE* PCB_BASE_FRAME::loadFootprintFromLibrary( const wxString& aLibraryPath, } -/* Explore the libraries list and - * loads aFootprintName from the first library it is found - * If found add the module is also added to the BOARD, just for good measure. - */ MODULE* PCB_BASE_FRAME::loadFootprintFromLibraries( const wxString& aFootprintName, bool aDisplayError ) { @@ -388,6 +380,35 @@ MODULE* PCB_BASE_FRAME::loadFootprintFromLibraries( { DisplayError( this, ioe.errorText ); } + + return NULL; +} + + +MODULE* PCB_BASE_FRAME::loadFootprint( const wxString& aFootprintName ) + throw( IO_ERROR, PARSE_ERROR ) +{ + wxString libPath; + wxFileName fn; + MODULE* footprint; + + PLUGIN::RELEASER pi( IO_MGR::PluginFind( IO_MGR::LEGACY ) ); + + for( unsigned ii = 0; ii < g_LibraryNames.GetCount(); ii++ ) + { + fn = wxFileName( wxEmptyString, g_LibraryNames[ii], LegacyFootprintLibPathExtension ); + + libPath = wxGetApp().FindLibraryPath( fn ); + + if( !libPath ) + continue; + + footprint = pi->FootprintLoad( libPath, aFootprintName ); + + if( footprint ) + return footprint; + } + return NULL; } @@ -475,9 +496,6 @@ wxString PCB_BASE_FRAME::Select_1_Module_From_List( EDA_DRAW_FRAME* aWindow, } -/* Find and display the doc Component Name - * The list of doc is pointed to by mlist. - */ static void DisplayCmpDoc( wxString& Name ) { FOOTPRINT_INFO* module_info = MList.GetModuleInfo( Name ); diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 92c95cd170..91718e5915 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -30,6 +30,7 @@ #include #include #include +#include // Functions defined in block_module_editor, but used here @@ -877,3 +878,9 @@ void FOOTPRINT_EDIT_FRAME::OnVerticalToolbar( wxCommandEvent& aEvent ) SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString ); } } + +EDA_COLOR_T FOOTPRINT_EDIT_FRAME::GetGridColor() const +{ + return g_ColorsSettings.GetItemColor( GRID_VISIBLE ); +} + diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 870d988e4c..fe51bfe96a 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -375,6 +375,8 @@ public: void Select_Active_Library(); + virtual EDA_COLOR_T GetGridColor( void ) const; + DECLARE_EVENT_TABLE() protected: diff --git a/pcbnew/modview.cpp b/pcbnew/modview.cpp index 1f3548c02b..e366493cbc 100644 --- a/pcbnew/modview.cpp +++ b/pcbnew/modview.cpp @@ -87,7 +87,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentLibrary( wxCommandEvent& event ) wxArrayString headers; headers.Add( wxT("Library") ); std::vector itemsToDisplay; - + // Conversion from wxArrayString to vector of ArrayString for( unsigned i = 0; i < g_LibraryNames.GetCount(); i++ ) { @@ -145,6 +145,13 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event ) } +const wxString FOOTPRINT_VIEWER_FRAME::GetSelectedLibraryFullName( void ) +{ + wxString fullname = m_libraryName + wxT(".") + LegacyFootprintLibPathExtension; + return fullname; +} + + /* Routine to view one selected library content. */ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode ) { @@ -171,8 +178,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode ) SetCurItem( NULL ); // Delete the current footprint GetBoard()->m_Modules.DeleteAll(); - GetModuleLibrary( m_libraryName + wxT(".") + LegacyFootprintLibPathExtension, - m_footprintName, true ); + GetModuleLibrary( GetSelectedLibraryFullName(), m_footprintName, true ); Update3D_Frame(); } diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 2fe8229a9e..fe81b080e9 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -45,6 +45,7 @@ #include #include +#include /** @@ -697,3 +698,9 @@ void FOOTPRINT_VIEWER_FRAME::Update3D_Frame( bool aForceReloadFootprint ) m_Draw3DFrame->NewDisplay(); } } + +EDA_COLOR_T FOOTPRINT_VIEWER_FRAME::GetGridColor() const +{ + return g_ColorsSettings.GetItemColor( GRID_VISIBLE ); +} + diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index 5704829522..b07a9002b7 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -58,10 +58,10 @@ private: wxString m_configPath; // subpath for configuration protected: - static wxString m_libraryName; // Current selected libary - static wxString m_footprintName; // Current selected footprint - static wxString m_selectedFootprintName; // When the viewer is used to select a footprint - // the selected footprint is here + static wxString m_libraryName; // Current selected libary + static wxString m_footprintName; // Current selected footprint + static wxString m_selectedFootprintName; // When the viewer is used to select a footprint + // the selected footprint is here public: FOOTPRINT_VIEWER_FRAME( PCB_BASE_FRAME* parent, wxSemaphore* semaphore = NULL, @@ -84,7 +84,9 @@ public: static FOOTPRINT_VIEWER_FRAME* GetActiveFootprintViewer(); wxString& GetSelectedFootprint( void ) const { return m_selectedFootprintName; } + const wxString GetSelectedLibraryFullName( void ); + virtual EDA_COLOR_T GetGridColor( void ) const; private: void OnSize( wxSizeEvent& event ); diff --git a/pcbnew/muonde.cpp b/pcbnew/muonde.cpp index 9092563ab2..42a6bd3f3b 100644 --- a/pcbnew/muonde.cpp +++ b/pcbnew/muonde.cpp @@ -688,40 +688,40 @@ MODULE* PCB_EDIT_FRAME::Create_MuWaveComponent( int shape_type ) break; case 2: // Arc Stub created by a polygonal approach: + { + EDGE_MODULE* edge = new EDGE_MODULE( module ); + module->GraphicalItems().PushFront( edge ); + + edge->SetShape( S_POLYGON ); + edge->SetLayer( LAYER_N_FRONT ); + + int numPoints = angle / 50 + 3; // Note: angles are in 0.1 degrees + std::vector polyPoints = edge->GetPolyPoints(); + polyPoints.reserve( numPoints ); + + edge->m_Start0.y = -pad->GetSize().y / 2; + + polyPoints.push_back( wxPoint( 0, 0 ) ); + + int theta = -angle / 2; + + for( int ii = 1; iiGraphicalItems().PushFront( edge ); + wxPoint pt( 0, -gap_size ); - edge->SetShape( S_POLYGON ); - edge->SetLayer( LAYER_N_FRONT ); + RotatePoint( &pt.x, &pt.y, theta ); - int numPoints = angle / 50 + 3; // Note: angles are in 0.1 degrees - std::vector polyPoints = edge->GetPolyPoints(); - polyPoints.reserve( numPoints ); + polyPoints.push_back( pt ); - edge->m_Start0.y = -pad->GetSize().y / 2; + theta += 50; - polyPoints.push_back( wxPoint( 0, 0 ) ); - - int theta = -angle / 2; - - for( int ii = 1; ii angle / 2 ) - theta = angle / 2; - } - - // Close the polygon: - polyPoints.push_back( polyPoints[0] ); + if( theta > angle / 2 ) + theta = angle / 2; } + + // Close the polygon: + polyPoints.push_back( polyPoints[0] ); + } break; default: diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 590905e98e..978cabd23c 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -25,184 +25,96 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/* - * Functions to read a netlist: - * - Load new footprints and initialize net info - * - Test for missing or extra footprints - * - Recalculate full connectivity info - * - * Important remark: - * When reading a netlist, Pcbnew must identify existing footprints (link - * between existing footprints an components in netlist) - * This identification can be made from 2 fields: - * - The reference (U2, R5 ..): this is the normal mode - * - The Time Stamp : useful after a full schematic - * reannotation because references can be changed for the component linked to its footprint. - * So when reading a netlist, ReadPcbNetlist() can use references or time stamps - * to identify footprints on board and the corresponding component in schematic. - * If we want to fully reannotate a schematic this sequence must be used - * 1 - SAVE your board !!! - * 2 - Create and read the netlist (to ensure all info is correct, mainly - * references and time stamp) - * 3 - Reannotate the schematic (references will be changed, but not time stamps ) - * 4 - Recreate and read the new netlist using the Time Stamp identification - * (that reinit the new references) - */ - - - #include +#include #include #include #include #include +#include +#include +#include +#include + #include #include #include -#include -#include +#include #include -/** - * Function OpenNetlistFile - * used to open a netlist file - */ -static FILE* OpenNetlistFile( const wxString& aFullFileName ) -{ - if( aFullFileName.IsEmpty() ) - return NULL; // No filename: exit - FILE* file = wxFopen( aFullFileName, wxT( "rt" ) ); - - if( file == NULL ) - { - wxString msg; - msg.Printf( _( "Netlist file <%s> not found" ), GetChars( aFullFileName ) ); - wxMessageBox( msg ); - } - - return file; -} - - - -/* Update footprints (load missing footprints and delete on request extra footprints) - * Update connectivity info ( Net Name list ) - * Update Reference, value and "TIME STAMP" - * param aNetlistFullFilename = netlist file name (*.net) - * param aCmpFullFileName = cmp/footprint list file name (*.cmp) if not found, - * param aMessageWindow = a wxTextCtrl to print messages (can be NULL). - * param aChangeFootprint = true to change existing footprints - * when the netlist gives a different footprint. - * false to keep existing footprints - * param aDeleteBadTracks - true to erase erroneous tracks after updating connectivity info. - * param aDeleteExtraFootprints - true to remove unlocked footprints found on board but not - * in netlist. - * param aSelect_By_Timestamp - true to use schematic timestamps instead of schematic references - * to identify footprints on board - * (Must be used after a full reannotation in schematic). - * param aUseCmpFileForFootprintsNames = false to use only the netlist to know the - * fontprint names of each component. - * = true to use the .cmp file created by CvPcb - * return true if Ok - */ -bool PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFullFilename, - const wxString& aCmpFullFileName, - wxTextCtrl* aMessageWindow, - bool aChangeFootprint, - bool aDeleteBadTracks, +void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, + const wxString& aCmpFileName, + REPORTER* aReporter, + bool aChangeFootprints, + bool aDeleteUnconnectedTracks, bool aDeleteExtraFootprints, - bool aSelect_By_Timestamp ) + bool aSelectByTimeStamp, + bool aIsDryRun ) { - FILE* netfile = OpenNetlistFile( aNetlistFullFilename ); + wxString msg; + NETLIST netlist; + NETLIST_READER* netlistReader; - if( !netfile ) - return false; - - SetLastNetListRead( aNetlistFullFilename ); - bool useCmpfile = !aCmpFullFileName.IsEmpty() && wxFileExists( aCmpFullFileName ); - - if( aMessageWindow ) + try { - wxString msg; - msg.Printf( _( "Reading Netlist <%s>" ), GetChars( aNetlistFullFilename ) ); - aMessageWindow->AppendText( msg + wxT( "\n" ) ); + netlistReader = NETLIST_READER::GetNetlistReader( &netlist, aNetlistFileName, + aCmpFileName ); - if( useCmpfile ) + if( netlistReader == NULL ) { - msg.Printf( _( "Using component/footprint link file <%s>" ), - GetChars( aCmpFullFileName ) ); - aMessageWindow->AppendText( msg + wxT( "\n" ) ); + msg.Printf( _( "Cannot open netlist file \"%s\"." ), GetChars( aNetlistFileName ) ); + wxMessageBox( msg, _( "Netlist Load Error." ), wxOK | wxICON_ERROR, this ); + return; } - if( aSelect_By_Timestamp ) - { - msg.Printf( _( "Using time stamp selection" ), - GetChars( aCmpFullFileName ) ); - aMessageWindow->AppendText( msg + wxT( "\n" ) ); - } + std::auto_ptr< NETLIST_READER > nlr( netlistReader ); + SetLastNetListRead( aNetlistFileName ); + netlistReader->LoadNetlist(); + loadFootprints( netlist, aReporter ); } + catch( IO_ERROR& ioe ) + { + msg = wxString::Format( _( "Error loading netlist.\n%s" ), ioe.errorText.GetData() ); + wxMessageBox( msg, _( "Netlist Load Error" ), wxOK | wxICON_ERROR ); + return; + } + + netlist.SetIsDryRun( aIsDryRun ); + netlist.SetFindByTimeStamp( aSelectByTimeStamp ); + netlist.SetDeleteExtraFootprints( aDeleteExtraFootprints ); + netlist.SetReplaceFootprints( aChangeFootprints ); // Clear undo and redo lists to avoid inconsistencies between lists - GetScreen()->ClearUndoRedoList(); + if( !netlist.IsDryRun() ) + GetScreen()->ClearUndoRedoList(); + + netlist.SortByReference(); + GetBoard()->ReplaceNetlist( netlist, aReporter ); + + // If it was a dry run, nothing has changed so we're done. + if( netlist.IsDryRun() ) + return; OnModify(); - // Clear flags and pointers to avoid inconsistencies - GetBoard()->m_Status_Pcb = 0; SetCurItem( NULL ); - wxBusyCursor dummy; // Shows an hourglass while calculating - - NETLIST_READER netList_Reader( this, aMessageWindow ); - netList_Reader.m_UseTimeStamp = aSelect_By_Timestamp; - netList_Reader.m_ChangeFootprints = aChangeFootprint; - netList_Reader.m_UseCmpFile = useCmpfile; - netList_Reader.SetFilesnames( aNetlistFullFilename, aCmpFullFileName ); - - // True to read footprint filters section: true for CvPcb, false for Pcbnew - netList_Reader.ReadLibpartSectionSetOpt( false ); - - bool success = netList_Reader.ReadNetList( netfile ); - - if( !success ) + if( aDeleteUnconnectedTracks && GetBoard()->m_Track ) { - wxMessageBox( _("Netlist read error") ); - return false; - } - - // Delete footprints not found in netlist: - if( aDeleteExtraFootprints ) - { - if( IsOK( NULL, - _( "OK to delete not locked footprints not found in netlist?" ) ) ) - netList_Reader.RemoveExtraFootprints(); + // Remove erroneous tracks. This should probably pushed down to the #BOARD object. + RemoveMisConnectedTracks(); } // Rebuild the board connectivity: Compile_Ratsnest( NULL, true ); - - if( aDeleteBadTracks && GetBoard()->m_Track ) - { - // Remove erroneous tracks - if( RemoveMisConnectedTracks() ) - Compile_Ratsnest( NULL, true ); - } - SetMsgPanel( GetBoard() ); m_canvas->Refresh(); - - return true; } -/** - * build and shows a list of existing modules on board - * The user can select a module from this list - * @return a pointer to the selected module or NULL - */ -MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName( void ) +MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName() { MODULE* Module; @@ -219,9 +131,9 @@ MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName( void ) listnames.Add( Module->GetReference() ); wxArrayString headers; - headers.Add( wxT("Module") ); + headers.Add( wxT( "Module" ) ); std::vector itemsToDisplay; - + // Conversion from wxArrayString to vector of ArrayString for( unsigned i = 0; i < listnames.GetCount(); i++ ) { @@ -229,6 +141,7 @@ MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName( void ) item.Add( listnames[i] ); itemsToDisplay.push_back( item ); } + EDA_LIST_DIALOG dlg( this, _( "Components" ), headers, itemsToDisplay, wxEmptyString ); if( dlg.ShowModal() != wxID_OK ) @@ -247,84 +160,70 @@ MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName( void ) } -/* - * Function Test_Duplicate_Missing_And_Extra_Footprints - * Build a list of duplicate, missing and extra footprints - * from the current board and a netlist netlist : - * Shows 3 lists: - * 1 - duplicate footprints on board - * 2 - missing footprints (found in netlist but not on board) - * 3 - footprints not in netlist but on board - * param aFilename = the full filename netlist - * param aDuplicate = the list of duplicate modules to populate - * param aMissing = the list of missing module references and values - * to populate. For each missing item, the first string is the ref, - * the second is the value. - * param aNotInNetlist = the list of not-in-netlist modules to populate - */ -bool PCB_EDIT_FRAME::Test_Duplicate_Missing_And_Extra_Footprints( - const wxString& aFilename, - std::vector & aDuplicate, - wxArrayString& aMissing, - std::vector & aNotInNetlist ) +void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) + throw( IO_ERROR, PARSE_ERROR ) { - FILE* netfile = OpenNetlistFile( aFilename ); - if( !netfile ) - return false; + wxString msg; + wxString lastFootprintLibName; + COMPONENT* component; + MODULE* module; - // Build the list of references of the net list modules. - NETLIST_READER netList_Reader( this ); - netList_Reader.SetFilesnames( aFilename, wxEmptyString ); - netList_Reader.BuildModuleListOnlySetOpt( true ); - if( ! netList_Reader.ReadNetList( netfile ) ) - return false; // error + if( aNetlist.IsEmpty() ) + return; - COMPONENT_INFO_LIST& moduleInfoList = netList_Reader.GetComponentInfoList(); + aNetlist.SortByFootprintLibName(); - // Search for duplicate footprints. - MODULE* module = GetBoard()->m_Modules; + wxString libPath; + wxFileName fn; - for( ; module != NULL; module = module->Next() ) + PLUGIN::RELEASER pi( IO_MGR::PluginFind( IO_MGR::LEGACY ) ); + + for( unsigned ii = 0; ii < aNetlist.GetCount(); ii++ ) { - MODULE* altmodule = module->Next(); + component = aNetlist.GetComponent( ii ); - for( ; altmodule != NULL; altmodule = altmodule->Next() ) + if( ii == 0 || component->GetFootprintLibName() != lastFootprintLibName ) { - if( module->GetReference().CmpNoCase( altmodule->GetReference() ) == 0 ) + module = NULL; + + for( unsigned ii = 0; ii < g_LibraryNames.GetCount(); ii++ ) { - aDuplicate.push_back( module ); - break; + fn = wxFileName( wxEmptyString, g_LibraryNames[ii], + LegacyFootprintLibPathExtension ); + + libPath = wxGetApp().FindLibraryPath( fn ); + + if( !libPath ) + continue; + + module = pi->FootprintLoad( libPath, component->GetFootprintLibName() ); + + if( module ) + { + lastFootprintLibName = component->GetFootprintLibName(); + break; + } + } + + if( module == NULL ) + { + wxString msg; + msg.Printf( _( "Component `%s` footprint <%s> was not found in any libraries." ), + GetChars( component->GetReference() ), + GetChars( component->GetFootprintLibName() ) ); + THROW_IO_ERROR( msg ); } } - } - - // Search for missing modules on board. - for( unsigned ii = 0; ii < moduleInfoList.size(); ii++ ) - { - COMPONENT_INFO* cmp_info = moduleInfoList[ii]; - module = GetBoard()->FindModuleByReference( cmp_info->m_Reference ); - if( module == NULL ) // Module missing, not found in board + else { - aMissing.Add( cmp_info->m_Reference ); - aMissing.Add( cmp_info->m_Value ); - } - } + // Footprint already loaded from a library, duplicate it (faster) + if( module == NULL ) + continue; // Module does not exist in any library. - // Search for modules found on board but not in net list. - module = GetBoard()->m_Modules; - for( ; module != NULL; module = module->Next() ) - { - unsigned ii; - for( ii = 0; ii < moduleInfoList.size(); ii++ ) - { - COMPONENT_INFO* cmp_info = moduleInfoList[ii]; - if( module->GetReference().CmpNoCase( cmp_info->m_Reference ) == 0 ) - break; // Module is in net list. + module = new MODULE( *module ); } - if( ii == moduleInfoList.size() ) // Module not found in netlist - aNotInNetlist.push_back( module ); + wxASSERT( module != NULL ); + component->SetModule( module ); } - - return true; } diff --git a/pcbnew/netlist_reader.h b/pcbnew/netlist_reader.h index dabf7b8a95..c307648ade 100644 --- a/pcbnew/netlist_reader.h +++ b/pcbnew/netlist_reader.h @@ -1,5 +1,5 @@ #ifndef NETLIST_READER_H -#define NETLIST_READER_H +#define NETLIST_READER_H /** * @file netlist_reader.h @@ -9,6 +9,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2012 Jean-Pierre Charras. + * Copyright (C) 2013 Wayne Stambaugh . * Copyright (C) 2012 KiCad Developers, see CHANGELOG.TXT for contributors. * * This program is free software; you can redistribute it and/or @@ -33,304 +34,472 @@ #include #include -#include -#include -#include #include -#include -#include -#include +#include // netlist_lexer is common to Eeschema and Pcbnew -/* - * Helper class, to store for a footprint the footprint filter info, - * found in new format KiCad netlist. - * For CvPcb only - * Note: features for CvPcb are for a temporary use. - * They could be removed when CvPcb is modified - * (perhaps when it does not use anumore a netlist to build the component to footprint link) + +using namespace NL_T; + + +class MODULE; +class LINE_READER; +class REPORTER; + + +/** + * Class COMPONENT_NET + * is used to store the component pin name to net name associations stored in a netlist. */ -class LIPBART_INFO +class COMPONENT_NET { -public: - wxString m_Libpart; // the libpart name. - wxArrayString m_FootprintFilter; // an array of footprint filters found in netlist, - // for this footprint + wxString m_pinName; + wxString m_netNumber; + wxString m_netName; public: + COMPONENT_NET() {} - LIPBART_INFO( const wxString& aLibpart ) + COMPONENT_NET( const wxString& aPinName, const wxString& aNetName ) { - m_Libpart = aLibpart; + m_pinName = aPinName; + m_netName = aNetName; } + + const wxString& GetPinName() const { return m_pinName; } + + const wxString& GetNetName() const { return m_netName; } + + bool IsValid() const { return !m_pinName.IsEmpty(); } + + bool operator <( const COMPONENT_NET& aNet ) const + { + return m_pinName < aNet.m_pinName; + } + +#if defined(DEBUG) + /** + * Function Show + * is used to output the object tree, currently for debugging only. + * @param aNestLevel An aid to prettier tree indenting, and is the level + * of nesting of this object within the overall tree. + * @param aReporter A reference to a #REPORTER object to output to. + */ + virtual void Show( int aNestLevel, REPORTER& aReporter ); +#endif }; -typedef std::vector LIPBART_INFO_LIST; + +typedef std::vector< COMPONENT_NET > COMPONENT_NETS; -/* - * Helper class, to store components and footprints info found in netlist. - * (component reference and time stamp, footprint name ... +/** + * Class COMPONENT + * is used to store components and all of their related information found in a netlist. */ -class COMPONENT_INFO +class COMPONENT { -public: - wxString m_Footprint; // the footprint name found in netlist, the in .cmp file - wxString m_Reference; // the schematic reference found in netlist - wxString m_Value; // the schematic value found in netlist + COMPONENT_NETS m_nets; + wxArrayString m_footprintFilters; ///< Footprint filters found in netlist. + wxString m_reference; ///< The component reference designator found in netlist. + wxString m_value; ///< The component value found in netlist. + // ZZZ This timestamp is string, not time_t - wxString m_TimeStamp; // the schematic full time stamp found in netlist - wxString m_Libpart; // the schematic libpart found in netlist - wxArrayString m_FootprintFilter; // a footprint filters list found in old format netlist - int m_pinCount; // the number of pins found in the netlist + wxString m_timeStamp; ///< The component full time stamp found in netlist. + wxString m_name; ///< The name of the component found in the netlist. -public: COMPONENT_INFO( const wxString& libname, - const wxString& cmpname, - const wxString& value, - const wxString& timestamp ) + /// The name of the footprint in the library assigned to the component. + wxString m_footprintLibName; + + /// The lib part name used to look up the component library part information. This only has + /// meaning in the new s-expression netlist file format. + wxString m_libraryName; + wxString m_libraryPartName; + + /// The footprint loaded from the library for this component. + std::auto_ptr< MODULE > m_footprint; + + static COMPONENT_NET m_emptyNet; + +public: + COMPONENT( const wxString& aName, + const wxString& aReference, + const wxString& aValue, + const wxString& aTimeStamp ) { - m_Footprint = libname; - m_Reference = cmpname; - m_Value = value; - m_TimeStamp = timestamp; - m_pinCount = 0; + m_name = aName; + m_reference = aReference; + m_value = aValue; + m_timeStamp = aTimeStamp; } - ~COMPONENT_INFO() { }; + virtual ~COMPONENT() { }; + + void AddNet( const wxString& aPinName, const wxString& aNetName ) + { + m_nets.push_back( COMPONENT_NET( aPinName, aNetName ) ); + } + + unsigned GetNetCount() const { return m_nets.size(); } + + const COMPONENT_NET& GetNet( unsigned aIndex ) const { return m_nets[aIndex]; } + + const COMPONENT_NET& GetNet( const wxString& aPinName ); + + void SortPins() { sort( m_nets.begin(), m_nets.end() ); } + + const wxString& GetReference() const { return m_reference; } + + const wxString& GetValue() const { return m_value; } + + void SetFootprintLibName( const wxString& aFootprintLibName ) + { + m_footprintLibName = aFootprintLibName; + } + + const wxString& GetFootprintLibName() const { return m_footprintLibName; } + + const wxString& GetTimeStamp() const { return m_timeStamp; } + + const wxString& GetLibName() const { return m_name; } + + void SetLibrarySource( const wxString& aLibName, const wxString& aCompName ) + { + m_libraryName = aLibName; + m_libraryPartName = aCompName; + } + + void SetFootprintFilters( const wxArrayString& aFilterList ) + { + m_footprintFilters = aFilterList; + } + + const wxArrayString& GetFootprintFilters() const { return m_footprintFilters; } + + MODULE* GetModule( bool aRelease = false ) + { + return ( aRelease ) ? m_footprint.release() : m_footprint.get(); + } + + void SetModule( MODULE* aModule ); + + bool IsLibSource( const wxString& aLibName, const wxString& aCompName ) const + { + return aLibName == m_libraryName && aCompName == m_libraryPartName; + } + +#if defined(DEBUG) + /** + * Function Show + * is used to output the object tree, currently for debugging only. + * @param aNestLevel An aid to prettier tree indenting, and is the level + * of nesting of this object within the overall tree. + * @param aReporter A reference to a #REPORTER object to output to. + */ + virtual void Show( int aNestLevel, REPORTER& aReporter ); +#endif }; -enum typenetlist + +typedef boost::ptr_vector< COMPONENT > COMPONENTS; +typedef COMPONENTS::iterator COMPONENTS_ITER; +typedef COMPONENTS::const_iterator COMPONENTS_CITER; + + +/** + * Class NETLIST + * stores all of information read from a netlist along with the flags used to update + * the NETLIST in the #BOARD. + */ +class NETLIST { - NETLIST_TYPE_UNSPECIFIED = 0, - NETLIST_TYPE_ORCADPCB2, // the basic format used by pcbnew - NETLIST_TYPE_PCBNEW, // the format used by pcbnew, basic format + more info - NETLIST_TYPE_KICAD // new format using common S expression + COMPONENTS m_components; ///< Components found in the netlist. + + /// Remove footprints from #BOARD not found in netlist when true. + bool m_deleteExtraFootprints; + + /// Do not actually make any changes. Only report changes to #BOARD from netlist + /// when true. + bool m_isDryRun; + + /// Find component by time stamp if true or reference designator if false. + bool m_findByTimeStamp; + + /// Replace component footprints when they differ from the netlist if true. + bool m_replaceFootprints; + +public: + NETLIST() : + m_deleteExtraFootprints( false ), + m_isDryRun( false ), + m_findByTimeStamp( false ), + m_replaceFootprints( false ) + { + } + + /** + * Function IsEmpty() + * @return true if there are no components in the netlist. + */ + bool IsEmpty() const { return m_components.empty(); } + + /** + * Function Clear + * removes all components from the netlist. + */ + void Clear() { m_components.clear(); } + + /** + * Function GetCount + * @return the number of components in the netlist. + */ + unsigned GetCount() const { return m_components.size(); } + + /** + * Function GetComponent + * returns the #COMPONENT at \a aIndex. + * + * @param aIndex the index in #m_components to fetch. + * @return a pointer to the #COMPONENT at \a Index. + */ + COMPONENT* GetComponent( unsigned aIndex ) { return &m_components[ aIndex ]; } + + /** + * Function AddComponent + * adds \a aComponent to the NETLIST. + * + * @note If \a aComponent already exists in the NETLIST, \a aComponent is deleted + * to prevent memory leaks. An assertion is raised in debug builds. + * + * @param aComponent is the COMPONENT to save to the NETLIST. + */ + void AddComponent( COMPONENT* aComponent ); + + /* + * Function GetComponentByReference + * returns a #COMPONENT by \a aReference. + * + * @param aReference is the reference designator the #COMPONENT. + * @return a pointer to the #COMPONENT that matches \a aReference if found. Otherwise NULL. + */ + COMPONENT* GetComponentByReference( const wxString& aReference ); + + /* + * Function GetComponentByTimeStamp + * returns a #COMPONENT by \a aTimeStamp. + * + * @param aTimeStamp is the time stamp the #COMPONENT. + * @return a pointer to the #COMPONENT that matches \a aTimeStamp if found. Otherwise NULL. + */ + COMPONENT* GetComponentByTimeStamp( const wxString& aTimeStamp ); + + /* + * Function GetComponentByLibName + * returns a #COMPONENT by \a aLibName. + * + * @param aLibName is the component library name of the #COMPONENT. + * @return a pointer to the #COMPONENT that matches \a aLibName if found. Otherwise NULL. + */ + COMPONENT* GetComponentByLibName( const wxString& aLibName ); + + void SortByFootprintLibName(); + + void SortByReference(); + + void SetDeleteExtraFootprints( bool aDeleteExtraFootprints ) + { + m_deleteExtraFootprints = aDeleteExtraFootprints; + } + + bool GetDeleteExtraFootprints() const { return m_deleteExtraFootprints; } + + void SetIsDryRun( bool aIsDryRun ) { m_isDryRun = aIsDryRun; } + + bool IsDryRun() const { return m_isDryRun; } + + void SetFindByTimeStamp( bool aFindByTimeStamp ) { m_findByTimeStamp = aFindByTimeStamp; } + + bool IsFindByTimeStamp() const { return m_findByTimeStamp; } + + void SetReplaceFootprints( bool aReplaceFootprints ) + { + m_replaceFootprints = aReplaceFootprints; + } + + bool GetReplaceFootprints() const { return m_replaceFootprints; } + +#if defined(DEBUG) + /** + * Function Show + * is used to output the object tree, currently for debugging only. + * @param aNestLevel An aid to prettier tree indenting, and is the level + * of nesting of this object within the overall tree. + * @param aReporter A reference to a #REPORTER object to output to. + */ + virtual void Show( int aNestLevel, REPORTER& aReporter ); +#endif }; -typedef std::vector COMPONENT_INFO_LIST; -/* - * Helper class, to read a netlist. +/** + * Class CMP_READER + * reads a component footprint link file (*.cmp) format. + */ +class CMP_READER +{ + LINE_READER* m_lineReader; ///< The line reader to read. + +public: + CMP_READER( LINE_READER* aLineReader ) + { + m_lineReader = aLineReader; + } + + /** + * Function Load + * read the *.cmp file format contains the component footprint assignments created by CvPcb + * into \a aNetlist. + * + * @param aNetlist is the #NETLIST to read into. + * + * @todo At some point in the future, use the footprint field in the new s-expression + * netlist file to assign a footprint to a component instead of using a secondary + * (*.cmp) file. + * + * Sample file footprint assignment entry: + * + * Cmp-Mod V01 Genere by CvPcb 29/10/2003-13: 11:6 * + * BeginCmp + * TimeStamp = /32307DE2/AA450F67; + * Reference = C1; + * ValeurCmp = 47uF; + * IdModule = CP6; + * EndCmp + * + * @throw IO_ERROR if a the #LINE_READER IO error occurs. + * @throw PARSE_ERROR if an error occurs while parsing the file. + */ + void Load( NETLIST* aNetlist ) throw( IO_ERROR, PARSE_ERROR ); +}; + + +/** + * Class NETLIST_READER + * is a pure virtual class to derive a specific type of netlist reader from. */ class NETLIST_READER { -private: - PCB_EDIT_FRAME* m_pcbframe; // the main Pcbnew frame (or NULL for CvPcb) - wxTextCtrl* m_messageWindow; // a textctrl to show messages (can be NULL) - wxString m_netlistFullName; // The full netlist filename - wxString m_cmplistFullName; // The full component/footprint association filename - MODULE* m_currModule; // The footprint currently being read in netlist - COMPONENT_INFO_LIST m_componentsInNetlist; // The list of footprints, found in netlist - // (must be loaded from libraries) - COMPONENT_INFO_LIST m_newModulesList; // The list of new footprints, - // found in netlist, but not on board - // (must be loaded from libraries) - LIPBART_INFO_LIST m_libpartList; // For Kicad new netlist format: - // list of libpart found in netlist - // A libpart contains the footprint filters for CvPcb - bool m_buildModuleListOnly; // if true read netlist, populates m_componentsInNetlist - // but do not read and change nets and modules on board - bool m_readLibpartSection; // if true read Libparts section, - // and therefore the footprints filters - enum typenetlist m_typeNetlist; // type opt the netlist currently read +protected: + NETLIST* m_netlist; ///< The net list to read the file(s) into. + bool m_loadFootprintFilters; ///< Load the component footprint filters section if true. + bool m_loadNets; ///< Load the nets section of the netlist file if true. + LINE_READER* m_lineReader; ///< The line reader of the netlist. -public: - bool m_UseCmpFile; // true to use .cmp files as component/footprint file link - // false to use netlist only to know component/footprint link - bool m_UseTimeStamp; // Set to true to identify footprints by time stamp - // false to use schematic reference - bool m_ChangeFootprints; // Set to true to change existing footprints to new ones - // when netlist gives a different footprint name + /// The reader used to load the footprint links. If NULL, footprint links are not read. + CMP_READER* m_footprintReader; public: - NETLIST_READER( PCB_EDIT_FRAME* aFrame, wxTextCtrl* aMessageWindow = NULL ) + enum NETLIST_FILE_T { - m_pcbframe = aFrame; - m_messageWindow = aMessageWindow; - m_UseTimeStamp = false; - m_ChangeFootprints = false; - m_UseCmpFile = true; - m_buildModuleListOnly = false; - m_readLibpartSection = false; - m_typeNetlist = NETLIST_TYPE_UNSPECIFIED; + UNKNOWN = -1, + ORCAD, + LEGACY, + KICAD, + + // Add new types here. Don't forget to create the appropriate class derived from + // NETCLASS_READER and add the entry to the NETLIST_READER::GetNetlistReader() + // function. + }; + + NETLIST_READER( LINE_READER* aLineReader, + NETLIST* aNetlist, + CMP_READER* aFootprintLinkReader = NULL ) + { + wxASSERT( aLineReader != NULL ); + + m_lineReader = aLineReader; + m_footprintReader = aFootprintLinkReader; + m_netlist = aNetlist; + m_loadFootprintFilters = true; + m_loadNets = true; } - ~NETLIST_READER() - { - // Free modules info list: - for( unsigned ii = 0; ii < m_newModulesList.size(); ii++ ) - delete m_componentsInNetlist[ii]; - - m_componentsInNetlist.clear(); - m_newModulesList.clear(); - - // Free libpart info list: - for( unsigned ii = 0; ii < m_libpartList.size(); ii++ ) - delete m_libpartList[ii]; - m_libpartList.clear(); - } + virtual ~NETLIST_READER(); /** - * Function GetNetlistType - * @return the type of netlist read: - * NETLIST_TYPE_UNSPECIFIED: Unknown format - * NETLIST_TYPE_ORCADPCB2: the basic format used by pcbnew - * NETLIST_TYPE_PCBNEW: the format used by pcbnew, basic format + more info - * NETLIST_TYPE_KICAD: the new format + * Function GuessNetlistFileType + * looks at \a aFileHeaderLine to see if it matches any of the netlist file types it + * knows about. + * + * @param aLineReader is the #LINE_READER object containing lines from the netlist to test. + * @return the #NETLIST_FILE_T of \a aLineReader. */ - int GetNetlistType() - { - return m_typeNetlist; - } + static NETLIST_FILE_T GuessNetlistFileType( LINE_READER* aLineReader ); /** - * Function GetComponentInfoList - * @return the component info list built from the netlist + * Function GetNetlistReader + * attempts to determine the net list file type of \a aNetlistFileName and return the + * appropriate NETLIST_READER type. + * + * @param aNetlist is the netlist to load \a aNetlistFileName into. + * @param aNetlistFileName is the full path and file name of the net list to read. + * @param aCompFootprintFileName is the full path and file name of the component footprint + * associations to read. Set to wxEmptyString if loading the + * footprint association file is not required. + * @return the appropriate NETLIST_READER if \a aNetlistFileName is a valid netlist or + * NULL if \a aNetlistFileName is not a valid netlist files. */ - COMPONENT_INFO_LIST& GetComponentInfoList() - { - return m_componentsInNetlist; - } + static NETLIST_READER* GetNetlistReader( NETLIST* aNetlist, + const wxString& aNetlistFileName, + const wxString& aCompFootprintFileName = wxEmptyString ) + throw( IO_ERROR ); /** - * Function GetComponentInfoList - * @return a reference to the libpart info corresponding to a given part - * @param aPartname = the name of the libpart + * Function LoadNetlist + * loads the contents of the netlist file into \a aNetlist. + * + * @throw IO_ERROR if a file IO error occurs. + * @throw PARSE_ERROR if an error occurs while parsing the file. */ - LIPBART_INFO* GetLibpart(const wxString & aPartname); + virtual void LoadNetlist() throw ( IO_ERROR, PARSE_ERROR ) = 0; /** - * Function IsCvPcbMode - * @return true if the netlist is read by CvPcb - * In cvpcb mode, nets are stored in module info, - * and the footprint filters list is read. - * There is also no board in CvPcb + * Function GetLineReader() + * @return the #LINE_READER associated with the #NETLIST_READER. */ - bool IsCvPcbMode() { return m_pcbframe == 0; } + LINE_READER* GetLineReader(); +}; + +/** + * Class LEGACY_NETLIST_READER + * reads the KiCad legacy and the old Orcad netlist formats. + * + * The KiCad legacy netlist format was derived directly from an old Orcad netlist format. The + * primary difference is the header was changed so this reader can read both formats. + */ +class LEGACY_NETLIST_READER : public NETLIST_READER +{ /** - * Function AddModuleInfo - * Add a new module info to the main list of modules ifo - * @param aModInfo = a reference to the item to add + * Function loadComponent + * read the \a aLine containing the description of a component from a legacy format + * netlist and add it to the netlist. + * + * Analyze the first line of a component description in netlist: + * ( /40C08647 $noname R20 4.7K {Lib=R} + * + * @param aText contains the first line of description + * @return the new component created by parsing \a aLine + * @throw PARSE_ERROR when \a aLine is not a valid component description. */ - void AddModuleInfo( COMPONENT_INFO* aModInfo ) - { - m_componentsInNetlist.push_back( aModInfo ); - } + COMPONENT* loadComponent( char* aText ) throw( PARSE_ERROR ); /** - * Function AddLibpartInfo - * LIPBART_INFO items (and therefore footprint filter strings) are stored in - * m_libpartList - * @param aPartInfo = a refernce to the LIPBART_INFO to add in list - */ - void AddLibpartInfo( LIPBART_INFO * aPartInfo ) - { - m_libpartList.push_back( aPartInfo ); - } - - /** - * Function ReadLibpartSectionSetOpt - * Set to true or false the read Partlists section. - * footprint filters are found in this section - * When this option is false, the Partlists section is ignored - * When this option is true, the Partlists section is read, - * Libpart items (and therefore footprint filter strings) are stored in - * m_libpartList - * @param aOpt = the value of option - */ - void ReadLibpartSectionSetOpt( bool aOpt ) - { - m_readLibpartSection = aOpt; - } - - /** - * Function ReadLibpartSectionOpt - * @return the readPartlist option - */ - bool ReadLibpartSectionOpt() { return m_readLibpartSection; } - - /** - * Function BuildModuleListOnlySetOpt - * Set to true or false the Build Module List Only option - * When this option is false, a full netlist read is made, - * and modules are added/modified - * When this option is true, a partial netlist read is made - * and only the list of modules found in netlist is built - * @param aOpt = the value of option - */ - void BuildModuleListOnlySetOpt( bool aOpt ) - { - m_buildModuleListOnly = aOpt; - } - - /** - * Function BuildModuleListOnlyOpt - * Get the Build Module List Only option state - * @return the state of option (true/false) - */ - bool BuildModuleListOnlyOpt() - { - return m_buildModuleListOnly; - } - - /** - * Function InitializeModules - * Called when reading a netlist and after the module info list is populated - * Load new module and clear pads netnames - * return true if all modules are loaded, false if some are missing - */ - bool InitializeModules(); - - /** - * Function TestFootprintsMatchingAndExchange - * Called when reading a netlist, after the module info list is populated - * module reference updated (after a call to InitializeModules) - * Test, for each module, if the current footprint matches the footprint - * given by the netlist (or the cmp file, if used) - * print a list of mismatches od exchange footprints i - * m_ChangeFootprints == true - */ - void TestFootprintsMatchingAndExchange(); - - - /** - * Function SetFilesnames - * initialize filenames - * @param aNetlistFileName = full filename of netlist - * @param aCmplistFileName = full filename of components file (can be empty) - * and the components file will be non used - */ - void SetFilesnames( const wxString& aNetlistFileName, - const wxString& aCmplistFileName ) - { - m_netlistFullName = aNetlistFileName; - m_cmplistFullName = aCmplistFileName; - } - - /** - * Function ReadNetList - * The main function to detect a netlist format, read the netlist, - * and update the board - * depending on the detected format, calls ReadOldFmtdNetList or ReadKicadNetList - * @param aFile = the already opened file (will be closed by the netlist reader) - * @return true if success - */ - bool ReadNetList( FILE* aFile ); - - /** - * Function ReadOldFmtdNetList - * The main function to read a netlist (old netlist format), - * and update the board - * @param aFile = the already opened file (will be closed by ReadOldFmtdNetList) - * @return true if success - */ - bool ReadOldFmtdNetList( FILE* aFile ); - - /** - * Function ReadOldFmtFootprintFilterList - * Read the section "Allowed footprints" like: + * Function loadFootprintFilters + * loads the footprint filter section of netlist file. + * + * Sample legacy footprint filter section: * { Allowed footprints by component: * $component R11 * R? @@ -342,99 +511,168 @@ public: * $endfootprintlist * } * - * And add the strings giving the footprint filter to m_FootprintFilter + * @throw IO_ERROR if a file IO error occurs. + * @throw PARSE_ERROR if an error occurs while parsing the file. + */ + void loadFootprintFilters() throw( IO_ERROR, PARSE_ERROR ); + + /** + * Function loadNet + * read a component net description from \a aText. + * + * @param aText is current line read from the netlist. + * @param aComponent is the component to add the net to. + * @throw PARSE_ERROR if a error occurs reading \a aText. + */ + void loadNet( char* aText, COMPONENT* aComponent ) throw( PARSE_ERROR ); + +public: + + LEGACY_NETLIST_READER( LINE_READER* aLineReader, + NETLIST* aNetlist, + CMP_READER* aFootprintLinkReader = NULL ) : + NETLIST_READER( aLineReader, aNetlist, aFootprintLinkReader ) + { + } + + /** + * Function LoadNetlist + * read the netlist file in the legacy format into \a aNetlist. + * + * The legacy netlist format is: + * \# EESchema Netlist Version 1.0 generee le 18/5/2005-12:30:22 + * ( + * ( 40C08647 $noname R20 4,7K {Lib=R} + * ( 1 VCC ) + * ( 2 MODB_1 ) + * ) + * ( 40C0863F $noname R18 4,7_k {Lib=R} + * ( 1 VCC ) + * ( 2 MODA_1 ) + * ) + * } + * \#End + * + * @throw IO_ERROR if a file IO error occurs. + * @throw PARSE_ERROR if an error occurs while parsing the file. + */ + virtual void LoadNetlist() throw ( IO_ERROR, PARSE_ERROR ); +}; + + +/** + * Class KICAD_NETLIST_PARSER + * is the parser for reading the KiCad s-expression netlist format. + */ +class KICAD_NETLIST_PARSER : public NETLIST_LEXER +{ +private: + T token; + LINE_READER* m_lineReader; ///< The line reader used to parse the netlist. Not owned. + NETLIST* m_netlist; ///< The netlist to parse into. Not owned. + + /** + * Function skipCurrent + * Skip the current token level, i.e + * search for the RIGHT parenthesis which closes the current description + */ + void skipCurrent() throw( IO_ERROR, PARSE_ERROR ); + + /** + * Function parseComponent + * parse a component description: + * (comp (ref P1) + * (value DB25FEMELLE) + * (footprint DB25FC) + * (libsource (lib conn) (part DB25)) + * (sheetpath (names /) (tstamps /)) + * (tstamp 3256759C)) + */ + void parseComponent() throw( IO_ERROR, PARSE_ERROR ); + + /** + * Function parseNet + * Parses a section like + * (net (code 20) (name /PC-A0) + * (node (ref BUS1) (pin 62)) + * (node (ref U3) (pin 3)) + * (node (ref U9) (pin M6))) + * + * and set the corresponding pads netnames + */ + void parseNet() throw( IO_ERROR, PARSE_ERROR ); + + /** + * Function parseLibPartList + * reads the section "libparts" in the netlist: + * (libparts + * (libpart (lib device) (part C) + * (description "Condensateur non polarise") + * (footprints + * (fp SM*) + * (fp C?) + * (fp C1-1)) + * (fields + * (field (name Reference) C) + * (field (name Value) C)) + * (pins + * (pin (num 1) (name ~) (type passive)) + * (pin (num 2) (name ~) (type passive)))) + * + * And add the strings giving the footprint filter (subsection footprints) * of the corresponding module info *

This section is used by CvPcb, and is not useful in Pcbnew, * therefore it it not always read

*/ - bool ReadOldFmtFootprintFilterList( FILE_LINE_READER& aNetlistReader ); + void parseLibPartList() throw( IO_ERROR, PARSE_ERROR ); + + +public: + KICAD_NETLIST_PARSER( LINE_READER* aReader, NETLIST* aNetlist ); + + void SetLineReader( LINE_READER* aLineReader ); + + void SetNetlist( NETLIST* aNetlist ) { m_netlist = aNetlist; } /** - * Function ReadKicadNetList - * The main function to read a netlist (new netlist format, using S expressions), - * and update the board - * @param aFile = the already opened file (will be closed by ReadKicadNetList) - * @return true if success + * Function Parse + * parse the full netlist */ - bool ReadKicadNetList( FILE* aFile ); + void Parse() throw( IO_ERROR, PARSE_ERROR ); - /** - * function RemoveExtraFootprints - * Remove (delete) not locked footprints found on board, but not in netlist - * The netlist is expected to be read, and the main module list info up to date - */ - void RemoveExtraFootprints( ); - - /** - * Function SetPadsNetName - * Update pads netnames for a given module. - * Because a pad name can be found more than once in this module, - * all pads matching the pad name are updated - * @param aModule = module reference - * @param aPadname = pad name (pad num) - * @param aNetname = new net name of the pad - * @param aPadList = a std::vector& buffer where the updated pads can be stored - * @return the pad count - */ - int SetPadsNetName( const wxString & aModule, const wxString & aPadname, - const wxString & aNetname, std::vector & aPadList ); - -private: - - /** - * Function FindModule - * search for a module id the modules existing in the current BOARD. - * @param aId = the key to identify the module to find: - * The reference or the full time stamp, according to m_UseTimeStamp - * @return the module found, or NULL. - */ - MODULE* FindModule( const wxString& aId ); - - /** - * Function SetPadNetName - * Update a pad netname using the current footprint - * from the netlist (line format: ( \ \ ) ) - * @param aText = current line read from netlist - */ - bool SetPadNetName( char* aText ); - - /** - * Function ReadOldFmtNetlistModuleDescr - * Read the full description of a footprint, from the netlist - * and update the corresponding module. - * @param aBuildList bool to switch between 2 modes: - * aBuildList = true: - * add module info added to m_newModulesList - * aBuildList = false: - * The module is searched in the board modules list - * @param aText contains the first line of description - * This function uses m_useFichCmp as a flag to know the footprint name: - * If true: component file *.cmp is used - * If false: the netlist only is used - * This flag is reset to false if the .cmp file is not found - * @return if aBuildList = true, a reference to the COMPONENT_INFO - * if aBuildList = false, a reference to the corresponding MODULE on board (NULL if not found) - */ - void* ReadOldFmtNetlistModuleDescr( char* aText, bool aBuildList ); - - /** - * Function loadNewModules - * Load from libraries new modules found in netlist and add them to the current Board. - * modules to load come from m_newModulesList - * @return false if a footprint is not found, true if all footprints are loaded - */ - bool loadNewModules(); - - /** - * function readModuleComponentLinkfile - * read the *.cmp file ( filename in m_cmplistFullName ) - * and initialize the m_Footprint member of each item in m_componentsInNetlist, - * when it is found in file, and with a non empty footprint value - * giving the equivalence between footprint names and components - * to find the footprint name corresponding to aCmpIdent - * @return true and the file can be read - */ - bool readModuleComponentLinkfile(); + // Useful for debug only: + const char* getTokenName( T aTok ) + { + return NETLIST_LEXER::TokenName( aTok ); + } }; -#endif // NETLIST_READER_H + +/** + * Class KICAD_NETLIST_READER + * read the new s-expression based KiCad netlist format. + */ +class KICAD_NETLIST_READER : public NETLIST_READER +{ + KICAD_NETLIST_PARSER* m_parser; ///< The s-expression format parser. + +public: + KICAD_NETLIST_READER( LINE_READER* aLineReader, + NETLIST* aNetlist, + CMP_READER* aFootprintLinkReader = NULL ) : + NETLIST_READER( aLineReader, aNetlist, aFootprintLinkReader ), + m_parser( new KICAD_NETLIST_PARSER( aLineReader, aNetlist ) ) + { + } + + virtual ~KICAD_NETLIST_READER() + { + if( m_parser ) + delete m_parser; + } + + virtual void LoadNetlist() throw ( IO_ERROR, PARSE_ERROR ); +}; + + +#endif // NETLIST_READER_H diff --git a/pcbnew/netlist_reader_common.cpp b/pcbnew/netlist_reader_common.cpp index f0cc2c58bc..7c563d4562 100644 --- a/pcbnew/netlist_reader_common.cpp +++ b/pcbnew/netlist_reader_common.cpp @@ -5,6 +5,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 1992-2011 Jean-Pierre Charras. + * Copyright (C) 2013 Wayne Stambaugh . * Copyright (C) 1992-2011 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or @@ -27,578 +28,392 @@ -#include -#include #include -#include - -#include -#include -#include +#include +#include #include +#include -#include +#include -/* - * Function ReadNetList - * The main function to detect the netlist format,and run the right netlist reader - * aFile = the already opened file (will be closed by the netlist reader) - */ -bool NETLIST_READER::ReadNetList( FILE* aFile ) -{ - // Try to determine the netlist type: - // Beginning of the first line of known formats, without spaces - #define HEADERS_COUNT 3 - #define HEADER_ORCADPCB "({EESchemaNetlist" - #define HEADER_PCBNEW "#EESchemaNetlist" - #define HEADER_KICAD_NETFMT "(export" - const std::string headers[HEADERS_COUNT] = - { - HEADER_ORCADPCB, HEADER_PCBNEW, HEADER_KICAD_NETFMT - }; - - int format = -1; - for ( int jj = 0; jj < HEADERS_COUNT; jj++ ) - { - int imax = headers[jj].size(); - int ii = 0; - for( ; ii < imax; ii++ ) - { - int data; - // Read header, and skip blanks to avoid errors if an header changes - do - { - data = fgetc( aFile ); - } while ( ( data == ' ' ) &&( EOF != data ) ) ; - - if( (int)headers[jj][ii] == data ) - continue; - break; - } - if( ii == imax ) // header found - { - format = jj; - break; - } - rewind( aFile ); - } - - rewind( aFile ); - bool success = false; - switch( format ) - { - case 0: - m_typeNetlist = NETLIST_TYPE_ORCADPCB2; - success = ReadOldFmtdNetList( aFile ); - break; - - case 1: - m_typeNetlist = NETLIST_TYPE_PCBNEW; - success = ReadOldFmtdNetList( aFile ); - break; - - case 2: - m_typeNetlist = NETLIST_TYPE_KICAD; - success = ReadKicadNetList( aFile ); - break; - - default: // Unrecognized format: - break; - - } - - return success; -} /** - * Function GetComponentInfoList - * @return a reference to the libpart info corresponding to a given part - * @param aPartname = the name of the libpart - */ -LIPBART_INFO* NETLIST_READER::GetLibpart(const wxString & aPartname) + * Function NestedSpace + * outputs nested space for pretty indenting. + * @param aNestLevel The nest count + * @param aReporter A reference to a #REPORTER object where to output. + * @return REPORTER& for continuation. + **/ +static REPORTER& NestedSpace( int aNestLevel, REPORTER& aReporter ) { - for( unsigned ii = 0; ii < m_libpartList.size(); ii++ ) - { - if( m_libpartList[ii]->m_Libpart == aPartname ) - return m_libpartList[ii]; - } + for( int i = 0; i < aNestLevel; ++i ) + aReporter.Report( wxT( " " ) ); - return NULL; + return aReporter; } -bool NETLIST_READER::InitializeModules() +#if defined(DEBUG) +void COMPONENT_NET::Show( int aNestLevel, REPORTER& aReporter ) { - if( m_UseCmpFile ) // Try to get footprint name from .cmp file - { - readModuleComponentLinkfile(); - } - - if( m_pcbframe == NULL ) - return true; - - for( unsigned ii = 0; ii < m_componentsInNetlist.size(); ii++ ) - { - COMPONENT_INFO* currcmp_info = m_componentsInNetlist[ii]; - // Test if module is already loaded. - wxString * idMod = m_UseTimeStamp? - &currcmp_info->m_TimeStamp : &currcmp_info->m_Reference; - - MODULE* module = FindModule( *idMod ); - if( module == NULL ) // not existing, load it - { - m_newModulesList.push_back( currcmp_info ); - } - } - - bool success = loadNewModules(); - - // Update modules fields - for( unsigned ii = 0; ii < m_componentsInNetlist.size(); ii++ ) - { - COMPONENT_INFO* currcmp_info = m_componentsInNetlist[ii]; - // Test if module is already loaded. - wxString * idMod = m_UseTimeStamp? - &currcmp_info->m_TimeStamp : &currcmp_info->m_Reference; - - MODULE* module = FindModule( *idMod ); - if( module ) - { - // Update current module ( reference, value and "Time Stamp") - module->SetReference( currcmp_info->m_Reference ); - module->SetValue(currcmp_info->m_Value ); - module->SetPath( currcmp_info->m_TimeStamp ); - } - else // not existing - { - } - } - - // clear pads netnames -#if 1 - // Clear only footprints found in netlist: - // This allow to have some footprints added by hand to the board - // left initialized - for( unsigned ii = 0; ii < m_componentsInNetlist.size(); ii++ ) - { - COMPONENT_INFO* currcmp_info = m_componentsInNetlist[ii]; - // We can used the reference to find the footprint, because - // it is now updated - wxString * idMod = &currcmp_info->m_Reference; - - MODULE* module = FindModule( *idMod ); - if( module ) - { - for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) - pad->SetNetname( wxEmptyString ); - } - } - -#else - // Clear all footprints - for( MODULE* module = m_pcbframe->GetBoard()->m_Modules; module; module = module->Next() ) - { - for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() ) - pad->SetNetname( wxEmptyString ); - } + NestedSpace( aNestLevel, aReporter ); + aReporter.Report( wxString::Format( wxT( "\n" ), + GetChars( m_pinName ), GetChars( m_netName ) ) ); +} #endif - return success; + +void COMPONENT::SetModule( MODULE* aModule ) +{ + m_footprint.reset( aModule ); + + if( aModule == NULL ) + return; + + aModule->SetReference( m_reference ); + aModule->SetValue( m_value ); + aModule->SetLibRef( m_footprintLibName ); + aModule->SetPath( m_timeStamp ); } -void NETLIST_READER::TestFootprintsMatchingAndExchange() + +COMPONENT_NET COMPONENT::m_emptyNet; + + +const COMPONENT_NET& COMPONENT::GetNet( const wxString& aPinName ) { -#ifdef PCBNEW - - // If a module is "exchanged", the new module is added to the end of - // module list. - - // Calculates the module count - int moduleCount = m_pcbframe->GetBoard()->m_Modules.GetCount(); - - MODULE* nextmodule; - MODULE *module = m_pcbframe->GetBoard()->m_Modules; - for( ; module && moduleCount; module = nextmodule, moduleCount-- ) + for( unsigned i = 0; i < m_nets.size(); i++ ) { - // Module can be deleted if exchanged, so store the next module. - nextmodule = module->Next(); + if( m_nets[i].GetPinName() == aPinName ) + return m_nets[i]; + } - // Search for the corresponding module info - COMPONENT_INFO * cmp_info = NULL; - for( unsigned ii = 0; ii < m_componentsInNetlist.size(); ii++ ) + return m_emptyNet; +} + + +#if defined(DEBUG) +void COMPONENT::Show( int aNestLevel, REPORTER& aReporter ) +{ + NestedSpace( aNestLevel, aReporter ); + aReporter.Report( wxT( "\n" ) ); + NestedSpace( aNestLevel+1, aReporter ); + aReporter.Report( wxString::Format( wxT( "\n" ), + GetChars( m_reference ), GetChars( m_value ), + GetChars( m_name ), GetChars( m_footprintLibName ), + GetChars( m_timeStamp ) ) ); + + if( !m_footprintFilters.IsEmpty() ) + { + NestedSpace( aNestLevel+1, aReporter ); + aReporter.Report( wxT( "\n" ) ); + + for( unsigned i = 0; i < m_footprintFilters.GetCount(); i++ ) { - COMPONENT_INFO * candidate = m_componentsInNetlist[ii]; - // Test if cmp_info matches the current module: - if( candidate->m_Reference.CmpNoCase( module->GetReference() ) == 0 ) - { - cmp_info = candidate; - break; - } + NestedSpace( aNestLevel+2, aReporter ); + aReporter.Report( wxString::Format( wxT( "<%s>\n" ), + GetChars( m_footprintFilters[i] ) ) ); } - if( cmp_info == NULL ) // not found in netlist - continue; + NestedSpace( aNestLevel+1, aReporter ); + aReporter.Report( wxT( "\n" ) ); + } - if( module->GetLibRef().CmpNoCase( cmp_info->m_Footprint ) != 0 ) + if( !m_nets.empty() ) + { + NestedSpace( aNestLevel+1, aReporter ); + aReporter.Report( wxT( "\n" ) ); + + for( unsigned i = 0; i < m_nets.size(); i++ ) + m_nets[i].Show( aNestLevel+3, aReporter ); + + NestedSpace( aNestLevel+1, aReporter ); + aReporter.Report( "\n" ); + } + + NestedSpace( aNestLevel, aReporter ); + aReporter.Report( "\n" ); +} +#endif + + +void NETLIST::AddComponent( COMPONENT* aComponent ) +{ + m_components.push_back( aComponent ); +} + + +COMPONENT* NETLIST::GetComponentByReference( const wxString& aReference ) +{ + COMPONENT* component = NULL; + + for( unsigned i = 0; i < m_components.size(); i++ ) + { + if( m_components[i].GetReference() == aReference ) { - if( m_ChangeFootprints ) // footprint exchange allowed. - { - MODULE* newModule = m_pcbframe->GetModuleLibrary( wxEmptyString, - cmp_info->m_Footprint, - false ); - - if( newModule ) - { - // Change old module to the new module (and delete the old one) - m_pcbframe->Exchange_Module( module, newModule, NULL ); - } - else if( m_messageWindow ) - { - wxString msg; - msg.Printf( _( "Component %s: module %s not found\n" ), - GetChars( cmp_info->m_Reference ), - GetChars( cmp_info->m_Footprint ) ); - - m_messageWindow->AppendText( msg ); - } - } - else if( m_messageWindow ) - { - wxString msg; - msg.Printf( _( "Component %s: Mismatch! module is %s and netlist said %s\n" ), - GetChars( cmp_info->m_Reference ), - GetChars( module->GetLibRef() ), - GetChars( cmp_info->m_Footprint ) ); - - m_messageWindow->AppendText( msg ); - } + component = &m_components[i]; + break; } } -#endif + + return component; } + +COMPONENT* NETLIST::GetComponentByTimeStamp( const wxString& aTimeStamp ) +{ + COMPONENT* component = NULL; + + for( unsigned i = 0; i < m_components.size(); i++ ) + { + if( m_components[i].GetTimeStamp() == aTimeStamp ) + { + component = &m_components[i]; + break; + } + } + + return component; +} + + +COMPONENT* NETLIST::GetComponentByLibName( const wxString& aLibName ) +{ + COMPONENT* component = NULL; + + for( unsigned i = 0; i < m_components.size(); i++ ) + { + if( m_components[i].GetLibName() == aLibName ) + { + component = &m_components[i]; + break; + } + } + + return component; +} + + /** - * Function SetPadsNetName - * Update pads netnames for a given module. - * Because a pad name can be found more than once in this module, - * all pads matching the pad name are updated - * @param aModule = module reference - * @param aPadname = pad name (pad num) - * @param aNetname = new net name of the pad - * @param aPadList = a std::vector& buffer where the updated pads can be stored - * @return the pad count + * Function SortByLibName + * is a helper function used to sort the component list used by loadNewModules. */ -int NETLIST_READER::SetPadsNetName( const wxString & aModule, const wxString & aPadname, - const wxString & aNetname, std::vector & aPadList ) +static bool SortByLibName( const COMPONENT& ref, const COMPONENT& cmp ) { - if( m_pcbframe == NULL ) - return 0; - - int padcount = 0; - MODULE* module = m_pcbframe->GetBoard()->FindModuleByReference( aModule ); - - if( module ) - { - D_PAD * pad = module->FindPadByName( aPadname ); - - if( pad ) - { - padcount++; - aPadList.push_back( pad ); - pad->SetNetname( aNetname ); - // Search for other pads having the same pad name/num - for( D_PAD* curr_pad = pad->Next(); curr_pad; curr_pad = curr_pad->Next() ) - { - if( pad->PadNameEqual( curr_pad ) ) - { - padcount++; - aPadList.push_back( curr_pad ); - curr_pad->SetNetname( aNetname ); - } - } - return padcount; - } - - if( m_messageWindow ) - { - wxString msg; - msg.Printf( _( "Module %s: Pad %s not found" ), - GetChars( aModule ), GetChars( aPadname ) ); - m_messageWindow->AppendText( msg + wxT( "\n" ) ); - } - } - - return 0; + return ref.GetFootprintLibName().CmpNoCase( cmp.GetFootprintLibName() ) > 0; } -/* function RemoveExtraFootprints - * Remove (delete) not locked footprints found on board, but not in netlist - */ -void NETLIST_READER::RemoveExtraFootprints() +void NETLIST::SortByFootprintLibName() { - MODULE* nextModule; - MODULE* module = m_pcbframe->GetBoard()->m_Modules; + sort( m_components.begin(), m_components.end(), SortByLibName ); +} - for( ; module != NULL; module = nextModule ) + +/** + * Operator < + * compares two #COMPONENT objects by reference designator. + */ +bool operator < ( const COMPONENT& item1, const COMPONENT& item2 ) +{ + return StrNumCmp( item1.GetReference(), item2.GetReference(), INT_MAX, true ) < 0; +} + + +void NETLIST::SortByReference() +{ + sort( m_components.begin(), m_components.end() ); +} + + +#if defined( DEBUG ) +void NETLIST::Show( int aNestLevel, REPORTER& aReporter ) +{ + NestedSpace( aNestLevel, aReporter ); + aReporter.Report( "\n" ); + + if( !m_components.empty() ) { - unsigned ii; - nextModule = module->Next(); + NestedSpace( aNestLevel+1, aReporter ); + aReporter.Report( "\n" ); - if( module->IsLocked() ) - continue; - - for( ii = 0; ii < m_componentsInNetlist.size(); ii++ ) + for( unsigned i = 0; i < m_components.size(); i++ ) { - COMPONENT_INFO* cmp_info = m_componentsInNetlist[ii]; - - if( module->GetReference().CmpNoCase( cmp_info->m_Reference ) == 0 ) - break; // Module is found in net list. + m_components[i].Show( aNestLevel+2, aReporter ); } - if( ii == m_componentsInNetlist.size() ) // Module not found in netlist. - module->DeleteStructure(); + NestedSpace( aNestLevel+1, aReporter ); + + aReporter.Report( "\n" ); + } + + NestedSpace( aNestLevel, aReporter ); + aReporter.Report( "\n" ); +} +#endif + + +NETLIST_READER::~NETLIST_READER() +{ + if( m_lineReader ) + { + delete m_lineReader; + m_lineReader = NULL; + } + + if( m_footprintReader ) + { + delete m_footprintReader; + m_footprintReader = NULL; } } -/* Search for a module id the modules existing in the current BOARD. - * aId is a key to identify the module to find: - * The reference or the full time stamp, according to m_UseTimeStamp - * Returns the module is found, NULL otherwise. - */ -MODULE* NETLIST_READER::FindModule( const wxString& aId ) + +NETLIST_READER::NETLIST_FILE_T NETLIST_READER::GuessNetlistFileType( LINE_READER* aLineReader ) { - MODULE* module = m_pcbframe->GetBoard()->m_Modules; - for( ; module != NULL; module = module->Next() ) + wxRegEx reOrcad( wxT( "(?i)[ ]*\\({EESchema[ \t]+Netlist[ \t]+" ), wxRE_ADVANCED ); + wxASSERT( reOrcad.IsValid() ); + wxRegEx reLegacy( wxT( "(?i)#[ \t]+EESchema[ \t]+Netlist[ \t]+" ), wxRE_ADVANCED ); + wxASSERT( reLegacy.IsValid() ); + wxRegEx reKicad( wxT( "[ ]*\\(export[ ]+" ), wxRE_ADVANCED ); + wxASSERT( reKicad.IsValid() ); + + wxString line; + + while( aLineReader->ReadLine() ) { - if( m_UseTimeStamp ) // identification by time stamp - { - if( aId.CmpNoCase( module->GetPath() ) == 0 ) - return module; - } - else // identification by Reference - { - if( aId.CmpNoCase( module->GetReference() ) == 0 ) - return module; - } + line = FROM_UTF8( aLineReader->Line() ); + + if( reOrcad.Matches( line ) ) + return ORCAD; + else if( reLegacy.Matches( line ) ) + return LEGACY; + else if( reKicad.Matches( line ) ) + return KICAD; } - return NULL; + return UNKNOWN; } -/* - * function readModuleComponentLinkfile - * read the *.cmp file ( filename in m_cmplistFullName ) - * giving the equivalence Footprint_names / components - * to find the footprint name corresponding to aCmpIdent - * return true if the file can be read - * - * Sample file: - * - * Cmp-Mod V01 Genere by CvPcb 29/10/2003-13: 11:6 * - * BeginCmp - * TimeStamp = /32307DE2/AA450F67; - * Reference = C1; - * ValeurCmp = 47uF; - * IdModule = CP6; - * EndCmp - * - */ - -bool NETLIST_READER::readModuleComponentLinkfile() +NETLIST_READER* NETLIST_READER::GetNetlistReader( NETLIST* aNetlist, + const wxString& aNetlistFileName, + const wxString& aCompFootprintFileName ) + throw( IO_ERROR ) { - wxString refcurrcmp; // Stores value read from line like Reference = BUS1; - wxString timestamp; // Stores value read from line like TimeStamp = /32307DE2/AA450F67; - wxString footprint; // Stores value read from line like IdModule = CP6; + wxASSERT( aNetlist != NULL ); - FILE* cmpFile = wxFopen( m_cmplistFullName, wxT( "rt" ) ); + FILE* file = wxFopen( aNetlistFileName, wxT( "rt" ) ); - if( cmpFile == NULL ) + if( file == NULL ) { wxString msg; - msg.Printf( _( "File <%s> not found, use Netlist for footprints selection" ), - GetChars( m_cmplistFullName ) ); - - if( m_messageWindow ) - m_messageWindow->AppendText( msg ); - return false; + msg.Printf( _( "Cannot open file %s for reading." ), GetChars( aNetlistFileName ) ); + THROW_IO_ERROR( msg ); } - // netlineReader dtor will close cmpFile - FILE_LINE_READER netlineReader( cmpFile, m_cmplistFullName ); + FILE_LINE_READER* reader = new FILE_LINE_READER( file, aNetlistFileName ); + std::auto_ptr< FILE_LINE_READER > r( reader ); + + NETLIST_FILE_T type = GuessNetlistFileType( reader ); + reader->Rewind(); + + // The component footprint link reader is NULL if no file name was specified. + CMP_READER* cmpFileReader = NULL; + + if( !aCompFootprintFileName.IsEmpty() ) + { + cmpFileReader = new CMP_READER( new FILE_LINE_READER( aCompFootprintFileName ) ); + } + + switch( type ) + { + case LEGACY: + case ORCAD: + return new LEGACY_NETLIST_READER( r.release(), aNetlist, cmpFileReader ); + + case KICAD: + return new KICAD_NETLIST_READER( r.release(), aNetlist, cmpFileReader ); + + default: // Unrecognized format: + break; + + } + + return NULL; +} + + +void CMP_READER::Load( NETLIST* aNetlist ) throw( IO_ERROR, PARSE_ERROR ) +{ + wxCHECK_RET( aNetlist != NULL, wxT( "No netlist passed to CMP_READER::Load()" ) ); + + wxString reference; // Stores value read from line like Reference = BUS1; + wxString timestamp; // Stores value read from line like TimeStamp = /32307DE2/AA450F67; + wxString footprint; // Stores value read from line like IdModule = CP6; wxString buffer; wxString value; - while( netlineReader.ReadLine() ) - { - buffer = FROM_UTF8( netlineReader.Line() ); - if( ! buffer.StartsWith( wxT("BeginCmp") ) ) + while( m_lineReader->ReadLine() ) + { + buffer = FROM_UTF8( m_lineReader->Line() ); + + if( !buffer.StartsWith( wxT( "BeginCmp" ) ) ) continue; // Begin component description. - refcurrcmp.Empty(); + reference.Empty(); footprint.Empty(); timestamp.Empty(); - while( netlineReader.ReadLine() ) + while( m_lineReader->ReadLine() ) { - buffer = FROM_UTF8( netlineReader.Line() ); + buffer = FROM_UTF8( m_lineReader->Line() ); - if( buffer.StartsWith( wxT("EndCmp") ) ) + if( buffer.StartsWith( wxT( "EndCmp" ) ) ) break; // store string value, stored between '=' and ';' delimiters. value = buffer.AfterFirst( '=' ); - value = value.BeforeLast( ';'); - value.Trim(true); - value.Trim(false); + value = value.BeforeLast( ';' ); + value.Trim( true ); + value.Trim( false ); - if( buffer.StartsWith( wxT("Reference") ) ) + if( buffer.StartsWith( wxT( "Reference" ) ) ) { - refcurrcmp = value; + reference = value; continue; } - if( buffer.StartsWith( wxT("IdModule =" ) ) ) + if( buffer.StartsWith( wxT( "IdModule =" ) ) ) { footprint = value; continue; } - if( buffer.StartsWith( wxT("TimeStamp =" ) ) ) + if( buffer.StartsWith( wxT( "TimeStamp =" ) ) ) { timestamp = value; continue; } } - // Find the corresponding item in module info list: - for( unsigned ii = 0; ii < m_componentsInNetlist.size(); ii++ ) + // Find the corresponding item in component list: + COMPONENT* component = aNetlist->GetComponentByReference( reference ); + + // This cannot happen with a valid file. + if( component == NULL ) { - COMPONENT_INFO * cmp_info = m_componentsInNetlist[ii]; - if( m_UseTimeStamp ) // Use schematic timestamp to locate the footprint - { - if( cmp_info->m_TimeStamp.CmpNoCase( timestamp ) == 0 && - !timestamp.IsEmpty() ) - { // Found - if( !footprint.IsEmpty() ) - cmp_info->m_Footprint = footprint; - break; - } - } - else // Use schematic reference to locate the footprint - { - if( cmp_info->m_Reference.CmpNoCase( refcurrcmp ) == 0 ) // Found! - { - if( !footprint.IsEmpty() ) - cmp_info->m_Footprint = footprint; - break; - } - } + wxString msg; + msg.Printf( _( "Cannot find component \'%s\' in footprint assignment file." ), + GetChars( reference ) ); + THROW_PARSE_ERROR( msg, m_lineReader->GetSource(), m_lineReader->Line(), + m_lineReader->LineNumber(), m_lineReader->Length() ); } + + component->SetFootprintLibName( footprint ); } - - return true; -} - - -/* Function to sort the footprint list, used by loadNewModules. - * the given list is sorted by name - */ -#ifdef PCBNEW -static bool SortByLibName( COMPONENT_INFO* ref, COMPONENT_INFO* cmp ) -{ - int ii = ref->m_Footprint.CmpNoCase( cmp->m_Footprint ); - return ii > 0; -} -#endif - -/* Load new modules from library. - * If a new module is already loaded it is duplicated, which avoid multiple - * unnecessary disk or net access to read libraries. - * return false if a footprint is not found, true if OK - */ -bool NETLIST_READER::loadNewModules() -{ - bool success = true; -#ifdef PCBNEW - COMPONENT_INFO* ref_info, * cmp_info; - MODULE* Module = NULL; - wxPoint ModuleBestPosition; - BOARD* pcb = m_pcbframe->GetBoard(); - - if( m_newModulesList.size() == 0 ) - return true; - - sort( m_newModulesList.begin(), m_newModulesList.end(), SortByLibName ); - - // Calculate the footprint "best" position: - EDA_RECT bbbox = pcb->ComputeBoundingBox( true ); - - if( bbbox.GetWidth() || bbbox.GetHeight() ) - { - ModuleBestPosition = bbbox.GetEnd(); - ModuleBestPosition.y += 5000; - } - - ref_info = cmp_info = m_newModulesList[0]; - - for( unsigned ii = 0; ii < m_newModulesList.size(); ii++ ) - { - cmp_info = m_newModulesList[ii]; - - if( (ii == 0) || ( ref_info->m_Footprint != cmp_info->m_Footprint) ) - { - // New footprint : must be loaded from a library - Module = m_pcbframe->GetModuleLibrary( wxEmptyString, - cmp_info->m_Footprint, false ); - ref_info = cmp_info; - - if( Module == NULL ) - { - success = false; - if( m_messageWindow ) - { - wxString msg; - msg.Printf( _( "Component %s: footprint %s not found" ), - GetChars( cmp_info->m_Reference ), - GetChars( cmp_info->m_Footprint ) ); - - msg += wxT("\n"); - m_messageWindow->AppendText( msg ); - } - continue; - } - - Module->SetPosition( ModuleBestPosition ); - - /* Update schematic links : reference "Time Stamp" and schematic - * hierarchical path */ - Module->SetReference( cmp_info->m_Reference ); - Module->SetTimeStamp( GetNewTimeStamp() ); - Module->SetPath( cmp_info->m_TimeStamp ); - } - else - { - // Footprint already loaded from a library, duplicate it (faster) - if( Module == NULL ) - continue; // Module does not exist in library. - - MODULE* newmodule = new MODULE( *Module ); - newmodule->SetParent( pcb ); - - pcb->Add( newmodule, ADD_APPEND ); - - Module = newmodule; - Module->SetReference( cmp_info->m_Reference ); - Module->SetTimeStamp( GetNewTimeStamp() ); - Module->SetPath( cmp_info->m_TimeStamp ); - } - } -#endif - return success; } diff --git a/pcbnew/netlist_reader_firstformat.cpp b/pcbnew/netlist_reader_firstformat.cpp index c98b1eb122..57a7ec7e75 100644 --- a/pcbnew/netlist_reader_firstformat.cpp +++ b/pcbnew/netlist_reader_firstformat.cpp @@ -6,6 +6,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 1992-2011 Jean-Pierre Charras. + * Copyright (C) 2013 Wayne Stambaugh . * Copyright (C) 1992-2011 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or @@ -26,67 +27,23 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - -/* - * Netlist reader using the first format of pcbnew netlist. - * This netlist reader build the list of modules found in netlist - * (list in m_componentsInNetlist) - * and update pads netnames - */ - #include -#include -#include #include - -#include -#include -#include +#include #include -#include - -// constants used by ReadOldFmtNetlistModuleDescr(): -#define BUILDLIST true -#define READMODULE false -/* - * Function ReadOldFmtdNetList - * Update footprints (load missing footprints and delete on request extra - * footprints) - * Update References, values, "TIME STAMP" and connectivity data - * return true if Ok - * - * the format of the netlist is something like: - * # EESchema Netlist Version 1.0 generee le 18/5/2005-12:30:22 - * ( - * ( 40C08647 $noname R20 4,7K {Lib=R} - * ( 1 VCC ) - * ( 2 MODB_1 ) - * ) - * ( 40C0863F $noname R18 4,7_k {Lib=R} - * ( 1 VCC ) - * ( 2 MODA_1 ) - * ) - * } - * #End - */ -bool NETLIST_READER::ReadOldFmtdNetList( FILE* aFile ) + +void LEGACY_NETLIST_READER::LoadNetlist() throw ( IO_ERROR, PARSE_ERROR ) { - int state = 0; - bool is_comment = false; + int state = 0; + bool is_comment = false; + COMPONENT* component = NULL; - /* First, read the netlist: Build the list of footprints found in netlist - */ - - // netlineReader dtor will close aFile - FILE_LINE_READER netlineReader( aFile, m_netlistFullName ); - COMPONENT_INFO* curComponent = NULL; - - while( netlineReader.ReadLine() ) + while( m_lineReader->ReadLine() ) { - char* line = StrPurge( netlineReader.Line() ); + char* line = StrPurge( m_lineReader->Line() ); if( is_comment ) // Comments in progress { @@ -96,92 +53,17 @@ bool NETLIST_READER::ReadOldFmtdNetList( FILE* aFile ) is_comment = false; } + if( *line == '{' ) // Start Comment or Pcbnew info section { is_comment = true; - if( ReadLibpartSectionOpt() && state == 0 && - (strnicmp( line, "{ Allowed footprints", 20 ) == 0) ) + + if( m_loadFootprintFilters && state == 0 + && (strnicmp( line, "{ Allowed footprints", 20 ) == 0) ) { - ReadOldFmtFootprintFilterList( netlineReader ); + loadFootprintFilters(); continue; } - if( ( line = strchr( line, '}' ) ) == NULL ) - continue; - } - - if( *line == '(' ) - state++; - - if( *line == ')' ) - state--; - - if( state == 2 ) - { - curComponent = (COMPONENT_INFO*) ReadOldFmtNetlistModuleDescr( line, BUILDLIST ); - continue; - } - - if( state >= 3 ) // First pass: pad descriptions are not read here. - { - if( curComponent ) - curComponent->m_pinCount++; - - state--; - } - } - - if( IsCvPcbMode() ) - { - for( ; ; ) - { - /* Search the beginning of Allowed footprints section */ - - if( netlineReader.ReadLine( ) == 0 ) - break; - char* line = StrPurge( netlineReader.Line() ); - if( strnicmp( line, "{ Allowed footprints", 20 ) == 0 ) - { - ReadOldFmtFootprintFilterList( netlineReader ); - return true; - } - } - return true; - } - - if( BuildModuleListOnlyOpt() ) - return true; // at this point, the module list is read and built. - - // Load new footprints - bool success = InitializeModules(); - - if( !success ) - wxMessageBox( _( "Some footprints are not found in libraries" ) ); - - TestFootprintsMatchingAndExchange(); - - /* Second read , All footprints are on board. - * Update the schematic info (pad netnames) - */ - netlineReader.Rewind(); - m_currModule = NULL; - state = 0; - is_comment = false; - - while( netlineReader.ReadLine() ) - { - char* line = StrPurge( netlineReader.Line() ); - - if( is_comment ) // we are reading a comment - { - // Test for end of the current comment - if( ( line = strchr( line, '}' ) ) == NULL ) - continue; - is_comment = false; - } - - if( *line == '{' ) // this is the beginning of a comment - { - is_comment = true; if( ( line = strchr( line, '}' ) ) == NULL ) continue; @@ -195,190 +77,142 @@ bool NETLIST_READER::ReadOldFmtdNetList( FILE* aFile ) if( state == 2 ) { - m_currModule = (MODULE*) ReadOldFmtNetlistModuleDescr( line, READMODULE ); + component = loadComponent( line ); continue; } - if( state >= 3 ) + if( state >= 3 ) // Pad descriptions are read here. { - if( m_currModule ) - SetPadNetName( line ); + wxASSERT( component != NULL ); + + loadNet( line, component ); state--; } } - return true; + if( m_footprintReader ) + { + m_footprintReader->Load( m_netlist ); + } } -/* Function ReadOldFmtNetlistModuleDescr - * Read the beginning of a footprint description, from the netlist - * and add a module info to m_componentsInNetlist - * Analyze the first line of a component description in netlist like: - * ( /40C08647 $noname R20 4.7K {Lib=R} - * (1 VCC) - * (2 MODB_1) - * ) - */ -void* NETLIST_READER::ReadOldFmtNetlistModuleDescr( char* aText, bool aBuildList ) +COMPONENT* LEGACY_NETLIST_READER::loadComponent( char* aText ) throw( PARSE_ERROR ) { char* text; - wxString timeStampPath; // the full time stamp read from netlist - wxString footprintName; // the footprint name read from netlist - wxString cmpValue; // the component value read from netlist - wxString cmpReference; // the component schematic reference read from netlist - bool error = false; + wxString msg; + wxString timeStamp; // the full time stamp read from netlist + wxString name; // the component name read from netlist + wxString value; // the component value read from netlist + wxString reference; // the component schematic reference designator read from netlist char line[1024]; strcpy( line, aText ); - cmpValue = wxT( "~" ); + value = wxT( "~" ); - // Read descr line like /40C08647 $noname R20 4.7K {Lib=R} + // Sample component line: /40C08647 $noname R20 4.7K {Lib=R} // Read time stamp (first word) if( ( text = strtok( line, " ()\t\n" ) ) == NULL ) - error = true; - else - timeStampPath = FROM_UTF8( text ); + { + msg = _( "Cannot parse time stamp in component section of netlist." ); + THROW_PARSE_ERROR( msg, m_lineReader->GetSource(), line, m_lineReader->LineNumber(), + m_lineReader->Length() ); + } + + timeStamp = FROM_UTF8( text ); // Read footprint name (second word) if( ( text = strtok( NULL, " ()\t\n" ) ) == NULL ) - error = true; - else - footprintName = FROM_UTF8( text ); + { + msg = _( "Cannot parse name in component section of netlist." ); + THROW_PARSE_ERROR( msg, m_lineReader->GetSource(), aText, m_lineReader->LineNumber(), + m_lineReader->Length() ); + } - // Read schematic reference (third word) + name = FROM_UTF8( text ); + + // Read schematic reference designator (third word) if( ( text = strtok( NULL, " ()\t\n" ) ) == NULL ) - error = true; - else - cmpReference = FROM_UTF8( text ); + { + msg = _( "Cannot parse reference designator in component section of netlist." ); + THROW_PARSE_ERROR( msg, m_lineReader->GetSource(), aText, m_lineReader->LineNumber(), + m_lineReader->Length() ); + } + + reference = FROM_UTF8( text ); // Read schematic value (forth word) if( ( text = strtok( NULL, " ()\t\n" ) ) == NULL ) - error = true; - else - cmpValue = FROM_UTF8( text ); - - if( error ) - return NULL; - - if( aBuildList ) { - COMPONENT_INFO* cmp_info = new COMPONENT_INFO( footprintName, cmpReference, - cmpValue, timeStampPath ); - AddModuleInfo( cmp_info ); - return cmp_info; + msg = _( "Cannot parse value in component section of netlist." ); + THROW_PARSE_ERROR( msg, m_lineReader->GetSource(), aText, m_lineReader->LineNumber(), + m_lineReader->Length() ); } - // search the module loaded on board - // reference and time stamps are already updated so we can use search by reference only - MODULE* module = m_pcbframe->GetBoard()->FindModuleByReference( cmpReference ); - if( module == NULL ) - { - if( m_messageWindow ) - { - wxString msg; - msg.Printf( _( "Component %s not found" ), GetChars( cmpReference ) ); - m_messageWindow->AppendText( msg + wxT( "\n" ) ); - } - } + value = FROM_UTF8( text ); - return module; + COMPONENT* component = new COMPONENT( name, reference, value, timeStamp ); + m_netlist->AddComponent( component ); + return component; } -/* - * Function SetPadNetName - * Update a pad netname using the current footprint - * Line format: ( = ) - * Param aText = current line read from netlist - */ -bool NETLIST_READER::SetPadNetName( char* aText ) +void LEGACY_NETLIST_READER::loadNet( char* aText, COMPONENT* aComponent ) throw( PARSE_ERROR ) { - char* p; - char line[256]; + wxString msg; + char* p; + char line[256]; - if( m_currModule == NULL ) - return false; - - strncpy( line, aText, sizeof(line) ); + strncpy( line, aText, sizeof( line ) ); if( ( p = strtok( line, " ()\t\n" ) ) == NULL ) - return false; + { + msg = _( "Cannot parse pin name in component net section of netlist." ); + THROW_PARSE_ERROR( msg, m_lineReader->GetSource(), line, m_lineReader->LineNumber(), + m_lineReader->Length() ); + } wxString pinName = FROM_UTF8( p ); if( ( p = strtok( NULL, " ()\t\n" ) ) == NULL ) - return false; + { + msg = _( "Cannot parse net name in component net section of netlist." ); + THROW_PARSE_ERROR( msg, m_lineReader->GetSource(), line, m_lineReader->LineNumber(), + m_lineReader->Length() ); + } wxString netName = FROM_UTF8( p ); - bool found = false; - for( D_PAD* pad = m_currModule->Pads(); pad; pad = pad->Next() ) - { - wxString padName = pad->GetPadName(); + if( (char) netName[0] == '?' ) // ? indicates no net connected to pin. + netName = wxEmptyString; - if( padName == pinName ) - { - found = true; - if( (char) netName[0] != '?' ) - pad->SetNetname( netName ); - else - pad->SetNetname( wxEmptyString ); - } - } - - if( !found ) - { - if( m_messageWindow ) - { - wxString msg; - msg.Printf( _( "Module %s: Pad %s not found" ), - GetChars( m_currModule->GetReference() ), - GetChars( pinName ) ); - m_messageWindow->AppendText( msg + wxT( "\n" ) ); - } - } - - return found; + aComponent->AddNet( pinName, netName ); } -/* - * Read the section "Allowed footprints" like: - * { Allowed footprints by component: - * $component R11 - * R? - * SM0603 - * SM0805 - * R?-* - * SM1206 - * $endlist - * $endfootprintlist - * } - * - * And add the strings giving the footprint filter to m_FootprintFilter - * of the corresponding module info - * This section is used by CvPcb, and is not useful in Pcbnew, - * therefore it it not always read - */ -bool NETLIST_READER::ReadOldFmtFootprintFilterList( FILE_LINE_READER& aNetlistReader ) +void LEGACY_NETLIST_READER::loadFootprintFilters() throw( IO_ERROR, PARSE_ERROR ) { - wxString cmpRef; - COMPONENT_INFO* cmp_info = NULL; - char* line; + wxArrayString filters; + wxString cmpRef; + char* line; + COMPONENT* component; - while( ( line = aNetlistReader.ReadLine() ) != NULL ) + while( ( line = m_lineReader->ReadLine() ) != NULL ) { - if( strnicmp( line, "$endlist", 8 ) == 0 ) // end of list for the current component + if( strnicmp( line, "$endlist", 8 ) == 0 ) // end of list for the current component { - cmp_info = NULL; + wxASSERT( component != NULL ); + component->SetFootprintFilters( filters ); + component = NULL; + filters.Clear(); continue; } + if( strnicmp( line, "$endfootprintlist", 4 ) == 0 ) // End of this section - return 0; + return; if( strnicmp( line, "$component", 10 ) == 0 ) // New component reference found { @@ -386,25 +220,25 @@ bool NETLIST_READER::ReadOldFmtFootprintFilterList( FILE_LINE_READER& aNetlistR cmpRef.Trim( true ); cmpRef.Trim( false ); - // Search the current component in module info list: - BOOST_FOREACH( COMPONENT_INFO * &component, m_componentsInNetlist ) + component = m_netlist->GetComponentByReference( cmpRef ); + + // Cannot happen if the netlist is valid. + if( component == NULL ) { - if( component->m_Reference == cmpRef ) - { - cmp_info = component; - break; - } + wxString msg; + msg.Printf( _( "Cannot find component \'%s\' in footprint filter section " + "of netlist." ), GetChars( cmpRef ) ); + THROW_PARSE_ERROR( msg, m_lineReader->GetSource(), line, m_lineReader->LineNumber(), + m_lineReader->Length() ); } } - else if( cmp_info ) + else { // Add new filter to list wxString fp = FROM_UTF8( line + 1 ); fp.Trim( false ); fp.Trim( true ); - cmp_info->m_FootprintFilter.Add( fp ); + filters.Add( fp ); } } - - return true; } diff --git a/pcbnew/netlist_reader_kicad.cpp b/pcbnew/netlist_reader_kicad.cpp index 6b7de75230..424d7cb963 100644 --- a/pcbnew/netlist_reader_kicad.cpp +++ b/pcbnew/netlist_reader_kicad.cpp @@ -27,142 +27,50 @@ #include #include // netlist_lexer is common to Eeschema and Pcbnew +#include #include using namespace NL_T; -/** - * Class PCB_PLOT_PARAMS_PARSER - * is the parser class for PCB_PLOT_PARAMS. - */ -class NETLIST_READER_KICAD_PARSER : public NETLIST_LEXER + +void KICAD_NETLIST_READER::LoadNetlist() throw ( IO_ERROR, PARSE_ERROR ) { -private: - T token; - NETLIST_READER * netlist_reader; + m_parser->Parse(); -public: - NETLIST_READER_KICAD_PARSER( FILE_LINE_READER* aReader, NETLIST_READER *aNetlistReader ); - - /** - * Function Parse - * parse the full netlist - */ - void Parse( BOARD * aBrd ) throw( IO_ERROR, PARSE_ERROR ); - - /** - * Function ParseComp - * parse the comp description like - * (comp (ref P1) - * (value DB25FEMELLE) - * (footprint DB25FC) - * (libsource (lib conn) (part DB25)) - * (sheetpath (names /) (tstamps /)) - * (tstamp 3256759C)) - */ - COMPONENT_INFO* ParseComp() throw( IO_ERROR, PARSE_ERROR ); - - - /** - * Function ParseKicadLibpartList - * Read the section "libparts" like: - * (libparts - * (libpart (lib device) (part C) - * (description "Condensateur non polarise") - * (footprints - * (fp SM*) - * (fp C?) - * (fp C1-1)) - * (fields - * (field (name Reference) C) - * (field (name Value) C)) - * (pins - * (pin (num 1) (name ~) (type passive)) - * (pin (num 2) (name ~) (type passive)))) - * - * And add the strings giving the footprint filter (subsection footprints) - * of the corresponding module info - *

This section is used by CvPcb, and is not useful in Pcbnew, - * therefore it it not always read

- */ - void ParseKicadLibpartList() throw( IO_ERROR, PARSE_ERROR ); - - /** - * Function ParseNet - * Parses a section like - * (net (code 20) (name /PC-A0) - * (node (ref BUS1) (pin 62)) - * (node (ref U3) (pin 3)) - * (node (ref U9) (pin M6))) - * - * and set the corresponfings pads netnames - */ - void ParseNet( BOARD * aBrd ) throw( IO_ERROR, PARSE_ERROR ); - - /** - * Function SkipCurrent - * Skip the current token level, i.e - * search for the RIGHT parenthesis which closes the current description - */ - void SkipCurrent() throw( IO_ERROR, PARSE_ERROR ); - - // Useful for debug only: - const char* getTokenName( T aTok ) + if( m_footprintReader ) { - return NETLIST_LEXER::TokenName( aTok ); + m_footprintReader->Load( m_netlist ); + + // Sort the component pins so they are in the same order as the legacy format. This + // is useful for comparing legacy and s-expression netlist dumps. + for( unsigned i = 0; i < m_netlist->GetCount(); i++ ) + m_netlist->GetComponent( i )->SortPins(); } -}; - - -bool NETLIST_READER::ReadKicadNetList( FILE* aFile ) -{ - BOARD * brd = m_pcbframe ? m_pcbframe->GetBoard() : NULL; - - // netlineReader dtor will close aFile - FILE_LINE_READER netlineReader( aFile, m_netlistFullName ); - NETLIST_READER_KICAD_PARSER netlist_parser( &netlineReader, this ); - - try - { - netlist_parser.Parse( brd ); - } - catch( IO_ERROR& ioe ) - { - ioe.errorText += '\n'; - ioe.errorText += _("Netlist error."); - - wxMessageBox( ioe.errorText ); - return false; - } - - return true; } - -// NETLIST_READER_KICAD_PARSER -NETLIST_READER_KICAD_PARSER::NETLIST_READER_KICAD_PARSER( FILE_LINE_READER* aReader, - NETLIST_READER *aNetlistReader ) : +// KICAD_NETLIST_PARSER +KICAD_NETLIST_PARSER::KICAD_NETLIST_PARSER( LINE_READER* aReader, NETLIST* aNetlist ) : NETLIST_LEXER( aReader ) { - netlist_reader = aNetlistReader; + m_lineReader = aReader; + m_netlist = aNetlist; } -/** - * Function SkipCurrent - * Skip the current token level, i.e - * search for the RIGHT parenthesis which closes the current description - */ -void NETLIST_READER_KICAD_PARSER::SkipCurrent() throw( IO_ERROR, PARSE_ERROR ) + +void KICAD_NETLIST_PARSER::skipCurrent() throw( IO_ERROR, PARSE_ERROR ) { int curr_level = 0; + while( ( token = NextTok() ) != T_EOF ) { if( token == T_LEFT ) curr_level--; + if( token == T_RIGHT ) { curr_level++; + if( curr_level > 0 ) return; } @@ -170,9 +78,10 @@ void NETLIST_READER_KICAD_PARSER::SkipCurrent() throw( IO_ERROR, PARSE_ERROR ) } -void NETLIST_READER_KICAD_PARSER::Parse( BOARD * aBrd ) - throw( IO_ERROR, PARSE_ERROR ) +void KICAD_NETLIST_PARSER::Parse() throw( IO_ERROR, PARSE_ERROR ) { + wxString text; + int plevel = 0; // the count of ')' to read and end of file, // after parsing all sections @@ -183,98 +92,91 @@ void NETLIST_READER_KICAD_PARSER::Parse( BOARD * aBrd ) switch( token ) { - case T_export: // The netlist starts here. - // nothing to do here, - // just increment the count of ')' to read and end of file - plevel++; - break; + case T_export: // The netlist starts here. + // nothing to do here, + // just increment the count of ')' to read and end of file + plevel++; + break; - case T_version: // The netlist starts here. - // version id not yet used: read it but does not use it - NextTok(); - NeedRIGHT(); - break; + case T_version: // The netlist starts here. + // version id not yet used: read it but does not use it + NextTok(); + NeedRIGHT(); + break; - case T_components: // The section comp starts here. - while( ( token = NextTok() ) != T_RIGHT ) + case T_components: // The section comp starts here. + while( ( token = NextTok() ) != T_RIGHT ) + { + if( token == T_LEFT ) + token = NextTok(); + + if( token == T_comp ) // A component section found. Read it + parseComponent(); + } + + break; + + case T_nets: // The section nets starts here. + while( ( token = NextTok() ) != T_RIGHT ) + { + if( token == T_LEFT ) + token = NextTok(); + + if( token == T_net ) { - if( token == T_LEFT ) - token = NextTok(); - if( token == T_comp ) // A comp section if found. Read it - { - COMPONENT_INFO* cmp_info = ParseComp(); - netlist_reader->AddModuleInfo( cmp_info ); - } + // A net section if found. Read it + parseNet(); } - if( netlist_reader->BuildModuleListOnlyOpt() ) - return; // at this point, the module list is read and built. - // Load new footprints - netlist_reader->InitializeModules(); - netlist_reader->TestFootprintsMatchingAndExchange(); - break; + } - case T_nets: // The section nets starts here. - while( ( token = NextTok() ) != T_RIGHT ) + break; + + case T_libparts: // The section libparts starts here. + while( ( token = NextTok() ) != T_RIGHT ) + { + if( token == T_LEFT ) + token = NextTok(); + + if( token == T_libpart ) { - if( token == T_LEFT ) - token = NextTok(); - if( token == T_net ) - { - // A net section if found. Read it - ParseNet( aBrd ); - } + // A libpart section if found. Read it + parseLibPartList(); } - break; + } - case T_libparts: // The section libparts starts here. - if( netlist_reader->ReadLibpartSectionOpt() ) - { - while( ( token = NextTok() ) != T_RIGHT ) - { - if( token == T_LEFT ) - token = NextTok(); - if( token == T_libpart ) - { - // A libpart section if found. Read it - ParseKicadLibpartList(); - } - } - } - else - SkipCurrent(); - break; + break; - case T_libraries: // The section libraries starts here. - // List of libraries in use. - // Not used here, just skip it - SkipCurrent(); - break; + case T_libraries: // The section libraries starts here. + // List of libraries in use. + // Not used here, just skip it + skipCurrent(); + break; - case T_design: // The section design starts here. - // Not used (mainly thet are comments), just skip it - SkipCurrent(); - break; + case T_design: // The section design starts here. + // Not used (mainly they are comments), just skip it + skipCurrent(); + break; - case T_RIGHT: // The closing parenthesis of the file. - // Not used (mainly thet are comments), just skip it - plevel--; - break; + case T_RIGHT: // The closing parenthesis of the file. + // Not used (mainly they are comments), just skip it + plevel--; + break; - default: - SkipCurrent(); - break; + default: + skipCurrent(); + break; } } if( plevel != 0 ) { - wxLogDebug(wxT("NETLIST_READER_KICAD_PARSER::Parse(): bad parenthesis count (count = %d"), + wxLogDebug( wxT( "KICAD_NETLIST_PARSER::Parse(): bad parenthesis count (count = %d"), plevel ); } } -void NETLIST_READER_KICAD_PARSER::ParseNet( BOARD * aBrd ) - throw( IO_ERROR, PARSE_ERROR ) + +void KICAD_NETLIST_PARSER::parseNet() throw( IO_ERROR, PARSE_ERROR ) { /* Parses a section like * (net (code 20) (name /PC-A0) @@ -283,32 +185,35 @@ void NETLIST_READER_KICAD_PARSER::ParseNet( BOARD * aBrd ) * (node (ref U9) (pin M6))) */ - wxString code; - wxString name; - wxString cmpref; - wxString pin; - int nodecount = 0; - std::vector padList; + COMPONENT* component = NULL; + wxString code; + wxString name; + wxString reference; + wxString pin; + int nodecount = 0; // The token net was read, so the next data is (code ) while( (token = NextTok()) != T_RIGHT ) { if( token == T_LEFT ) token = NextTok(); + switch( token ) { case T_code: NeedSYMBOLorNUMBER(); code = FROM_UTF8( CurText() ); NeedRIGHT(); - break; + break; case T_name: NeedSYMBOLorNUMBER(); name = FROM_UTF8( CurText() ); NeedRIGHT(); + if( name.IsEmpty() ) // Give a dummy net name like N-000109 name = wxT("N-00000") + code; + break; case T_node: @@ -316,11 +221,12 @@ void NETLIST_READER_KICAD_PARSER::ParseNet( BOARD * aBrd ) { if( token == T_LEFT ) token = NextTok(); + switch( token ) { case T_ref: NeedSYMBOLorNUMBER(); - cmpref = FROM_UTF8( CurText() ); + reference = FROM_UTF8( CurText() ); NeedRIGHT(); break; @@ -331,31 +237,37 @@ void NETLIST_READER_KICAD_PARSER::ParseNet( BOARD * aBrd ) break; default: - SkipCurrent(); + skipCurrent(); break; } } - netlist_reader->SetPadsNetName( cmpref, pin, name, padList ); + + + component = m_netlist->GetComponentByReference( reference ); + + // Cannot happen if the netlist is valid. + if( component == NULL ) + { + wxString msg; + msg.Printf( _( "Cannot find component with reference \"%s\" in netlist." ), + GetChars( reference ) ); + THROW_PARSE_ERROR( msg, m_lineReader->GetSource(), m_lineReader->Line(), + m_lineReader->LineNumber(), m_lineReader->Length() ); + } + + component->AddNet( pin, name ); nodecount++; break; default: - SkipCurrent(); + skipCurrent(); break; } } - - // When there is only one item in net, clear pad netname - // Remember one can have more than one pad in list, because a footprint - // can have many pads with the same pad name - if( nodecount < 2 ) - for( unsigned ii = 0; ii < padList.size(); ii++ ) - padList[ii]->SetNetname( wxEmptyString ); } -COMPONENT_INFO* NETLIST_READER_KICAD_PARSER::ParseComp() - throw( IO_ERROR, PARSE_ERROR ) +void KICAD_NETLIST_PARSER::parseComponent() throw( IO_ERROR, PARSE_ERROR ) { /* Parses a section like * (comp (ref P1) @@ -366,13 +278,14 @@ COMPONENT_INFO* NETLIST_READER_KICAD_PARSER::ParseComp() * (tstamp 3256759C)) * * other fields (unused) are skipped - * A component need a reference, value, foorprint name and a full time stamp + * A component need a reference, value, footprint name and a full time stamp * The full time stamp is the sheetpath time stamp + the component time stamp */ wxString ref; wxString value; - wxString footprint; - wxString libpart; + wxString componentName; + wxString libPartName; + wxString libName; wxString pathtimestamp, timestamp; // The token comp was read, so the next data is (ref P1) @@ -380,6 +293,7 @@ COMPONENT_INFO* NETLIST_READER_KICAD_PARSER::ParseComp() { if( token == T_LEFT ) token = NextTok(); + switch( token ) { case T_ref: @@ -396,7 +310,7 @@ COMPONENT_INFO* NETLIST_READER_KICAD_PARSER::ParseComp() case T_footprint: NeedSYMBOLorNUMBER(); - footprint = FROM_UTF8( CurText() ); + componentName = FROM_UTF8( CurText() ); NeedRIGHT(); break; @@ -406,14 +320,23 @@ COMPONENT_INFO* NETLIST_READER_KICAD_PARSER::ParseComp() { if( token == T_LEFT ) token = NextTok(); - if( token == T_part ) + + if( token == T_lib ) { NeedSYMBOLorNUMBER(); - libpart = FROM_UTF8( CurText() ); + libName = FROM_UTF8( CurText() ); + NeedRIGHT(); + } + else if( token == T_part ) + { + NeedSYMBOLorNUMBER(); + libPartName = FROM_UTF8( CurText() ); NeedRIGHT(); } else - SkipCurrent(); + { + Expecting( "part or lib" ); + } } break; @@ -433,95 +356,92 @@ COMPONENT_INFO* NETLIST_READER_KICAD_PARSER::ParseComp() default: // Skip not used data (i.e all other tokens) - SkipCurrent(); + skipCurrent(); break; } } - pathtimestamp += timestamp; - COMPONENT_INFO* cmp_info = new COMPONENT_INFO( footprint, ref, value, pathtimestamp ); - cmp_info->m_Libpart = libpart; - return cmp_info; + pathtimestamp += timestamp; + COMPONENT* component = new COMPONENT( componentName, ref, value, pathtimestamp ); + component->SetLibrarySource( libName, libPartName ); + m_netlist->AddComponent( component ); } -/* Read the section "libparts" like: - * (libparts - * (libpart (lib device) (part C) - * (description "Condensateur non polarise") - * (footprints - * (fp SM*) - * (fp C?) - * (fp C1-1)) - * (fields - * (field (name Reference) C) - * (field (name Value) C)) - * (pins - * (pin (num 1) (name ~) (type passive)) - * (pin (num 2) (name ~) (type passive)))) - * - * And add the strings giving the footprint filter (subsection footprints) - * of the corresponding module info - */ -void NETLIST_READER_KICAD_PARSER::ParseKicadLibpartList() throw( IO_ERROR, PARSE_ERROR ) + +void KICAD_NETLIST_PARSER::parseLibPartList() throw( IO_ERROR, PARSE_ERROR ) { /* Parses a section like - * (libpart (lib device) (part C) - * (description "Condensateur non polarise") - * (footprints - * (fp SM*) - * (fp C?) - * (fp C1-1)) - * (fields - * (field (name Reference) C) - * (field (name Value) C)) - * (pins - * (pin (num 1) (name ~) (type passive)) - * (pin (num 2) (name ~) (type passive)))) - * - * Currently footprints section/fp are read and data stored - * other fields (unused) are skipped - */ - wxString device; - wxString filter; - LIPBART_INFO* libpart_info = NULL; + * (libpart (lib device) (part C) + * (description "Condensateur non polarise") + * (footprints + * (fp SM*) + * (fp C?) + * (fp C1-1)) + * (fields + * (field (name Reference) C) + * (field (name Value) C)) + * (pins + * (pin (num 1) (name ~) (type passive)) + * (pin (num 2) (name ~) (type passive)))) + * + * Currently footprints section/fp are read and data stored + * other fields (unused) are skipped + */ + COMPONENT* component = NULL; + wxString libName; + wxString libPartName; + wxArrayString footprintFilters; // The last token read was libpart, so read the next token while( (token = NextTok()) != T_RIGHT ) { if( token == T_LEFT ) token = NextTok(); + switch( token ) { + case T_lib: + NeedSYMBOLorNUMBER(); + libName = FROM_UTF8( CurText() ); + NeedRIGHT(); + break; + case T_part: NeedSYMBOLorNUMBER(); - device = FROM_UTF8( CurText() ); + libPartName = FROM_UTF8( CurText() ); NeedRIGHT(); - libpart_info = new LIPBART_INFO( device ); - netlist_reader->AddLibpartInfo( libpart_info ); break; case T_footprints: - // Ensure "(part C)" was already read - if( libpart_info == NULL ) - Expecting( T_part ); // Read all fp elements (footprint filter item) while( (token = NextTok()) != T_RIGHT ) { if( token == T_LEFT ) token = NextTok(); + if( token != T_fp ) Expecting( T_fp ); + NeedSYMBOLorNUMBER(); - filter = FROM_UTF8( CurText() ); + footprintFilters.Add( FROM_UTF8( CurText() ) ); NeedRIGHT(); - libpart_info->m_FootprintFilter.Add( filter ); } + break; default: // Skip not used data (i.e all other tokens) - SkipCurrent(); + skipCurrent(); break; } } + + // Find all of the components that reference this component library part definition. + for( unsigned i = 0; i < m_netlist->GetCount(); i++ ) + { + component = m_netlist->GetComponent( i ); + + if( component->IsLibSource( libName, libPartName ) ) + component->SetFootprintFilters( footprintFilters ); + } } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 143d222442..5934d1ed0b 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -89,7 +89,7 @@ double PCB_PARSER::parseDouble() throw( IO_ERROR ) if( errno ) { wxString error; - error.Printf( _( "invalid floating point number in file: <%s>\nline: %d, offset: %d" ), + error.Printf( _( "invalid floating point number in\nfile: <%s>\nline: %d\noffset: %d" ), GetChars( CurSource() ), CurLineNumber(), CurOffset() ); THROW_IO_ERROR( error ); @@ -98,7 +98,7 @@ double PCB_PARSER::parseDouble() throw( IO_ERROR ) if( CurText() == tmp ) { wxString error; - error.Printf( _( "missing floating point number in file: <%s>\nline: %d, offset: %d" ), + error.Printf( _( "missing floating point number in\nfile: <%s>\nline: %d\noffset: %d" ), GetChars( CurSource() ), CurLineNumber(), CurOffset() ); THROW_IO_ERROR( error ); @@ -754,7 +754,7 @@ T PCB_PARSER::lookUpLayer( const M& aMap ) throw( PARSE_ERROR, IO_ERROR ) #endif wxString error = wxString::Format( - _( "Layer %s in file <%s> at line %d, position %d, was not defined in the layers section" ), + _( "Layer '%s' in file <%s> at line %d, position %d, was not defined in the layers section" ), GetChars( FROM_UTF8( CurText() ) ), GetChars( CurSource() ), CurLineNumber(), CurOffset() ); @@ -2182,7 +2182,8 @@ D_PAD* PCB_PARSER::parseD_PAD() throw( IO_ERROR, PARSE_ERROR ) break; case T_solder_paste_margin_ratio: - pad->SetLocalSolderPasteMarginRatio( parseBoardUnits( T_solder_paste_margin_ratio ) ); + pad->SetLocalSolderPasteMarginRatio( + parseDouble( "pad local solder paste margin ratio value" ) ); NeedRIGHT(); break; @@ -2487,18 +2488,22 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) // @todo Create an enum for fill modes. zone->SetFillMode( token == T_polygon ? 0 : 1 ); + NeedRIGHT(); break; case T_arc_segments: zone->SetArcSegmentCount( parseInt( "arc segment count" ) ); + NeedRIGHT(); break; case T_thermal_gap: zone->SetThermalReliefGap( parseBoardUnits( T_thermal_gap ) ); + NeedRIGHT(); break; case T_thermal_bridge_width: zone->SetThermalReliefCopperBridge( parseBoardUnits( T_thermal_bridge_width ) ); + NeedRIGHT(); break; case T_smoothing: @@ -2519,21 +2524,19 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) default: Expecting( "none, chamfer, or fillet" ); } - + NeedRIGHT(); break; case T_radius: zone->SetCornerRadius( parseBoardUnits( "corner radius" ) ); + NeedRIGHT(); break; default: Expecting( "mode, arc_segments, thermal_gap, thermal_bridge_width, " "smoothing, or radius" ); } - - NeedRIGHT(); } - break; case T_keepout: diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 17004e252c..38d3e86201 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -384,3 +384,19 @@ bool PLOT_CONTROLLER::PlotLayer( LAYER_NUM aLayer )/*{{{*/ return true; }/*}}}*/ +void PLOT_CONTROLLER::SetColorMode( bool aColorMode ) +{ + if( !m_plotter ) + return; + + m_plotter->SetColorMode( aColorMode ); +} + +bool PLOT_CONTROLLER::GetColorMode() +{ + if( !m_plotter ) + return false; + + return m_plotter->GetColorMode(); +} + diff --git a/pcbnew/plotcontroller.h b/pcbnew/plotcontroller.h index 89e0028d0b..1716866122 100644 --- a/pcbnew/plotcontroller.h +++ b/pcbnew/plotcontroller.h @@ -25,7 +25,11 @@ public: void ClosePlot(); bool OpenPlotfile( const wxString &aSuffix, PlotFormat aFormat, const wxString &aSheetDesc ); + bool PlotLayer( LAYER_NUM layer ); + + void SetColorMode( bool aColorMode ); + bool GetColorMode(); private: /// Option bank diff --git a/pcbnew/scripting/examples/createFPC40.py b/pcbnew/scripting/examples/createFPC40.py index 8afeec117f..95f4678e7c 100755 --- a/pcbnew/scripting/examples/createFPC40.py +++ b/pcbnew/scripting/examples/createFPC40.py @@ -13,7 +13,7 @@ pcb.m_NetClasses.GetDefault().SetClearance(FromMM(0.1)) # create a new module, it's parent is our previously created pcb module = MODULE(pcb) module.SetReference("FPC"+str(pads)) # give it a reference name -module.m_Reference.SetPos0(wxPointMM(-1,-1)) +module.Reference().SetPos0(wxPointMM(-1,-1)) pcb.Add(module) # add it to our pcb m_pos = wxPointMM(50,50) module.SetPosition(m_pos) @@ -52,7 +52,7 @@ module.Add(e) # save the PCB to disk module.SetLibRef("FPC"+str(pads)) try: - FootprintLibCreate("fpc.mod") + FootprintLibCreate("fpc40.mod") except: pass # we try to create, but may be it exists already FootprintSave("fpc40.mod",module) diff --git a/pcbnew/scripting/examples/createPcb.py b/pcbnew/scripting/examples/createPcb.py index 70cdef9da6..b3c977d24e 100755 --- a/pcbnew/scripting/examples/createPcb.py +++ b/pcbnew/scripting/examples/createPcb.py @@ -12,7 +12,7 @@ pcb.m_NetClasses.GetDefault().SetClearance(FromMM(0.1)) # create a new module, it's parent is our previously created pcb module = MODULE(pcb) module.SetReference("M1") # give it a reference name -module.m_Reference.SetPos0(wxPointMM(-10,-10)) +module.Reference().SetPos0(wxPointMM(-10,-10)) pcb.Add(module) # add it to our pcb m_pos = wxPointMM(50,50) module.SetPosition(m_pos) @@ -41,8 +41,8 @@ pcb = LoadBoard("/tmp/my2.brd") print map( lambda x: x.GetReference() , list(pcb.GetModules())) for m in pcb.GetModules(): - for p in m.GetPads(): - print p.GetPadName(),p.GetPosition(), p.GetOffset() + for p in m.Pads(): + print p.GetPadName(), p.GetPosition(), p.GetOffset() # pcb.GetDesignSettings() diff --git a/pcbnew/scripting/examples/hidePcbValuesShowReferences.py b/pcbnew/scripting/examples/hidePcbValuesShowReferences.py index 2d878d15b9..6b37842df3 100644 --- a/pcbnew/scripting/examples/hidePcbValuesShowReferences.py +++ b/pcbnew/scripting/examples/hidePcbValuesShowReferences.py @@ -8,7 +8,7 @@ pcb = LoadBoard(filename) for module in pcb.GetModules(): print "* Module: %s"%module.GetReference() - module.GetValueObj().SetVisible(False) # set Value as Hidden - module.GetReferenceObj().SetVisible(True) # set Reference as Visible + module.Value().SetVisible(False) # set Value as Hidden + module.Reference().SetVisible(True) # set Reference as Visible -pcb.Save("mod_"+filename) \ No newline at end of file +pcb.Save("mod_"+filename) diff --git a/pcbnew/scripting/examples/listPcb.py b/pcbnew/scripting/examples/listPcb.py index 2e76f20629..92ab11a892 100755 --- a/pcbnew/scripting/examples/listPcb.py +++ b/pcbnew/scripting/examples/listPcb.py @@ -37,7 +37,7 @@ print "LISTING DRAWINGS:" for item in pcb.GetDrawings(): if type(item) is TEXTE_PCB: - print "* Text: '%s' at %s"%(item.GetText(),item.GetPosition()) + print "* Text: '%s' at %s"%(item.GetText(), item.GetPosition()) elif type(item) is DRAWSEGMENT: print "* Drawing: %s"%item.GetShapeStr() # dir(item) else: @@ -60,4 +60,4 @@ print "" print "RATSNEST:",len(pcb.GetFullRatsnest()) print dir(pcb.GetNetClasses()) - \ No newline at end of file + diff --git a/pcbnew/scripting/examples/listPcbLibrary.py b/pcbnew/scripting/examples/listPcbLibrary.py index c8a6325f82..928b3e0191 100755 --- a/pcbnew/scripting/examples/listPcbLibrary.py +++ b/pcbnew/scripting/examples/listPcbLibrary.py @@ -4,6 +4,6 @@ lst = FootprintEnumerate("/usr/share/kicad/modules/sockets.mod") for name in lst: m = FootprintLoad("/usr/share/kicad/modules/sockets.mod",name) print name,"->",m.GetLibRef(), m.GetReference() - for p in m.GetPads(): + for p in m.Pads(): print "\t",p.GetPadName(),p.GetPosition(),p.GetPos0(), p.GetOffset() - \ No newline at end of file + diff --git a/pcbnew/scripting/module.i b/pcbnew/scripting/module.i index f9f90407ef..54369486aa 100644 --- a/pcbnew/scripting/module.i +++ b/pcbnew/scripting/module.i @@ -33,11 +33,6 @@ %pythoncode { - def GetPads(self): return self.m_Pads - def GetDrawings(self): return self.m_Drawings - def GetReferenceObj(self): return self.m_Reference - def GetValueObj(self): return self.m_Value - #def SaveToLibrary(self,filename): # return SaveModuleToLibrary(filename,self) @@ -52,10 +47,10 @@ if type(itemC) is D_PAD: item.thisown=0 - self.m_Pads.PushBack(itemC) + self.Pads().PushBack(itemC) elif type(itemC) in [ TEXTE_PCB, DIMENSION, TEXTE_MODULE, DRAWSEGMENT,EDGE_MODULE]: item.thisown = 0 - self.m_Drawings.PushBack(item) + self.GraphicalItems().PushBack(item) } } diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 8b751fb538..7acb5cbe74 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -549,7 +549,6 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule ) TYPE_COLLECTOR moduleItems; wxString padName; - // get all the MODULE's pads. moduleItems.Collect( aModule, scanPADs ); @@ -888,7 +887,7 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER { wxString error; - error.Printf( _("Unsupported DRAWSEGMENT type %s"), + error.Printf( _( "Unsupported DRAWSEGMENT type %s" ), GetChars( BOARD_ITEM::ShowShape( (STROKE_T) graphic->GetShape() ) ) ); ThrowIOError( error ); @@ -964,7 +963,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) if( module->GetReference() == wxEmptyString ) { - ThrowIOError( _("Component with value of %s has empty reference id."), + ThrowIOError( _( "Component with value of '%s' has empty reference id." ), GetChars( module->GetValue() ) ); } @@ -972,7 +971,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) STRINGSET_PAIR refpair = refs.insert( TO_UTF8( module->GetReference() ) ); if( !refpair.second ) // insert failed { - ThrowIOError( _("Multiple components have identical reference IDs of %s."), + ThrowIOError( _( "Multiple components have identical reference IDs of '%s'." ), GetChars( module->GetReference() ) ); } } diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index f0290bec13..dafa481d23 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -177,7 +177,6 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference, FILE* FichCmp, * NewFile; char line[1024]; wxString msg; -// char* quiet_gcc_4_4_3; if( old_name == new_name ) return 0; diff --git a/template/CMakeLists.txt b/template/CMakeLists.txt index 8701221d53..3461fe6934 100644 --- a/template/CMakeLists.txt +++ b/template/CMakeLists.txt @@ -2,17 +2,3 @@ install(FILES kicad.pro DESTINATION ${KICAD_TEMPLATE} COMPONENT resources) -# template_lst is a list of all templates. -set( template_lst - raspberrypi-gpio - stm32f100-discovery-shield - ti-stellaris-boosterpack40 - ti-stellaris-boosterpack40_min - ) - -foreach( tpl ${template_lst} ) - install( DIRECTORY ${tpl} - DESTINATION ${KICAD_TEMPLATE} - COMPONENT templates ) -endforeach() - diff --git a/template/raspberrypi-gpio/meta/brd.png b/template/raspberrypi-gpio/meta/brd.png deleted file mode 100755 index a8e140f7ea..0000000000 Binary files a/template/raspberrypi-gpio/meta/brd.png and /dev/null differ diff --git a/template/raspberrypi-gpio/meta/icon.png b/template/raspberrypi-gpio/meta/icon.png deleted file mode 100755 index 5e5707e91e..0000000000 Binary files a/template/raspberrypi-gpio/meta/icon.png and /dev/null differ diff --git a/template/raspberrypi-gpio/meta/info.html b/template/raspberrypi-gpio/meta/info.html deleted file mode 100755 index f641c66cba..0000000000 --- a/template/raspberrypi-gpio/meta/info.html +++ /dev/null @@ -1,25 +0,0 @@ - - -Raspberry Pi - Expansion Board - - -

Raspberry Pi

-

Expansion Board

- -

This project template is the basis of an expansion board for the -Raspberry Pi $25 ARM -board.

- -

This base project includes a PCB edge defined as the same size as the -Raspberry-Pi PCB with the connectors placed correctly to align the two boards. -All IO present on the Raspberry-Pi board is connected to the project through the -0.1" expansion headers.

- -

The board outline looks like the following:

- -

- -

(c)2012 Brian Sidebotham
-(c)2012 Kicad Developers

- - diff --git a/template/raspberrypi-gpio/raspberrypi-gpio-cache.lib b/template/raspberrypi-gpio/raspberrypi-gpio-cache.lib deleted file mode 100755 index e5e7f0c50d..0000000000 --- a/template/raspberrypi-gpio/raspberrypi-gpio-cache.lib +++ /dev/null @@ -1,76 +0,0 @@ -EESchema-LIBRARY Version 2.3 Date: 15/11/2012 21:22:43 -#encoding utf-8 -# -# +3.3V -# -DEF +3.3V #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 -40 30 H I C CNN -F1 "+3.3V" 0 110 30 H V C CNN -ALIAS +3,3V -DRAW -X +3.3V 1 0 0 0 U 30 30 0 0 W N -C 0 60 20 0 1 0 N -P 3 0 1 0 0 0 0 40 0 40 N -ENDDRAW -ENDDEF -# -# +5V -# -DEF +5V #PWR 0 40 Y Y 1 F P -F0 "#PWR" 0 90 20 H I C CNN -F1 "+5V" 0 90 30 H V C CNN -DRAW -X +5V 1 0 0 0 U 20 20 0 0 W N -C 0 50 20 0 1 0 N -P 4 0 1 0 0 0 0 30 0 30 0 30 N -ENDDRAW -ENDDEF -# -# CONN_13X2 -# -DEF CONN_13X2 P 0 10 Y N 1 F N -F0 "P" 0 700 60 H V C CNN -F1 "CONN_13X2" 0 0 50 V V C CNN -DRAW -S -100 650 100 -650 0 1 0 N -X P1 1 -400 600 300 R 40 30 1 1 P I -X P2 2 400 600 300 L 40 30 1 1 P I -X P3 3 -400 500 300 R 40 30 1 1 P I -X P4 4 400 500 300 L 40 30 1 1 P I -X P5 5 -400 400 300 R 40 30 1 1 P I -X P6 6 400 400 300 L 40 30 1 1 P I -X P7 7 -400 300 300 R 40 30 1 1 P I -X P8 8 400 300 300 L 40 30 1 1 P I -X P9 9 -400 200 300 R 40 30 1 1 P I -X P10 10 400 200 300 L 40 30 1 1 P I -X P20 20 400 -300 300 L 40 30 1 1 P I -X P11 11 -400 100 300 R 40 30 1 1 P I -X P21 21 -400 -400 300 R 40 30 1 1 P I -X P12 12 400 100 300 L 40 30 1 1 P I -X P22 22 400 -400 300 L 40 30 1 1 P I -X P13 13 -400 0 300 R 40 30 1 1 P I -X P23 23 -400 -500 300 R 40 30 1 1 P I -X P14 14 400 0 300 L 40 30 1 1 P I -X P20 24 400 -500 300 L 40 30 1 1 P I -X P15 15 -400 -100 300 R 40 30 1 1 P I -X P24 25 -400 -600 300 R 40 30 1 1 P I -X P16 16 400 -100 300 L 40 30 1 1 P I -X P22 26 400 -600 300 L 40 30 1 1 P I -X P17 17 -400 -200 300 R 40 30 1 1 P I -X P18 18 400 -200 300 L 40 30 1 1 P I -X P19 19 -400 -300 300 R 40 30 1 1 P I -ENDDRAW -ENDDEF -# -# GND -# -DEF ~GND #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 0 30 H I C CNN -F1 "GND" 0 -70 30 H I C CNN -DRAW -P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N -X GND 1 0 0 0 U 30 30 1 1 W N -ENDDRAW -ENDDEF -# -#End Library diff --git a/template/raspberrypi-gpio/raspberrypi-gpio.cmp b/template/raspberrypi-gpio/raspberrypi-gpio.cmp deleted file mode 100755 index ade211347a..0000000000 --- a/template/raspberrypi-gpio/raspberrypi-gpio.cmp +++ /dev/null @@ -1,10 +0,0 @@ -Cmp-Mod V01 Created by CvPcb (2012-11-15 BZR 3804)-testing date = 15/11/2012 21:23:25 - -BeginCmp -TimeStamp = /50A55ABA; -Reference = P1; -ValeurCmp = CONN_13X2; -IdModule = pin_array_13x2; -EndCmp - -EndListe diff --git a/template/raspberrypi-gpio/raspberrypi-gpio.kicad_pcb b/template/raspberrypi-gpio/raspberrypi-gpio.kicad_pcb deleted file mode 100755 index ae9499ce13..0000000000 --- a/template/raspberrypi-gpio/raspberrypi-gpio.kicad_pcb +++ /dev/null @@ -1,299 +0,0 @@ -(kicad_pcb (version 3) (host pcbnew "(2012-11-30 BZR 3829)-testing") - - (general - (links 0) - (no_connects 0) - (area 127.606667 112.000001 242.964763 190.8) - (thickness 1.6) - (drawings 41) - (tracks 0) - (zones 0) - (modules 1) - (nets 4) - ) - - (page A3) - (title_block - (date "15 nov 2012") - ) - - (layers - (15 F.Cu signal) - (0 B.Cu signal) - (16 B.Adhes user) - (17 F.Adhes user) - (18 B.Paste user) - (19 F.Paste user) - (20 B.SilkS user) - (21 F.SilkS user) - (22 B.Mask user) - (23 F.Mask user) - (24 Dwgs.User user) - (25 Cmts.User user) - (26 Eco1.User user) - (27 Eco2.User user) - (28 Edge.Cuts user) - ) - - (setup - (last_trace_width 0.2) - (trace_clearance 0.2) - (zone_clearance 0.508) - (zone_45_only no) - (trace_min 0.1524) - (segment_width 0.2) - (edge_width 0.15) - (via_size 0.9) - (via_drill 0.6) - (via_min_size 0.8) - (via_min_drill 0.5) - (uvia_size 0.5) - (uvia_drill 0.1) - (uvias_allowed no) - (uvia_min_size 0.5) - (uvia_min_drill 0.1) - (pcb_text_width 0.3) - (pcb_text_size 1 1) - (mod_edge_width 0.15) - (mod_text_size 1 1) - (mod_text_width 0.15) - (pad_size 1 1) - (pad_drill 0.6) - (pad_to_mask_clearance 0) - (aux_axis_origin 143.5 181) - (visible_elements 7FFFFFFF) - (pcbplotparams - (layerselection 3178497) - (usegerberextensions true) - (excludeedgelayer true) - (linewidth 152400) - (plotframeref false) - (viasonmask false) - (mode 1) - (useauxorigin false) - (hpglpennumber 1) - (hpglpenspeed 20) - (hpglpendiameter 15) - (hpglpenoverlay 2) - (psnegative false) - (psa4output false) - (plotreference true) - (plotvalue true) - (plotothertext true) - (plotinvisibletext false) - (padsonsilk false) - (subtractmaskfromsilk false) - (outputformat 1) - (mirror false) - (drillshape 1) - (scaleselection 1) - (outputdirectory "")) - ) - - (net 0 "") - (net 1 +3.3V) - (net 2 +5V) - (net 3 GND) - - (net_class Default "This is the default net class." - (clearance 0.2) - (trace_width 0.2) - (via_dia 0.9) - (via_drill 0.6) - (uvia_dia 0.5) - (uvia_drill 0.1) - (add_net "") - (add_net +3.3V) - (add_net +5V) - (add_net GND) - ) - - (net_class Power "" - (clearance 0.2) - (trace_width 0.5) - (via_dia 1) - (via_drill 0.7) - (uvia_dia 0.5) - (uvia_drill 0.1) - ) - - (module pin_array_13x2 (layer F.Cu) (tedit 50A55E7A) (tstamp 50A55DA3) - (at 161 129) - (descr "Double rangee de contacts 2 x 12 pins") - (tags CONN) - (path /50A55ABA) - (fp_text reference P1 (at -15.5 4) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_text value CONN_13X2 (at 12 4) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.2032))) - ) - (fp_line (start -16.51 2.54) (end 16.51 2.54) (layer F.SilkS) (width 0.2032)) - (fp_line (start 16.51 -2.54) (end -16.51 -2.54) (layer F.SilkS) (width 0.2032)) - (fp_line (start -16.51 -2.54) (end -16.51 2.54) (layer F.SilkS) (width 0.2032)) - (fp_line (start 16.51 2.54) (end 16.51 -2.54) (layer F.SilkS) (width 0.2032)) - (pad 1 thru_hole rect (at -15.24 1.27) (size 1.524 1.524) (drill 0.8128) - (layers *.Cu *.Mask F.SilkS) - (net 1 +3.3V) - ) - (pad 2 thru_hole circle (at -15.24 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - (net 2 +5V) - ) - (pad 3 thru_hole circle (at -12.7 1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 4 thru_hole circle (at -12.7 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 5 thru_hole circle (at -10.16 1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 6 thru_hole circle (at -10.16 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - (net 3 GND) - ) - (pad 7 thru_hole circle (at -7.62 1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 8 thru_hole circle (at -7.62 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 9 thru_hole circle (at -5.08 1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 10 thru_hole circle (at -5.08 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 11 thru_hole circle (at -2.54 1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 12 thru_hole circle (at -2.54 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 13 thru_hole circle (at 0 1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 14 thru_hole circle (at 0 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 15 thru_hole circle (at 2.54 1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 16 thru_hole circle (at 2.54 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 17 thru_hole circle (at 5.08 1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 18 thru_hole circle (at 5.08 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 19 thru_hole circle (at 7.62 1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 20 thru_hole circle (at 7.62 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 21 thru_hole circle (at 10.16 1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 22 thru_hole circle (at 10.16 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 23 thru_hole circle (at 12.7 1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 24 thru_hole circle (at 12.7 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 25 thru_hole circle (at 15.24 1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 26 thru_hole circle (at 15.24 -1.27) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask F.SilkS) - ) - (model pin_array/pins_array_13x2.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (gr_text "RASPBERRY-PI ADDON BOARD\nVIEW FROM TOP\nNOTE: P1 SHOULD BE FITTED ON THE REVERSE OF THE BOARD" (at 144 183.5) (layer Dwgs.User) - (effects (font (size 2 1.7) (thickness 0.12)) (justify left)) - ) - (dimension 56 (width 0.12) (layer Dwgs.User) - (gr_text "56.000 mm" (at 132 153 90) (layer Dwgs.User) - (effects (font (size 1 1) (thickness 0.12))) - ) - (feature1 (pts (xy 143.5 125) (xy 131 125))) - (feature2 (pts (xy 143.5 181) (xy 131 181))) - (crossbar (pts (xy 133 181) (xy 133 125))) - (arrow1a (pts (xy 133 125) (xy 133.58642 126.126503))) - (arrow1b (pts (xy 133 125) (xy 132.41358 126.126503))) - (arrow2a (pts (xy 133 181) (xy 133.58642 179.873497))) - (arrow2b (pts (xy 133 181) (xy 132.41358 179.873497))) - ) - (dimension 85 (width 0.12) (layer Dwgs.User) - (gr_text "85.000 mm" (at 186 113.000001) (layer Dwgs.User) - (effects (font (size 1 1) (thickness 0.12))) - ) - (feature1 (pts (xy 228.5 125) (xy 228.5 112.000001))) - (feature2 (pts (xy 143.5 125) (xy 143.5 112.000001))) - (crossbar (pts (xy 143.5 114.000001) (xy 228.5 114.000001))) - (arrow1a (pts (xy 228.5 114.000001) (xy 227.373497 114.586421))) - (arrow1b (pts (xy 228.5 114.000001) (xy 227.373497 113.413581))) - (arrow2a (pts (xy 143.5 114.000001) (xy 144.626503 114.586421))) - (arrow2b (pts (xy 143.5 114.000001) (xy 144.626503 113.413581))) - ) - (gr_text "RCA\nREMOVE WITH\nSTD HEADERS\n!NO TH ABOVE!" (at 188.5 118) (layer Dwgs.User) - (effects (font (size 1 1) (thickness 0.12))) - ) - (gr_text "1/8\" JACK\nOK WITH STD\nHEADERS\n!NO TH ABOVE!" (at 207.5 118) (layer Dwgs.User) - (effects (font (size 1 1) (thickness 0.12))) - ) - (gr_line (start 228.5 142) (end 228.5 125) (angle 90) (layer Edge.Cuts) (width 0.15)) - (gr_line (start 217.5 142) (end 228.5 142) (angle 90) (layer Edge.Cuts) (width 0.15)) - (gr_line (start 217.5 157) (end 217.5 142) (angle 90) (layer Edge.Cuts) (width 0.15)) - (gr_line (start 228.5 157) (end 217.5 157) (angle 90) (layer Edge.Cuts) (width 0.15)) - (gr_line (start 228.5 181) (end 228.5 157) (angle 90) (layer Edge.Cuts) (width 0.15)) - (gr_text "DOUBLE USB\nCUTOUT FOR ALL\nBOARDS" (at 236.5 149) (layer Dwgs.User) - (effects (font (size 1 1) (thickness 0.12))) - ) - (gr_text "RJ45\nCUTOUT FOR STD\nHEADERS\n!NO TH ABOVE!" (at 236.5 170) (layer Dwgs.User) - (effects (font (size 1 1) (thickness 0.12))) - ) - (gr_line (start 207.5 181) (end 228.5 162) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 207.5 162) (end 228.5 181) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 207.5 162) (end 228.5 162) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 207.5 181) (end 207.5 162) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 228.5 181) (end 207.5 181) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 228.5 162) (end 228.5 181) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 217.5 157) (end 228.5 142) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 217.5 142) (end 228.5 157) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 217.5 142) (end 228.5 142) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 217.5 157) (end 217.5 142) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 228.5 157) (end 217.5 157) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 228.5 142) (end 228.5 157) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 182.5 125) (end 194.5 139) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 182.5 139) (end 194.5 125) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 194.5 139) (end 194.5 138) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 182.5 139) (end 194.5 139) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 182.5 138) (end 182.5 139) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 214.5 125) (end 200.5 138) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 200.5 125) (end 214.5 138) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 200.5 138) (end 200.5 125) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 214.5 138) (end 200.5 138) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 214.5 125) (end 214.5 138) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 200.5 125) (end 214.5 125) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 194.5 125) (end 182.5 125) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 194.5 138) (end 194.5 125) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 182.5 125) (end 182.5 138) (angle 90) (layer Dwgs.User) (width 0.2)) - (gr_line (start 228.5 125) (end 143.5 125) (angle 90) (layer Edge.Cuts) (width 0.15)) - (gr_line (start 143.5 181) (end 228.5 181) (angle 90) (layer Edge.Cuts) (width 0.15)) - (gr_line (start 143.5 125) (end 143.5 181) (angle 90) (layer Edge.Cuts) (width 0.15)) - - - -) diff --git a/template/raspberrypi-gpio/raspberrypi-gpio.net b/template/raspberrypi-gpio/raspberrypi-gpio.net deleted file mode 100755 index ff5df3ec63..0000000000 --- a/template/raspberrypi-gpio/raspberrypi-gpio.net +++ /dev/null @@ -1,35 +0,0 @@ -# EESchema Netlist Version 1.1 created 15/11/2012 21:22:35 -( - ( /50A55ABA $noname P1 CONN_13X2 {Lib=CONN_13X2} - ( 1 +3.3V ) - ( 2 +5V ) - ( 3 ? ) - ( 4 ? ) - ( 5 ? ) - ( 6 GND ) - ( 7 ? ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ( 11 ? ) - ( 12 ? ) - ( 13 ? ) - ( 14 ? ) - ( 15 ? ) - ( 16 ? ) - ( 17 ? ) - ( 18 ? ) - ( 19 ? ) - ( 20 ? ) - ( 21 ? ) - ( 22 ? ) - ( 23 ? ) - ( 24 ? ) - ( 25 ? ) - ( 26 ? ) - ) -) -* -{ Pin List by Nets -} -#End diff --git a/template/raspberrypi-gpio/raspberrypi-gpio.pro b/template/raspberrypi-gpio/raspberrypi-gpio.pro deleted file mode 100755 index 93c40c4f7d..0000000000 --- a/template/raspberrypi-gpio/raspberrypi-gpio.pro +++ /dev/null @@ -1,145 +0,0 @@ -update=15/11/2012 21:11:59 -version=1 -last_client=kicad -[cvpcb] -version=1 -NetITyp=0 -NetIExt=.net -PkgIExt=.pkg -NetDir= -LibDir= -NetType=0 -[cvpcb/libraries] -EquName1=devcms -[pcbnew] -version=1 -PadDrlX=320 -PadDimH=600 -PadDimV=600 -PadForm=1 -PadMask=14745599 -ViaDiam=450 -ViaDril=250 -Isol=60 -Countlayer=2 -Lpiste=170 -RouteTo=15 -RouteBo=0 -TypeVia=3 -Segm45=1 -Racc45=1 -Unite=0 -SegFill=1 -SegAffG=0 -NewAffG=1 -PadFill=1 -PadAffG=1 -PadSNum=1 -ModAffC=0 -ModAffT=0 -PcbAffT=0 -SgPcb45=1 -TxtPcbV=800 -TxtPcbH=600 -TxtModV=600 -TxtModH=600 -TxtModW=120 -HPGLnum=1 -HPGdiam=15 -HPGLSpd=20 -HPGLrec=2 -HPGLorg=0 -GERBmin=15 -VEgarde=100 -DrawLar=150 -EdgeLar=150 -TxtLar=120 -MSegLar=150 -ForPlot=1 -WpenSer=10 -UserGrX=0,01 -UserGrY=0,01 -UserGrU=1 -DivGrPc=1 -TimeOut=600 -MaxLnkS=3 -ShowRat=0 -ShowMRa=1 -[pcbnew/libraries] -LibDir= -LibName1=sockets -LibName2=connect -LibName3=discret -LibName4=pin_array -LibName5=divers -LibName6=libcms -LibName7=display -LibName8=valves -LibName9=led -LibName10=dip_sockets -[eeschema] -version=1 -LibDir= -NetFmt=1 -HPGLSpd=20 -HPGLDm=15 -HPGLNum=1 -offX_A4=0 -offY_A4=0 -offX_A3=0 -offY_A3=0 -offX_A2=0 -offY_A2=0 -offX_A1=0 -offY_A1=0 -offX_A0=0 -offY_A0=0 -offX_A=0 -offY_A=0 -offX_B=0 -offY_B=0 -offX_C=0 -offY_C=0 -offX_D=0 -offY_D=0 -offX_E=0 -offY_E=0 -RptD_X=0 -RptD_Y=100 -RptLab=1 -SimCmd= -UseNetN=0 -LabSize=60 -[eeschema/libraries] -LibName1=power -LibName2=device -LibName3=transistors -LibName4=conn -LibName5=linear -LibName6=regul -LibName7=74xx -LibName8=cmos4000 -LibName9=adc-dac -LibName10=memory -LibName11=xilinx -LibName12=special -LibName13=microcontrollers -LibName14=dsp -LibName15=microchip -LibName16=analog_switches -LibName17=motorola -LibName18=texas -LibName19=intel -LibName20=audio -LibName21=interface -LibName22=digital-audio -LibName23=philips -LibName24=display -LibName25=cypress -LibName26=siliconi -LibName27=opto -LibName28=atmel -LibName29=contrib -LibName30=valves -[general] -version=1 diff --git a/template/raspberrypi-gpio/raspberrypi-gpio.sch b/template/raspberrypi-gpio/raspberrypi-gpio.sch deleted file mode 100755 index fb626f9543..0000000000 --- a/template/raspberrypi-gpio/raspberrypi-gpio.sch +++ /dev/null @@ -1,169 +0,0 @@ -EESchema Schematic File Version 2 date 15/11/2012 21:22:43 -LIBS:power -LIBS:device -LIBS:transistors -LIBS:conn -LIBS:linear -LIBS:regul -LIBS:74xx -LIBS:cmos4000 -LIBS:adc-dac -LIBS:memory -LIBS:xilinx -LIBS:special -LIBS:microcontrollers -LIBS:dsp -LIBS:microchip -LIBS:analog_switches -LIBS:motorola -LIBS:texas -LIBS:intel -LIBS:audio -LIBS:interface -LIBS:digital-audio -LIBS:philips -LIBS:display -LIBS:cypress -LIBS:siliconi -LIBS:opto -LIBS:atmel -LIBS:contrib -LIBS:valves -LIBS:rpi-cache -EELAYER 27 0 -EELAYER END -$Descr A4 11693 8268 -encoding utf-8 -Sheet 1 1 -Title "" -Date "15 nov 2012" -Rev "" -Comp "" -Comment1 "" -Comment2 "" -Comment3 "" -Comment4 "" -$EndDescr -$Comp -L CONN_13X2 P1 -U 1 1 50A55ABA -P 2400 1800 -F 0 "P1" H 2400 2500 60 0000 C CNN -F 1 "CONN_13X2" V 2400 1800 50 0000 C CNN - 1 2400 1800 - 1 0 0 -1 -$EndComp -$Comp -L +3.3V #PWR01 -U 1 1 50A55B18 -P 1900 1050 -F 0 "#PWR01" H 1900 1010 30 0001 C CNN -F 1 "+3.3V" H 1900 1160 30 0000 C CNN - 1 1900 1050 - 1 0 0 -1 -$EndComp -Wire Wire Line - 1900 1050 1900 1200 -Wire Wire Line - 1900 1200 2000 1200 -$Comp -L +5V #PWR02 -U 1 1 50A55B2E -P 2900 1050 -F 0 "#PWR02" H 2900 1140 20 0001 C CNN -F 1 "+5V" H 2900 1140 30 0000 C CNN - 1 2900 1050 - 1 0 0 -1 -$EndComp -Wire Wire Line - 2900 1050 2900 1200 -Wire Wire Line - 2900 1200 2800 1200 -NoConn ~ 2800 1300 -Wire Wire Line - 2000 1300 1250 1300 -Wire Wire Line - 2000 1400 1250 1400 -Text Label 1250 1300 0 60 ~ 0 -GPIO0(SDA) -Text Label 1250 1400 0 60 ~ 0 -GPIO1(SCL) -Wire Wire Line - 2000 1500 1250 1500 -Text Label 1250 1500 0 60 ~ 0 -GPIO4 -NoConn ~ 2000 1600 -Wire Wire Line - 2000 1700 1250 1700 -Wire Wire Line - 2000 1800 1250 1800 -Wire Wire Line - 2000 1900 1250 1900 -Text Label 1250 1700 0 60 ~ 0 -GPIO17 -Text Label 1250 1800 0 60 ~ 0 -GPIO21 -Text Label 1250 1900 0 60 ~ 0 -GPIO22 -NoConn ~ 2000 2000 -Wire Wire Line - 2000 2100 1250 2100 -Wire Wire Line - 2000 2200 1250 2200 -Wire Wire Line - 2000 2300 1250 2300 -Text Label 1250 2100 0 60 ~ 0 -GPIO10(MOSI) -Text Label 1250 2200 0 60 ~ 0 -GPIO9(MISO) -Text Label 1250 2300 0 60 ~ 0 -GPIO11(SCLK) -NoConn ~ 2000 2400 -$Comp -L GND #PWR03 -U 1 1 50A55C3F -P 2900 2500 -F 0 "#PWR03" H 2900 2500 30 0001 C CNN -F 1 "GND" H 2900 2430 30 0001 C CNN - 1 2900 2500 - 1 0 0 -1 -$EndComp -Wire Wire Line - 2900 2500 2900 1400 -Wire Wire Line - 2900 1400 2800 1400 -Wire Wire Line - 2800 1500 3500 1500 -Wire Wire Line - 2800 1600 3500 1600 -Text Label 3500 1500 2 60 ~ 0 -TXD -Text Label 3500 1600 2 60 ~ 0 -RXD -Wire Wire Line - 2800 1700 3500 1700 -Text Label 3500 1700 2 60 ~ 0 -GPIO18 -NoConn ~ 2800 1800 -Wire Wire Line - 2800 1900 3500 1900 -Wire Wire Line - 2800 2000 3500 2000 -Text Label 3500 1900 2 60 ~ 0 -GPIO23 -Text Label 3500 2000 2 60 ~ 0 -GPIO24 -NoConn ~ 2800 2100 -Wire Wire Line - 2800 2200 3500 2200 -Text Label 3500 2200 2 60 ~ 0 -GPIO25 -Wire Wire Line - 2800 2300 3500 2300 -Wire Wire Line - 2800 2400 3500 2400 -Text Label 3500 2300 2 60 ~ 0 -GPIO8(CE0) -Text Label 3500 2400 2 60 ~ 0 -GPIO7(CE1) -$EndSCHEMATC diff --git a/template/raspberrypi-gpio/raspberrypi-gpio.stf b/template/raspberrypi-gpio/raspberrypi-gpio.stf deleted file mode 100755 index c4a0667d00..0000000000 --- a/template/raspberrypi-gpio/raspberrypi-gpio.stf +++ /dev/null @@ -1 +0,0 @@ -comp = "P1" module = "HE10_26D" diff --git a/template/stm32f100-discovery-shield/meta/board_stm32vl_discovery.png b/template/stm32f100-discovery-shield/meta/board_stm32vl_discovery.png deleted file mode 100644 index 29087b72d7..0000000000 Binary files a/template/stm32f100-discovery-shield/meta/board_stm32vl_discovery.png and /dev/null differ diff --git a/template/stm32f100-discovery-shield/meta/icon.png b/template/stm32f100-discovery-shield/meta/icon.png deleted file mode 100644 index 60f4dfe147..0000000000 Binary files a/template/stm32f100-discovery-shield/meta/icon.png and /dev/null differ diff --git a/template/stm32f100-discovery-shield/meta/info.html b/template/stm32f100-discovery-shield/meta/info.html deleted file mode 100644 index ca0599df50..0000000000 --- a/template/stm32f100-discovery-shield/meta/info.html +++ /dev/null @@ -1,21 +0,0 @@ - - -STM32 Discovery - - -

STM32 Value Line Discovery - STM32F100 Cortex-M3™ Microcontroller Board

-

Expansion Board

-This project is a template of an expansion board for the -STM32 Value Line Discovery - board. -

-This project includes a PCB edge defined as the same size as the STM32F100 Discovery -board with the connectors placed correctly to align the two boards. All IO present on the -Discovery board is connected to the project through 0.1" expansion headers. -

-





-

-(c)2012 Kerusey Karyu
- - diff --git a/template/stm32f100-discovery-shield/stm32f100-discovery-shield-cache.lib b/template/stm32f100-discovery-shield/stm32f100-discovery-shield-cache.lib deleted file mode 100644 index 2d2b0dbacc..0000000000 --- a/template/stm32f100-discovery-shield/stm32f100-discovery-shield-cache.lib +++ /dev/null @@ -1,94 +0,0 @@ -EESchema-LIBRARY Version 2.3 Date: 2012-10-20 12:45:55 -#encoding utf-8 -# -# +3.3V -# -DEF +3.3V #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 -40 30 H I C CNN -F1 "+3.3V" 0 110 30 H V C CNN -ALIAS +3,3V -DRAW -X +3.3V 1 0 0 0 U 30 30 0 0 W N -C 0 60 20 0 1 0 N -P 3 0 1 0 0 0 0 40 0 40 N -ENDDRAW -ENDDEF -# -# +5V -# -DEF +5V #PWR 0 40 Y Y 1 F P -F0 "#PWR" 0 90 20 H I C CNN -F1 "+5V" 0 90 30 H V C CNN -DRAW -X +5V 1 0 0 0 U 20 20 0 0 W N -C 0 50 20 0 1 0 N -P 4 0 1 0 0 0 0 30 0 30 0 30 N -ENDDRAW -ENDDEF -# -# CONN28 -# -DEF CONN28 P 0 40 Y N 1 F N -F0 "P" -50 0 60 V V C CNN -F1 "CONN28" 50 0 60 V V C CNN -DRAW -S -100 -1400 150 1400 0 1 0 f -X P1 1 -350 1350 250 R 50 50 1 1 P I -X P2 2 -350 1250 250 R 50 50 1 1 P I -X P3 3 -350 1150 250 R 50 50 1 1 P I -X P4 4 -350 1050 250 R 50 50 1 1 P I -X P5 5 -350 950 250 R 50 50 1 1 P I -X P6 6 -350 850 250 R 50 50 1 1 P I -X P7 7 -350 750 250 R 50 50 1 1 P I -X P8 8 -350 650 250 R 50 50 1 1 P I -X P9 9 -350 550 250 R 50 50 1 1 P I -X P10 10 -350 450 250 R 50 50 1 1 P I -X P20 20 -350 -550 250 R 50 50 1 1 P I -X P11 11 -350 350 250 R 50 50 1 1 P I -X P21 21 -350 -650 250 R 50 50 1 1 P I -X P12 12 -350 250 250 R 50 50 1 1 P I -X P22 22 -350 -750 250 R 50 50 1 1 P I -X P13 13 -350 150 250 R 50 50 1 1 P I -X P23 23 -350 -850 250 R 50 50 1 1 P I -X P14 14 -350 50 250 R 50 50 1 1 P I -X P24 24 -350 -950 250 R 50 50 1 1 P I -X P15 15 -350 -50 250 R 50 50 1 1 P I -X P25 25 -350 -1050 250 R 50 50 1 1 P I -X P16 16 -350 -150 250 R 50 50 1 1 P I -X P26 26 -350 -1150 250 R 50 50 1 1 P I -X P17 17 -350 -250 250 R 50 50 1 1 P I -X P27 27 -350 -1250 250 R 50 50 1 1 P I -X P18 18 -350 -350 250 R 50 50 1 1 P I -X P28 28 -350 -1350 250 R 50 50 1 1 P I -X P19 19 -350 -450 250 R 50 50 1 1 P I -ENDDRAW -ENDDEF -# -# CONN6 -# -DEF CONN6 P 0 40 Y N 1 F N -F0 "P" -50 0 60 V V C CNN -F1 "CONN6" 50 0 60 V V C CNN -DRAW -S -100 -300 150 300 0 1 0 f -X P1 1 -350 250 250 R 50 50 1 1 P I -X P2 2 -350 150 250 R 50 50 1 1 P I -X P3 3 -350 50 250 R 50 50 1 1 P I -X P4 4 -350 -50 250 R 50 50 1 1 P I -X P5 5 -350 -150 250 R 50 50 1 1 P I -X P6 6 -350 -250 250 R 50 50 1 1 P I -ENDDRAW -ENDDEF -# -# GND -# -DEF ~GND #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 0 30 H I C CNN -F1 "GND" 0 -70 30 H I C CNN -DRAW -P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N -X GND 1 0 0 0 U 30 30 1 1 W N -ENDDRAW -ENDDEF -# -#End Library diff --git a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.cmp b/template/stm32f100-discovery-shield/stm32f100-discovery-shield.cmp deleted file mode 100644 index 989bb8942f..0000000000 --- a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.cmp +++ /dev/null @@ -1,24 +0,0 @@ -Cmp-Mod V01 Created by CvPcb (2012-10-17 BZR 3773)-testing date = 2012-10-20 12:09:50 - -BeginCmp -TimeStamp = /50827277; -Reference = P1; -ValeurCmp = CONN28; -IdModule = PIN_ARRAY_28X1; -EndCmp - -BeginCmp -TimeStamp = /50827286; -Reference = P2; -ValeurCmp = CONN28; -IdModule = PIN_ARRAY_28X1; -EndCmp - -BeginCmp -TimeStamp = /50827295; -Reference = P3; -ValeurCmp = CONN6; -IdModule = PIN_ARRAY_6X1; -EndCmp - -EndListe diff --git a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.dcm b/template/stm32f100-discovery-shield/stm32f100-discovery-shield.dcm deleted file mode 100644 index 6705e3845f..0000000000 --- a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.dcm +++ /dev/null @@ -1,13 +0,0 @@ -EESchema-DOCLIB Version 2.0 Date: 2012-10-20 11:34:59 -# -$CMP CONN28 -D Symbole general de connexion -K CONN -$ENDCMP -# -$CMP CONN6 -D Symbole general de connexion -K CONN -$ENDCMP -# -#End Doc Library diff --git a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.kicad_pcb b/template/stm32f100-discovery-shield/stm32f100-discovery-shield.kicad_pcb deleted file mode 100644 index 1d42c6b583..0000000000 --- a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.kicad_pcb +++ /dev/null @@ -1,373 +0,0 @@ -(kicad_pcb (version 3) (host pcbnew "(2013-02-23 BZR 3971)-testing") - - (general - (links 3) - (no_connects 3) - (area 32.945069 34.215069 76.274931 118.819931) - (thickness 1.6002) - (drawings 5) - (tracks 0) - (zones 0) - (modules 3) - (nets 4) - ) - - (page A3) - (title_block - (title "STM32 Value Line Discovery - Shiled board") - (rev 1.0) - ) - - (layers - (15 Front signal) - (0 Back signal) - (16 Dessous.Adhes user) - (17 Dessus.Adhes user) - (18 Dessous.Pate user) - (19 Dessus.Pate user) - (20 Dessous.SilkS user) - (21 Dessus.SilkS user) - (22 Dessous.Masque user) - (23 Dessus.Masque user) - (24 Dessin.User user) - (25 Cmts.User user) - (26 Eco1.User user) - (27 Eco2.User user) - (28 Contours.Ci user) - ) - - (setup - (last_trace_width 0.254) - (trace_clearance 0.254) - (zone_clearance 0.508) - (zone_45_only no) - (trace_min 0.254) - (segment_width 0.20066) - (edge_width 0.14986) - (via_size 0.889) - (via_drill 0.635) - (via_min_size 0.889) - (via_min_drill 0.508) - (uvia_size 0.508) - (uvia_drill 0.127) - (uvias_allowed no) - (uvia_min_size 0.508) - (uvia_min_drill 0.127) - (pcb_text_width 0.29972) - (pcb_text_size 1.00076 1.00076) - (mod_edge_width 0.14986) - (mod_text_size 1.00076 1.00076) - (mod_text_width 0.14986) - (pad_size 1.00076 1.00076) - (pad_drill 0.59944) - (pad_to_mask_clearance 0) - (aux_axis_origin 0 0) - (visible_elements 7FFFFFFF) - (pcbplotparams - (layerselection 3178497) - (usegerberextensions true) - (excludeedgelayer true) - (linewidth 60) - (plotframeref false) - (viasonmask false) - (mode 1) - (useauxorigin false) - (hpglpennumber 1) - (hpglpenspeed 20) - (hpglpendiameter 15) - (hpglpenoverlay 2) - (psnegative false) - (psa4output false) - (plotreference true) - (plotvalue true) - (plotothertext true) - (plotinvisibletext false) - (padsonsilk false) - (subtractmaskfromsilk false) - (outputformat 1) - (mirror false) - (drillshape 1) - (scaleselection 1) - (outputdirectory "")) - ) - - (net 0 "") - (net 1 +3.3V) - (net 2 +5V) - (net 3 GND) - - (net_class Default "To jest domyślna klasa połączeń." - (clearance 0.254) - (trace_width 0.254) - (via_dia 0.889) - (via_drill 0.635) - (uvia_dia 0.508) - (uvia_drill 0.127) - (add_net "") - (add_net +3.3V) - (add_net +5V) - (add_net GND) - ) - - (module PIN_ARRAY_6X1 locked (layer Front) (tedit 50827C81) (tstamp 50827C60) - (at 55.88 113.03) - (descr "Single rangee contacts 1 x 6 pins") - (tags CONN) - (path /50827295) - (fp_text reference P3 (at -8.89 0) (layer Dessus.SilkS) - (effects (font (size 0.63246 0.63246) (thickness 0.15748))) - ) - (fp_text value CONN6 (at -8.89 0) (layer Dessus.SilkS) hide - (effects (font (size 0.63246 0.63246) (thickness 0.15748))) - ) - (fp_line (start -7.62 -1.27) (end 7.62 -1.27) (layer Dessus.SilkS) (width 0.14986)) - (fp_line (start 7.62 -1.27) (end 7.62 1.27) (layer Dessus.SilkS) (width 0.14986)) - (fp_line (start 7.62 1.27) (end -7.62 1.27) (layer Dessus.SilkS) (width 0.14986)) - (fp_line (start -7.62 1.27) (end -7.62 -1.27) (layer Dessus.SilkS) (width 0.14986)) - (pad 1 thru_hole rect (at -6.35 0) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 2 thru_hole circle (at -3.81 0) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at 6.35 0) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 3 thru_hole circle (at -1.27 0) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole circle (at 3.81 0) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (module PIN_ARRAY_28X1 locked (layer Front) (tedit 50827C6F) (tstamp 50827C84) - (at 39.37 73.66 270) - (descr "Single rangee contacts 1 x 28 pins") - (tags CONN) - (path /50827277) - (fp_text reference P1 (at -36.195 0 360) (layer Dessus.SilkS) - (effects (font (size 0.63246 0.63246) (thickness 0.15748))) - ) - (fp_text value CONN28 (at -36.195 0 360) (layer Dessus.SilkS) hide - (effects (font (size 0.63246 0.63246) (thickness 0.15748))) - ) - (fp_line (start -35.56 -1.27) (end 35.56 -1.27) (layer Dessus.SilkS) (width 0.14986)) - (fp_line (start 35.56 -1.27) (end 35.56 1.27) (layer Dessus.SilkS) (width 0.14986)) - (fp_line (start 35.56 1.27) (end -35.56 1.27) (layer Dessus.SilkS) (width 0.14986)) - (fp_line (start -35.56 1.27) (end -35.56 -1.27) (layer Dessus.SilkS) (width 0.14986)) - (pad 1 thru_hole rect (at -34.29 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 GND) - ) - (pad 2 thru_hole circle (at -31.75 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 11 thru_hole circle (at -8.89 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole circle (at -26.67 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 13 thru_hole circle (at -3.81 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at -21.59 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 15 thru_hole circle (at 1.27 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole circle (at -16.51 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 17 thru_hole circle (at 6.35 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole circle (at -11.43 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 19 thru_hole circle (at 11.43 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 12 thru_hole circle (at -6.35 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 21 thru_hole circle (at 16.51 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 14 thru_hole circle (at -1.27 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 23 thru_hole circle (at 21.59 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 16 thru_hole circle (at 3.81 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 25 thru_hole circle (at 26.67 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 18 thru_hole circle (at 8.89 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 27 thru_hole circle (at 31.75 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 20 thru_hole circle (at 13.97 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 22 thru_hole circle (at 19.05 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 24 thru_hole circle (at 24.13 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 26 thru_hole circle (at 29.21 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 28 thru_hole circle (at 34.29 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 GND) - ) - (pad 3 thru_hole circle (at -29.21 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 +3.3V) - ) - (pad 5 thru_hole circle (at -24.13 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at -19.05 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 9 thru_hole circle (at -13.97 0 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (module PIN_ARRAY_28X1 locked (layer Front) (tedit 50827C8E) (tstamp 50827CA8) - (at 69.85 73.66 90) - (descr "Single rangee contacts 1 x 28 pins") - (tags CONN) - (path /50827286) - (fp_text reference P2 (at -36.195 0 180) (layer Dessus.SilkS) - (effects (font (size 0.63246 0.63246) (thickness 0.15748))) - ) - (fp_text value CONN28 (at -36.195 0 180) (layer Dessus.SilkS) hide - (effects (font (size 0.63246 0.63246) (thickness 0.15748))) - ) - (fp_line (start -35.56 -1.27) (end 35.56 -1.27) (layer Dessus.SilkS) (width 0.14986)) - (fp_line (start 35.56 -1.27) (end 35.56 1.27) (layer Dessus.SilkS) (width 0.14986)) - (fp_line (start 35.56 1.27) (end -35.56 1.27) (layer Dessus.SilkS) (width 0.14986)) - (fp_line (start -35.56 1.27) (end -35.56 -1.27) (layer Dessus.SilkS) (width 0.14986)) - (pad 1 thru_hole rect (at -34.29 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 GND) - ) - (pad 2 thru_hole circle (at -31.75 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 11 thru_hole circle (at -8.89 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole circle (at -26.67 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 13 thru_hole circle (at -3.81 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at -21.59 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 15 thru_hole circle (at 1.27 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole circle (at -16.51 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 17 thru_hole circle (at 6.35 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole circle (at -11.43 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 19 thru_hole circle (at 11.43 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 12 thru_hole circle (at -6.35 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 21 thru_hole circle (at 16.51 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 14 thru_hole circle (at -1.27 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 23 thru_hole circle (at 21.59 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 16 thru_hole circle (at 3.81 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 25 thru_hole circle (at 26.67 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 18 thru_hole circle (at 8.89 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 27 thru_hole circle (at 31.75 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 20 thru_hole circle (at 13.97 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 22 thru_hole circle (at 19.05 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 24 thru_hole circle (at 24.13 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 26 thru_hole circle (at 29.21 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 +5V) - ) - (pad 28 thru_hole circle (at 34.29 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 GND) - ) - (pad 3 thru_hole circle (at -29.21 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole circle (at -24.13 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at -19.05 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 9 thru_hole circle (at -13.97 0 90) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (gr_text "STM32 Value Line Discovery - Shield" (at 48.133 117.475) (layer Dessus.SilkS) - (effects (font (size 1.00076 1.00076) (thickness 0.25146))) - ) - (gr_line (start 33.02 34.29) (end 33.02 118.745) (angle 90) (layer Contours.Ci) (width 0.14986)) - (gr_line (start 76.2 118.745) (end 76.2 34.29) (angle 90) (layer Contours.Ci) (width 0.14986)) - (gr_line (start 76.2 118.745) (end 33.02 118.745) (angle 90) (layer Contours.Ci) (width 0.14986)) - (gr_line (start 33.02 34.29) (end 76.2 34.29) (angle 90) (layer Contours.Ci) (width 0.14986)) - - (zone (net 3) (net_name GND) (layer Back) (tstamp 50827DC8) (hatch edge 0.508) - (connect_pads (clearance 0.508)) - (min_thickness 0.254) - (fill (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.889)) - (polygon - (pts - (xy 76.073 118.618) (xy 33.147 118.618) (xy 33.147 34.417) (xy 76.073 34.417) - ) - ) - ) -) diff --git a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.lib b/template/stm32f100-discovery-shield/stm32f100-discovery-shield.lib deleted file mode 100644 index 9f3e0a012a..0000000000 --- a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.lib +++ /dev/null @@ -1,58 +0,0 @@ -EESchema-LIBRARY Version 2.3 Date: 2012-10-20 11:34:59 -#encoding utf-8 -# -# CONN28 -# -DEF CONN28 P 0 40 Y N 1 F N -F0 "P" -50 0 60 V V C CNN -F1 "CONN28" 50 0 60 V V C CNN -DRAW -S -100 -1400 150 1400 0 1 0 f -X P1 1 -350 1350 250 R 50 50 1 1 P I -X P2 2 -350 1250 250 R 50 50 1 1 P I -X P3 3 -350 1150 250 R 50 50 1 1 P I -X P4 4 -350 1050 250 R 50 50 1 1 P I -X P5 5 -350 950 250 R 50 50 1 1 P I -X P6 6 -350 850 250 R 50 50 1 1 P I -X P7 7 -350 750 250 R 50 50 1 1 P I -X P8 8 -350 650 250 R 50 50 1 1 P I -X P9 9 -350 550 250 R 50 50 1 1 P I -X P10 10 -350 450 250 R 50 50 1 1 P I -X P20 20 -350 -550 250 R 50 50 1 1 P I -X P11 11 -350 350 250 R 50 50 1 1 P I -X P21 21 -350 -650 250 R 50 50 1 1 P I -X P12 12 -350 250 250 R 50 50 1 1 P I -X P22 22 -350 -750 250 R 50 50 1 1 P I -X P13 13 -350 150 250 R 50 50 1 1 P I -X P23 23 -350 -850 250 R 50 50 1 1 P I -X P14 14 -350 50 250 R 50 50 1 1 P I -X P24 24 -350 -950 250 R 50 50 1 1 P I -X P15 15 -350 -50 250 R 50 50 1 1 P I -X P25 25 -350 -1050 250 R 50 50 1 1 P I -X P16 16 -350 -150 250 R 50 50 1 1 P I -X P26 26 -350 -1150 250 R 50 50 1 1 P I -X P17 17 -350 -250 250 R 50 50 1 1 P I -X P27 27 -350 -1250 250 R 50 50 1 1 P I -X P18 18 -350 -350 250 R 50 50 1 1 P I -X P28 28 -350 -1350 250 R 50 50 1 1 P I -X P19 19 -350 -450 250 R 50 50 1 1 P I -ENDDRAW -ENDDEF -# -# CONN6 -# -DEF CONN6 P 0 40 Y N 1 F N -F0 "P" -50 0 60 V V C CNN -F1 "CONN6" 50 0 60 V V C CNN -DRAW -S -100 -300 150 300 0 1 0 f -X P1 1 -350 250 250 R 50 50 1 1 P I -X P2 2 -350 150 250 R 50 50 1 1 P I -X P3 3 -350 50 250 R 50 50 1 1 P I -X P4 4 -350 -50 250 R 50 50 1 1 P I -X P5 5 -350 -150 250 R 50 50 1 1 P I -X P6 6 -350 -250 250 R 50 50 1 1 P I -ENDDRAW -ENDDEF -# -#End Library diff --git a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.mod b/template/stm32f100-discovery-shield/stm32f100-discovery-shield.mod deleted file mode 100644 index f7e8c97ef8..0000000000 --- a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.mod +++ /dev/null @@ -1,276 +0,0 @@ -PCBNEW-LibModule-V1 2012-10-20 12:13:07 -# encoding utf-8 -Units deci-mils -$INDEX -PIN_ARRAY_28X1 -PIN_ARRAY_6X1 -$EndINDEX -$MODULE PIN_ARRAY_28X1 -Po 0 0 0 15 50827920 00000000 ~~ -Li PIN_ARRAY_28X1 -Cd Single rangee contacts 1 x 28 pins -Kw CONN -Sc 0 -AR -Op 0 0 0 -T0 0 -800 249 249 0 62 N V 21 N "PIN_ARRAY_28X1" -T1 0 800 249 249 0 62 N I 21 N "VAL**" -DS -14000 -500 14000 -500 59 21 -DS 14000 -500 14000 500 59 21 -DS 14000 500 -14000 500 59 21 -DS -14000 500 -14000 -500 59 21 -$PAD -Sh "1" R 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -13500 0 -$EndPAD -$PAD -Sh "2" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -12500 0 -$EndPAD -$PAD -Sh "11" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -3500 0 -$EndPAD -$PAD -Sh "4" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -10500 0 -$EndPAD -$PAD -Sh "13" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -1500 0 -$EndPAD -$PAD -Sh "6" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -8500 0 -$EndPAD -$PAD -Sh "15" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 500 0 -$EndPAD -$PAD -Sh "8" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -6500 0 -$EndPAD -$PAD -Sh "17" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 2500 0 -$EndPAD -$PAD -Sh "10" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -4500 0 -$EndPAD -$PAD -Sh "19" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 4500 0 -$EndPAD -$PAD -Sh "12" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -2500 0 -$EndPAD -$PAD -Sh "21" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 6500 0 -$EndPAD -$PAD -Sh "14" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -500 0 -$EndPAD -$PAD -Sh "23" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 8500 0 -$EndPAD -$PAD -Sh "16" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 1500 0 -$EndPAD -$PAD -Sh "25" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 10500 0 -$EndPAD -$PAD -Sh "18" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 3500 0 -$EndPAD -$PAD -Sh "27" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 12500 0 -$EndPAD -$PAD -Sh "20" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 5500 0 -$EndPAD -$PAD -Sh "22" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 7500 0 -$EndPAD -$PAD -Sh "24" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 9500 0 -$EndPAD -$PAD -Sh "26" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 11500 0 -$EndPAD -$PAD -Sh "28" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 13500 0 -$EndPAD -$PAD -Sh "3" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -11500 0 -$EndPAD -$PAD -Sh "5" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -9500 0 -$EndPAD -$PAD -Sh "7" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -7500 0 -$EndPAD -$PAD -Sh "9" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -5500 0 -$EndPAD -$EndMODULE PIN_ARRAY_28X1 -$MODULE PIN_ARRAY_6X1 -Po 0 0 0 15 508278F8 00000000 ~~ -Li PIN_ARRAY_6X1 -Cd Single rangee contacts 1 x 6 pins -Kw CONN -Sc 0 -AR -Op 0 0 0 -T0 0 -700 249 249 0 62 N V 21 N "PIN_ARRAY_6X1" -T1 0 800 249 249 0 62 N I 21 N "VAL**" -DS -3000 -500 3000 -500 59 21 -DS 3000 -500 3000 500 59 21 -DS 3000 500 -3000 500 59 21 -DS -3000 500 -3000 -500 59 21 -$PAD -Sh "1" R 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -2500 0 -$EndPAD -$PAD -Sh "2" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -1500 0 -$EndPAD -$PAD -Sh "4" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 500 0 -$EndPAD -$PAD -Sh "6" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 2500 0 -$EndPAD -$PAD -Sh "3" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po -500 0 -$EndPAD -$PAD -Sh "5" C 600 600 0 0 0 -Dr 400 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 1500 0 -$EndPAD -$EndMODULE PIN_ARRAY_6X1 -$EndLIBRARY diff --git a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.net b/template/stm32f100-discovery-shield/stm32f100-discovery-shield.net deleted file mode 100644 index 44f90069e9..0000000000 --- a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.net +++ /dev/null @@ -1,80 +0,0 @@ -# EESchema Netlist Version 1.1 created 2012-10-20 12:24:05 -( - ( /50827277 $noname P1 CONN28 {Lib=CONN28} - ( 1 GND ) - ( 2 ? ) - ( 3 +3.3V ) - ( 4 ? ) - ( 5 ? ) - ( 6 ? ) - ( 7 ? ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ( 11 ? ) - ( 12 ? ) - ( 13 ? ) - ( 14 ? ) - ( 15 ? ) - ( 16 ? ) - ( 17 ? ) - ( 18 ? ) - ( 19 ? ) - ( 20 ? ) - ( 21 ? ) - ( 22 ? ) - ( 23 ? ) - ( 24 ? ) - ( 25 ? ) - ( 26 ? ) - ( 27 ? ) - ( 28 GND ) - ) - ( /50827286 $noname P2 CONN28 {Lib=CONN28} - ( 1 GND ) - ( 2 ? ) - ( 3 ? ) - ( 4 ? ) - ( 5 ? ) - ( 6 ? ) - ( 7 ? ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ( 11 ? ) - ( 12 ? ) - ( 13 ? ) - ( 14 ? ) - ( 15 ? ) - ( 16 ? ) - ( 17 ? ) - ( 18 ? ) - ( 19 ? ) - ( 20 ? ) - ( 21 ? ) - ( 22 ? ) - ( 23 ? ) - ( 24 ? ) - ( 25 ? ) - ( 26 +5V ) - ( 27 ? ) - ( 28 GND ) - ) - ( /50827295 $noname P3 CONN6 {Lib=CONN6} - ( 1 ? ) - ( 2 ? ) - ( 3 ? ) - ( 4 ? ) - ( 5 ? ) - ( 6 ? ) - ) -) -* -{ Pin List by Nets -Net 59 "GND" "GND" - P1 1 - P2 28 - P1 28 - P2 1 -} -#End diff --git a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.pro b/template/stm32f100-discovery-shield/stm32f100-discovery-shield.pro deleted file mode 100644 index ebb404f9fb..0000000000 --- a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.pro +++ /dev/null @@ -1,81 +0,0 @@ -update=2012-10-20 12:46:25 -version=1 -last_client=pcbnew -[general] -version=1 -[cvpcb] -version=1 -NetIExt=net -[cvpcb/libraries] -EquName1=devcms -[eeschema] -version=1 -LibDir= -NetFmtName= -RptD_X=0 -RptD_Y=100 -RptLab=1 -LabSize=40 -[eeschema/libraries] -LibName1=stm32f100-discovery-shield -LibName2=stm32 -LibName3=power -LibName4=device -LibName5=transistors -LibName6=conn -LibName7=linear -LibName8=regul -LibName9=74xx -LibName10=cmos4000 -LibName11=adc-dac -LibName12=memory -LibName13=xilinx -LibName14=special -LibName15=microcontrollers -LibName16=dsp -LibName17=microchip -LibName18=analog_switches -LibName19=motorola -LibName20=texas -LibName21=intel -LibName22=audio -LibName23=interface -LibName24=digital-audio -LibName25=philips -LibName26=display -LibName27=cypress -LibName28=siliconi -LibName29=opto -LibName30=atmel -LibName31=contrib -LibName32=valves -[pcbnew] -version=1 -LastNetListRead= -PadDrill=0.59944 -PadSizeH=1.00076 -PadSizeV=1.00076 -PcbTextSizeV=1.00076 -PcbTextSizeH=1.00076 -PcbTextThickness=0.29972 -ModuleTextSizeV=1.00076 -ModuleTextSizeH=1.00076 -ModuleTextSizeThickness=0.14986 -SolderMaskClearance=0 -DrawSegmentWidth=0.20066 -BoardOutlineThickness=0.14986 -ModuleOutlineThickness=0.14986 -[pcbnew/libraries] -LibDir= -LibName1=stm32f100-discovery-shield -LibName2=sockets -LibName3=connect -LibName4=discret -LibName5=pin_array -LibName6=divers -LibName7=libcms -LibName8=display -LibName9=led -LibName10=dip_sockets -LibName11=pga_sockets -LibName12=valves diff --git a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.sch b/template/stm32f100-discovery-shield/stm32f100-discovery-shield.sch deleted file mode 100644 index fe7e4ca1fb..0000000000 --- a/template/stm32f100-discovery-shield/stm32f100-discovery-shield.sch +++ /dev/null @@ -1,368 +0,0 @@ -EESchema Schematic File Version 2 date 2012-10-20 12:45:55 -LIBS:stm32f100-discovery-shield -LIBS:stm32 -LIBS:power -LIBS:device -LIBS:transistors -LIBS:conn -LIBS:linear -LIBS:regul -LIBS:74xx -LIBS:cmos4000 -LIBS:adc-dac -LIBS:memory -LIBS:xilinx -LIBS:special -LIBS:microcontrollers -LIBS:dsp -LIBS:microchip -LIBS:analog_switches -LIBS:motorola -LIBS:texas -LIBS:intel -LIBS:audio -LIBS:interface -LIBS:digital-audio -LIBS:philips -LIBS:display -LIBS:cypress -LIBS:siliconi -LIBS:opto -LIBS:atmel -LIBS:contrib -LIBS:valves -LIBS:stm32f100-discovery-shield-cache -EELAYER 27 0 -EELAYER END -$Descr A4 11693 8268 -encoding utf-8 -Sheet 1 1 -Title "STM32 Value Line Discovery - Shiled board" -Date "20 oct 2012" -Rev "1.0" -Comp "" -Comment1 "" -Comment2 "" -Comment3 "" -Comment4 "" -$EndDescr -$Comp -L CONN28 P1 -U 1 1 50827277 -P 10950 1950 -F 0 "P1" V 10900 1950 60 0000 C CNN -F 1 "CONN28" V 11000 1950 60 0000 C CNN - 1 10950 1950 - 1 0 0 -1 -$EndComp -$Comp -L CONN28 P2 -U 1 1 50827286 -P 10950 4850 -F 0 "P2" V 10900 4850 60 0000 C CNN -F 1 "CONN28" V 11000 4850 60 0000 C CNN - 1 10950 4850 - 1 0 0 1 -$EndComp -$Comp -L CONN6 P3 -U 1 1 50827295 -P 10950 6650 -F 0 "P3" V 10900 6650 60 0000 C CNN -F 1 "CONN6" V 11000 6650 60 0000 C CNN - 1 10950 6650 - 1 0 0 -1 -$EndComp -Wire Wire Line - 10600 600 10300 600 -Wire Wire Line - 10600 800 10300 800 -Wire Wire Line - 10600 900 10300 900 -Wire Wire Line - 10600 1000 10300 1000 -Wire Wire Line - 10600 1100 10300 1100 -Wire Wire Line - 10600 1200 10300 1200 -Wire Wire Line - 10600 1300 10300 1300 -Wire Wire Line - 10600 1400 10300 1400 -Wire Wire Line - 10600 1500 10300 1500 -Wire Wire Line - 10600 1600 10300 1600 -Wire Wire Line - 10600 1700 10300 1700 -Wire Wire Line - 10600 1800 10300 1800 -Wire Wire Line - 10600 1900 10300 1900 -Wire Wire Line - 10600 2000 10300 2000 -Wire Wire Line - 10600 2100 10300 2100 -Wire Wire Line - 10600 2200 10300 2200 -Wire Wire Line - 10600 2300 10300 2300 -Wire Wire Line - 10600 2400 10300 2400 -Wire Wire Line - 10600 2500 10300 2500 -Wire Wire Line - 10600 2600 10300 2600 -Wire Wire Line - 10600 2700 10300 2700 -Wire Wire Line - 10600 2800 10300 2800 -Wire Wire Line - 10600 2900 10300 2900 -Wire Wire Line - 10600 3000 10300 3000 -Wire Wire Line - 10600 3100 10300 3100 -Wire Wire Line - 10600 3200 10300 3200 -Wire Wire Line - 10600 3300 10300 3300 -Wire Wire Line - 10600 3500 10300 3500 -Wire Wire Line - 10600 3700 10300 3700 -Wire Wire Line - 10600 3800 10300 3800 -Wire Wire Line - 10600 3900 10300 3900 -Wire Wire Line - 10600 4000 10300 4000 -Wire Wire Line - 10600 4100 10300 4100 -Wire Wire Line - 10600 4200 10300 4200 -Wire Wire Line - 10600 4300 10300 4300 -Wire Wire Line - 10600 4400 10300 4400 -Wire Wire Line - 10600 4500 10300 4500 -Wire Wire Line - 10600 4600 10300 4600 -Wire Wire Line - 10600 4700 10300 4700 -Wire Wire Line - 10600 4800 10300 4800 -Wire Wire Line - 10600 4900 10300 4900 -Wire Wire Line - 10600 5000 10300 5000 -Wire Wire Line - 10600 5100 10300 5100 -Wire Wire Line - 10600 5200 10300 5200 -Wire Wire Line - 10600 5300 10300 5300 -Wire Wire Line - 10600 5400 10300 5400 -Wire Wire Line - 10600 5500 10300 5500 -Wire Wire Line - 10600 5600 10300 5600 -Wire Wire Line - 10600 5700 10300 5700 -Wire Wire Line - 10600 5800 10300 5800 -Wire Wire Line - 10600 5900 10300 5900 -Wire Wire Line - 10600 6000 10300 6000 -Wire Wire Line - 10600 6100 10300 6100 -Wire Wire Line - 10600 6200 10300 6200 -Wire Wire Line - 10600 6400 10300 6400 -Wire Wire Line - 10600 6500 10300 6500 -Wire Wire Line - 10600 6600 10300 6600 -Wire Wire Line - 10600 6700 10300 6700 -Wire Wire Line - 10600 6800 10300 6800 -Wire Wire Line - 10600 6900 10300 6900 -Text Label 10350 6400 0 40 ~ 0 -PB10 -Text Label 10350 6500 0 40 ~ 0 -PB11 -Text Label 10350 6600 0 40 ~ 0 -PB12 -Text Label 10350 6700 0 40 ~ 0 -PB13 -Text Label 10350 6800 0 40 ~ 0 -PB14 -Text Label 10350 6900 0 40 ~ 0 -PB15 -NoConn ~ 10600 700 -NoConn ~ 10600 3600 -$Comp -L GND #PWR01 -U 1 1 50827354 -P 10300 650 -F 0 "#PWR01" H 10300 650 30 0001 C CNN -F 1 "GND" H 10300 580 30 0001 C CNN - 1 10300 650 - 1 0 0 -1 -$EndComp -$Comp -L GND #PWR02 -U 1 1 50827361 -P 10300 3350 -F 0 "#PWR02" H 10300 3350 30 0001 C CNN -F 1 "GND" H 10300 3280 30 0001 C CNN - 1 10300 3350 - 1 0 0 -1 -$EndComp -$Comp -L GND #PWR03 -U 1 1 50827367 -P 10300 3550 -F 0 "#PWR03" H 10300 3550 30 0001 C CNN -F 1 "GND" H 10300 3480 30 0001 C CNN - 1 10300 3550 - 1 0 0 -1 -$EndComp -$Comp -L GND #PWR04 -U 1 1 5082736D -P 10300 6250 -F 0 "#PWR04" H 10300 6250 30 0001 C CNN -F 1 "GND" H 10300 6180 30 0001 C CNN - 1 10300 6250 - 1 0 0 -1 -$EndComp -$Comp -L +3.3V #PWR05 -U 1 1 50827375 -P 10300 800 -F 0 "#PWR05" H 10300 760 30 0001 C CNN -F 1 "+3.3V" H 10300 910 30 0000 C CNN - 1 10300 800 - 0 -1 -1 0 -$EndComp -$Comp -L +5V #PWR06 -U 1 1 50827384 -P 10300 3700 -F 0 "#PWR06" H 10300 3790 20 0001 C CNN -F 1 "+5V" H 10300 3790 30 0000 C CNN - 1 10300 3700 - 0 -1 -1 0 -$EndComp -Wire Wire Line - 10300 6200 10300 6250 -Wire Wire Line - 10300 3500 10300 3550 -Wire Wire Line - 10300 3300 10300 3350 -Wire Wire Line - 10300 600 10300 650 -Text Label 10350 900 0 40 ~ 0 -VBAT -Text Label 10350 1000 0 40 ~ 0 -PC13 -Text Label 10350 1100 0 40 ~ 0 -PC14 -Text Label 10350 1200 0 40 ~ 0 -PC15 -Text Label 10350 1300 0 40 ~ 0 -PD0 -Text Label 10350 1400 0 40 ~ 0 -PD1 -Text Label 10350 1500 0 40 ~ 0 -RST -Text Label 10350 1600 0 40 ~ 0 -PC0 -Text Label 10350 1700 0 40 ~ 0 -PC1 -Text Label 10350 1800 0 40 ~ 0 -PC2 -Text Label 10350 1900 0 40 ~ 0 -PC3 -Text Label 10350 2000 0 40 ~ 0 -PA0 -Text Label 10350 2100 0 40 ~ 0 -PA1 -Text Label 10350 2200 0 40 ~ 0 -PA2 -Text Label 10350 2300 0 40 ~ 0 -PA3 -Text Label 10350 2400 0 40 ~ 0 -PA4 -Text Label 10350 2500 0 40 ~ 0 -PA5 -Text Label 10350 2600 0 40 ~ 0 -PA6 -Text Label 10350 2700 0 40 ~ 0 -PA7 -Text Label 10350 2800 0 40 ~ 0 -PC4 -Text Label 10350 2900 0 40 ~ 0 -PC5 -Text Label 10350 3000 0 40 ~ 0 -PB0 -Text Label 10350 3100 0 40 ~ 0 -PB1 -Text Label 10350 3200 0 40 ~ 0 -PB2 -Text Label 10350 3800 0 40 ~ 0 -PB9 -Text Label 10350 3900 0 40 ~ 0 -PB8 -Text Label 10350 4000 0 40 ~ 0 -BOOT -Text Label 10350 4100 0 40 ~ 0 -PB7 -Text Label 10350 4200 0 40 ~ 0 -PB6 -Text Label 10350 4300 0 40 ~ 0 -PB5 -Text Label 10350 4400 0 40 ~ 0 -PB4 -Text Label 10350 4500 0 40 ~ 0 -PB3 -Text Label 10350 4600 0 40 ~ 0 -PD2 -Text Label 10350 4700 0 40 ~ 0 -PC12 -Text Label 10350 4800 0 40 ~ 0 -PC11 -Text Label 10350 4900 0 40 ~ 0 -PC10 -Text Label 10350 5000 0 40 ~ 0 -PA15 -Text Label 10350 5100 0 40 ~ 0 -PA14 -Text Label 10350 5200 0 40 ~ 0 -PA13 -Text Label 10350 5300 0 40 ~ 0 -PA12 -Text Label 10350 5400 0 40 ~ 0 -PA11 -Text Label 10350 5500 0 40 ~ 0 -PA10 -Text Label 10350 5700 0 40 ~ 0 -PA8 -Text Label 10350 5600 0 40 ~ 0 -PA9 -Text Label 10350 5800 0 40 ~ 0 -PC9 -Text Label 10350 5900 0 40 ~ 0 -PC8 -Text Label 10350 6000 0 40 ~ 0 -PC7 -Text Label 10350 6100 0 40 ~ 0 -PC6 -$EndSCHEMATC diff --git a/template/ti-stellaris-boosterpack40/boosterpack.dcm b/template/ti-stellaris-boosterpack40/boosterpack.dcm deleted file mode 100644 index 43700435be..0000000000 --- a/template/ti-stellaris-boosterpack40/boosterpack.dcm +++ /dev/null @@ -1,3 +0,0 @@ -EESchema-DOCLIB Version 2.0 Date: Thu 18 Oct 2012 09:37:56 PM PDT -# -#End Doc Library diff --git a/template/ti-stellaris-boosterpack40/boosterpack.lib b/template/ti-stellaris-boosterpack40/boosterpack.lib deleted file mode 100644 index 24bc6fde0f..0000000000 --- a/template/ti-stellaris-boosterpack40/boosterpack.lib +++ /dev/null @@ -1,114 +0,0 @@ -EESchema-LIBRARY Version 2.3 Date: Thu 18 Oct 2012 09:37:56 PM PDT -#encoding utf-8 -# -# Ti_Booster_40_J1 -# -DEF Ti_Booster_40_J1 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J1" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 1.01/Vcc 1 -600 450 300 R 50 50 1 1 W -X 1.02/PB5 2 -600 350 300 R 50 50 1 1 B -X 1.03/PB0/Rxd 3 -600 250 300 R 50 50 1 1 B -X 1.04/PB1/TxD 4 -600 150 300 R 50 50 1 1 B -X 1.05/PE4 5 -600 50 300 R 50 50 1 1 B -X 1.06/PE5 6 -600 -50 300 R 50 50 1 1 B -X 1.07/PB4 7 -600 -150 300 R 50 50 1 1 B -X 1.08/PA5 8 -600 -250 300 R 50 50 1 1 B -X 1.09/PA6 9 -600 -350 300 R 50 50 1 1 B -X 1.10/PA7 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J2 -# -DEF Ti_Booster_40_J2 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J2" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 2.01/GND 1 -600 450 300 R 50 50 1 1 W -X 2.02/PB2 2 -600 350 300 R 50 50 1 1 B -X 2.03/PE0 3 -600 250 300 R 50 50 1 1 B -X 2.04/PF0 4 -600 150 300 R 50 50 1 1 B -X 2.05/RESET 5 -600 50 300 R 50 50 1 1 B -X 2.06/PB7 6 -600 -50 300 R 50 50 1 1 B -X 2.07/PB6 7 -600 -150 300 R 50 50 1 1 B -X 2.08/PA4 8 -600 -250 300 R 50 50 1 1 B -X 2.09/PA3 9 -600 -350 300 R 50 50 1 1 B -X 2.10/PA2 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J3 -# -DEF Ti_Booster_40_J3 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J3" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 3.01/+5V 1 -600 450 300 R 50 50 1 1 W -X 3.02/GND 2 -600 350 300 R 50 50 1 1 B -X 3.03/PD0 3 -600 250 300 R 50 50 1 1 B -X 3.04/PD1 4 -600 150 300 R 50 50 1 1 B -X 3.05/PD2 5 -600 50 300 R 50 50 1 1 B -X 3.06/PD3 6 -600 -50 300 R 50 50 1 1 B -X 3.07/PE1 7 -600 -150 300 R 50 50 1 1 B -X 3.08/PE2 8 -600 -250 300 R 50 50 1 1 B -X 3.09/PE3 9 -600 -350 300 R 50 50 1 1 B -X 3.10/PF1 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J4 -# -DEF Ti_Booster_40_J4 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J4" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 4.01/PF2 1 -600 450 300 R 50 50 1 1 W -X 4.02/PF3 2 -600 350 300 R 50 50 1 1 B -X 4.03/PB3 3 -600 250 300 R 50 50 1 1 B -X 4.04/PC4 4 -600 150 300 R 50 50 1 1 B -X 4.05/PC5 5 -600 50 300 R 50 50 1 1 B -X 4.06/PC6 6 -600 -50 300 R 50 50 1 1 B -X 4.07/PC7 7 -600 -150 300 R 50 50 1 1 B -X 4.08/PD6 8 -600 -250 300 R 50 50 1 1 B -X 4.09/PD7 9 -600 -350 300 R 50 50 1 1 B -X 4.10/PF4 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_J1 -# -DEF Ti_Booster_J1 J 0 40 Y Y 1 F N -F0 "J" -300 1300 60 H V C CNN -F1 "Ti_Booster_J1" -100 -1250 60 H V C CNN -DRAW -S -450 1200 500 -1150 0 1 0 N -X Vcc 1 -750 -950 300 R 50 50 1 1 W -X P1.0/LED1 2 -750 1100 300 R 50 50 1 1 B -X P1.1/Rxd 3 -750 1000 300 R 50 50 1 1 B -X P1.2/TxD 4 -750 900 300 R 50 50 1 1 B -X P1.3/S2 5 -750 800 300 R 50 50 1 1 B -X p1.4 6 -750 700 300 R 50 50 1 1 B -X P1.5 7 -750 600 300 R 50 50 1 1 B -X P2.0 8 -750 200 300 R 50 50 1 1 B -X P2.1 9 -750 100 300 R 50 50 1 1 B -X P2.2 10 -750 0 300 R 50 50 1 1 B -X Gnd 20 -750 -1050 300 R 50 50 1 1 B -X P2.3 11 -750 -100 300 R 50 50 1 1 B -X P2.4 12 -750 -200 300 R 50 50 1 1 B -X P2.5 13 -750 -300 300 R 50 50 1 1 B -X P1.6/Led2 14 -750 500 300 R 50 50 1 1 B -X P1.7 15 -750 400 300 R 50 50 1 1 B -X RST/S1 16 -750 -750 300 R 50 50 1 1 B -X Test 17 -750 -650 300 R 50 50 1 1 B -X P2.7/Xout 18 -750 -550 300 R 50 50 1 1 B -X P2.6/Xin 19 -750 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -#End Library diff --git a/template/ti-stellaris-boosterpack40/boosterpack40-cache.lib b/template/ti-stellaris-boosterpack40/boosterpack40-cache.lib deleted file mode 100644 index ea7c11ddf8..0000000000 --- a/template/ti-stellaris-boosterpack40/boosterpack40-cache.lib +++ /dev/null @@ -1,132 +0,0 @@ -EESchema-LIBRARY Version 2.3 Date: Thu 18 Oct 2012 10:04:05 PM PDT -#encoding utf-8 -# -# +5V -# -DEF +5V #PWR 0 40 Y Y 1 F P -F0 "#PWR" 0 90 20 H I C CNN -F1 "+5V" 0 90 30 H V C CNN -DRAW -X +5V 1 0 0 0 U 20 20 0 0 W N -C 0 50 20 0 1 0 N -P 4 0 1 0 0 0 0 30 0 30 0 30 N -ENDDRAW -ENDDEF -# -# CONN_3 -# -DEF CONN_3 K 0 40 Y N 1 F N -F0 "K" -50 0 50 V V C CNN -F1 "CONN_3" 50 0 40 V V C CNN -DRAW -S -100 150 100 -150 0 1 0 N -X P1 1 -350 100 250 R 60 60 1 1 P I -X PM 2 -350 0 250 R 60 60 1 1 P I -X P3 3 -350 -100 250 R 60 60 1 1 P I -ENDDRAW -ENDDEF -# -# GND -# -DEF ~GND #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 0 30 H I C CNN -F1 "GND" 0 -70 30 H I C CNN -DRAW -P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N -X GND 1 0 0 0 U 30 30 1 1 W N -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J1 -# -DEF Ti_Booster_40_J1 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J1" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 1.01/Vcc 1 -600 450 300 R 50 50 1 1 W -X 1.02/PB5 2 -600 350 300 R 50 50 1 1 B -X 1.03/PB0/Rxd 3 -600 250 300 R 50 50 1 1 B -X 1.04/PB1/TxD 4 -600 150 300 R 50 50 1 1 B -X 1.05/PE4 5 -600 50 300 R 50 50 1 1 B -X 1.06/PE5 6 -600 -50 300 R 50 50 1 1 B -X 1.07/PB4 7 -600 -150 300 R 50 50 1 1 B -X 1.08/PA5 8 -600 -250 300 R 50 50 1 1 B -X 1.09/PA6 9 -600 -350 300 R 50 50 1 1 B -X 1.10/PA7 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J2 -# -DEF Ti_Booster_40_J2 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J2" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 2.01/GND 1 -600 450 300 R 50 50 1 1 W -X 2.02/PB2 2 -600 350 300 R 50 50 1 1 B -X 2.03/PE0 3 -600 250 300 R 50 50 1 1 B -X 2.04/PF0 4 -600 150 300 R 50 50 1 1 B -X 2.05/RESET 5 -600 50 300 R 50 50 1 1 B -X 2.06/PB7 6 -600 -50 300 R 50 50 1 1 B -X 2.07/PB6 7 -600 -150 300 R 50 50 1 1 B -X 2.08/PA4 8 -600 -250 300 R 50 50 1 1 B -X 2.09/PA3 9 -600 -350 300 R 50 50 1 1 B -X 2.10/PA2 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J3 -# -DEF Ti_Booster_40_J3 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J3" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 3.01/+5V 1 -600 450 300 R 50 50 1 1 W -X 3.02/GND 2 -600 350 300 R 50 50 1 1 B -X 3.03/PD0 3 -600 250 300 R 50 50 1 1 B -X 3.04/PD1 4 -600 150 300 R 50 50 1 1 B -X 3.05/PD2 5 -600 50 300 R 50 50 1 1 B -X 3.06/PD3 6 -600 -50 300 R 50 50 1 1 B -X 3.07/PE1 7 -600 -150 300 R 50 50 1 1 B -X 3.08/PE2 8 -600 -250 300 R 50 50 1 1 B -X 3.09/PE3 9 -600 -350 300 R 50 50 1 1 B -X 3.10/PF1 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J4 -# -DEF Ti_Booster_40_J4 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J4" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 4.01/PF2 1 -600 450 300 R 50 50 1 1 W -X 4.02/PF3 2 -600 350 300 R 50 50 1 1 B -X 4.03/PB3 3 -600 250 300 R 50 50 1 1 B -X 4.04/PC4 4 -600 150 300 R 50 50 1 1 B -X 4.05/PC5 5 -600 50 300 R 50 50 1 1 B -X 4.06/PC6 6 -600 -50 300 R 50 50 1 1 B -X 4.07/PC7 7 -600 -150 300 R 50 50 1 1 B -X 4.08/PD6 8 -600 -250 300 R 50 50 1 1 B -X 4.09/PD7 9 -600 -350 300 R 50 50 1 1 B -X 4.10/PF4 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# VCC -# -DEF VCC #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 100 30 H I C CNN -F1 "VCC" 0 100 30 H V C CNN -DRAW -X VCC 1 0 0 0 U 20 20 0 0 W N -C 0 50 20 0 1 0 N -P 3 0 1 0 0 0 0 30 0 30 N -ENDDRAW -ENDDEF -# -#End Library diff --git a/template/ti-stellaris-boosterpack40/boosterpack40.cmp b/template/ti-stellaris-boosterpack40/boosterpack40.cmp deleted file mode 100644 index eab4a19bd3..0000000000 --- a/template/ti-stellaris-boosterpack40/boosterpack40.cmp +++ /dev/null @@ -1,38 +0,0 @@ -Cmp-Mod V01 Created by CvPcb (2011-nov-30)-testing date = Thu 18 Oct 2012 09:58:43 PM PDT - -BeginCmp -TimeStamp = /5080DB5C; -Reference = J1; -ValeurCmp = TI_BOOSTER_40_J1; -IdModule = SIL-10; -EndCmp - -BeginCmp -TimeStamp = /5080DBF4; -Reference = J2; -ValeurCmp = TI_BOOSTER_40_J2; -IdModule = SIL-10; -EndCmp - -BeginCmp -TimeStamp = /5080DC03; -Reference = J3; -ValeurCmp = TI_BOOSTER_40_J3; -IdModule = SIL-10; -EndCmp - -BeginCmp -TimeStamp = /5080DC12; -Reference = J4; -ValeurCmp = TI_BOOSTER_40_J4; -IdModule = SIL-10; -EndCmp - -BeginCmp -TimeStamp = /5080A33C; -Reference = J5; -ValeurCmp = CONN_3; -IdModule = SIL-3; -EndCmp - -EndListe diff --git a/template/ti-stellaris-boosterpack40/boosterpack40.mod b/template/ti-stellaris-boosterpack40/boosterpack40.mod deleted file mode 100644 index f0ee628b9e..0000000000 --- a/template/ti-stellaris-boosterpack40/boosterpack40.mod +++ /dev/null @@ -1,160 +0,0 @@ -PCBNEW-LibModule-V1 Thu 18 Oct 2012 07:20:13 PM PDT -# encoding utf-8 -Units mm -$INDEX -BoosterPack_J1_J2 -$EndINDEX -$MODULE BoosterPack_J1_J2 -Po 0 0 0 15 5080B8D5 00000000 ~~ -Li BoosterPack_J1_J2 -Sc 0 -AR /5080AA0E -Op 0 0 0 -T0 0 8.89 1.524 1.524 0 0.3048 N V 21 N "J1" -T1 0 0 1.524 1.524 0 0.3048 N V 21 N "J1-J2" -DS -2.54 -3.81 48.26 -3.81 0.381 21 -DS 48.26 -3.81 48.26 26.67 0.381 21 -DS 48.26 26.67 -2.54 26.67 0.381 21 -DS -2.54 26.67 -2.54 -3.81 0.381 21 -$PAD -Sh "1" R 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 3 "VCC" -Po 0 0 -$EndPAD -$PAD -Sh "2" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 2.54 -$EndPAD -$PAD -Sh "3" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 5.08 -$EndPAD -$PAD -Sh "4" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 7.62 -$EndPAD -$PAD -Sh "5" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 10.16 -$EndPAD -$PAD -Sh "6" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 12.7 -$EndPAD -$PAD -Sh "7" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 2 "N-000002" -Po 0 15.24 -$EndPAD -$PAD -Sh "8" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 17.78 -$EndPAD -$PAD -Sh "9" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 20.32 -$EndPAD -$PAD -Sh "10" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 22.86 -$EndPAD -$PAD -Sh "11" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 22.86 -$EndPAD -$PAD -Sh "12" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 20.32 -$EndPAD -$PAD -Sh "13" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 17.78 -$EndPAD -$PAD -Sh "14" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 15.24 -$EndPAD -$PAD -Sh "15" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 12.7 -$EndPAD -$PAD -Sh "16" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 10.16 -$EndPAD -$PAD -Sh "17" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 7.62 -$EndPAD -$PAD -Sh "18" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 5.08 -$EndPAD -$PAD -Sh "19" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 2.54 -$EndPAD -$PAD -Sh "20" R 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 1 "GND" -Po 45.72 0 -$EndPAD -$EndMODULE BoosterPack_J1_J2 -$EndLIBRARY diff --git a/template/ti-stellaris-boosterpack40/boosterpack40.net b/template/ti-stellaris-boosterpack40/boosterpack40.net deleted file mode 100644 index 933e50d981..0000000000 --- a/template/ti-stellaris-boosterpack40/boosterpack40.net +++ /dev/null @@ -1,68 +0,0 @@ -# EESchema Netlist Version 1.1 created Thu 18 Oct 2012 09:58:06 PM PDT -( - ( /5080A33C $noname J5 CONN_3 {Lib=CONN_3} - ( 1 VCC ) - ( 2 GND ) - ( 3 GND ) - ) - ( /5080DB5C $noname J1 TI_BOOSTER_40_J1 {Lib=TI_BOOSTER_40_J1} - ( 1 VCC ) - ( 2 ? ) - ( 3 ? ) - ( 4 ? ) - ( 5 ? ) - ( 6 ? ) - ( 7 ? ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ) - ( /5080DBF4 $noname J2 TI_BOOSTER_40_J2 {Lib=TI_BOOSTER_40_J2} - ( 1 GND ) - ( 2 ? ) - ( 3 ? ) - ( 4 ? ) - ( 5 ? ) - ( 6 ? ) - ( 7 ? ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ) - ( /5080DC03 $noname J3 TI_BOOSTER_40_J3 {Lib=TI_BOOSTER_40_J3} - ( 1 +5V ) - ( 2 GND ) - ( 3 ? ) - ( 4 ? ) - ( 5 ? ) - ( 6 ? ) - ( 7 ? ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ) - ( /5080DC12 $noname J4 TI_BOOSTER_40_J4 {Lib=TI_BOOSTER_40_J4} - ( 1 ? ) - ( 2 ? ) - ( 3 ? ) - ( 4 ? ) - ( 5 ? ) - ( 6 ? ) - ( 7 ? ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ) -) -* -{ Pin List by Nets -Net 8 "GND" "GND" - J5 3 - J5 2 - J2 1 - J3 2 -Net 27 "VCC" "VCC" - J5 1 - J1 1 -} -#End diff --git a/template/ti-stellaris-boosterpack40/boosterpack40.pro b/template/ti-stellaris-boosterpack40/boosterpack40.pro deleted file mode 100644 index e5acab5eeb..0000000000 --- a/template/ti-stellaris-boosterpack40/boosterpack40.pro +++ /dev/null @@ -1,80 +0,0 @@ -update=Thu 18 Oct 2012 09:23:23 PM PDT -version=1 -last_client=kicad -[eeschema] -version=1 -LibDir= -NetFmtName= -RptD_X=0 -RptD_Y=100 -RptLab=1 -LabSize=60 -[eeschema/libraries] -LibName1=BoosterPack -LibName2=power -LibName3=device -LibName4=transistors -LibName5=conn -LibName6=linear -LibName7=regul -LibName8=74xx -LibName9=cmos4000 -LibName10=adc-dac -LibName11=memory -LibName12=xilinx -LibName13=special -LibName14=microcontrollers -LibName15=dsp -LibName16=microchip -LibName17=analog_switches -LibName18=motorola -LibName19=texas -LibName20=intel -LibName21=audio -LibName22=interface -LibName23=digital-audio -LibName24=philips -LibName25=display -LibName26=cypress -LibName27=siliconi -LibName28=opto -LibName29=atmel -LibName30=contrib -LibName31=valves -[cvpcb] -version=1 -NetIExt=net -[cvpcb/libraries] -EquName1=devcms -[pcbnew] -version=1 -LastNetListRead=BoosterPack20.net -PadDrill=1.016 -PadSizeH=1.524 -PadSizeV=1.524 -PcbTextSizeV=1 -PcbTextSizeH=1 -PcbTextThickness=0.3 -ModuleTextSizeV=1 -ModuleTextSizeH=1 -ModuleTextSizeThickness=0.15 -SolderMaskClearance=0 -DrawSegmentWidth=0.2 -BoardOutlineThickness=0.15 -ModuleOutlineThickness=0.15 -[pcbnew/libraries] -LibDir= -LibName1=BoosterPack20 -LibName2=sockets -LibName3=connect -LibName4=discret -LibName5=pin_array -LibName6=divers -LibName7=libcms -LibName8=display -LibName9=led -LibName10=dip_sockets -LibName11=pga_sockets -LibName12=valves -[general] -version=1 diff --git a/template/ti-stellaris-boosterpack40/boosterpack40.sch b/template/ti-stellaris-boosterpack40/boosterpack40.sch deleted file mode 100644 index c4d54f665b..0000000000 --- a/template/ti-stellaris-boosterpack40/boosterpack40.sch +++ /dev/null @@ -1,156 +0,0 @@ -EESchema Schematic File Version 2 date Thu 18 Oct 2012 10:04:05 PM PDT -LIBS:BoosterPack -LIBS:power -LIBS:device -LIBS:transistors -LIBS:conn -LIBS:linear -LIBS:regul -LIBS:74xx -LIBS:cmos4000 -LIBS:adc-dac -LIBS:memory -LIBS:xilinx -LIBS:special -LIBS:microcontrollers -LIBS:dsp -LIBS:microchip -LIBS:analog_switches -LIBS:motorola -LIBS:texas -LIBS:intel -LIBS:audio -LIBS:interface -LIBS:digital-audio -LIBS:philips -LIBS:display -LIBS:cypress -LIBS:siliconi -LIBS:opto -LIBS:atmel -LIBS:contrib -LIBS:valves -LIBS:BoosterPack40-cache -EELAYER 27 0 -EELAYER END -$Descr A4 11693 8268 -encoding utf-8 -Sheet 1 1 -Title "" -Date "19 oct 2012" -Rev "" -Comp "" -Comment1 "" -Comment2 "" -Comment3 "" -Comment4 "" -$EndDescr -$Comp -L CONN_3 J5 -U 1 1 5080A33C -P 7600 6800 -F 0 "J5" V 7550 6800 50 0000 C CNN -F 1 "CONN_3" V 7650 6800 40 0000 C CNN - 1 7600 6800 - 1 0 0 1 -$EndComp -Wire Wire Line - 7250 6700 7000 6700 -Wire Wire Line - 7250 6900 7000 6900 -$Comp -L VCC #PWR01 -U 1 1 5080A56F -P 7000 6900 -F 0 "#PWR01" H 7000 7000 30 0001 C CNN -F 1 "VCC" H 7000 7000 30 0000 C CNN - 1 7000 6900 - 0 -1 -1 0 -$EndComp -$Comp -L GND #PWR02 -U 1 1 5080A57E -P 7000 6700 -F 0 "#PWR02" H 7000 6700 30 0001 C CNN -F 1 "GND" H 7000 6630 30 0001 C CNN - 1 7000 6700 - 0 1 1 0 -$EndComp -Wire Wire Line - 7100 6800 7100 6700 -Connection ~ 7100 6700 -Wire Wire Line - 7250 6800 7100 6800 -$Comp -L GND #PWR03 -U 1 1 5080AA99 -P 9150 2450 -F 0 "#PWR03" H 9150 2450 30 0001 C CNN -F 1 "GND" H 9150 2380 30 0001 C CNN - 1 9150 2450 - 0 1 1 0 -$EndComp -$Comp -L VCC #PWR04 -U 1 1 5080AA9F -P 9150 900 -F 0 "#PWR04" H 9150 1000 30 0001 C CNN -F 1 "VCC" H 9150 1000 30 0000 C CNN - 1 9150 900 - 0 -1 -1 0 -$EndComp -$Comp -L TI_BOOSTER_40_J1 J1 -U 1 1 5080DB5C -P 9750 1350 -F 0 "J1" H 9700 2000 60 0000 C CNN -F 1 "TI_BOOSTER_40_J1" H 9750 700 60 0000 C CNN - 1 9750 1350 - 1 0 0 -1 -$EndComp -$Comp -L TI_BOOSTER_40_J2 J2 -U 1 1 5080DBF4 -P 9750 2900 -F 0 "J2" H 9700 3550 60 0000 C CNN -F 1 "TI_BOOSTER_40_J2" H 9750 2250 60 0000 C CNN - 1 9750 2900 - 1 0 0 -1 -$EndComp -$Comp -L TI_BOOSTER_40_J3 J3 -U 1 1 5080DC03 -P 9750 4450 -F 0 "J3" H 9700 5100 60 0000 C CNN -F 1 "TI_BOOSTER_40_J3" H 9750 3800 60 0000 C CNN - 1 9750 4450 - 1 0 0 -1 -$EndComp -$Comp -L TI_BOOSTER_40_J4 J4 -U 1 1 5080DC12 -P 9750 6000 -F 0 "J4" H 9700 6650 60 0000 C CNN -F 1 "TI_BOOSTER_40_J4" H 9750 5350 60 0000 C CNN - 1 9750 6000 - 1 0 0 -1 -$EndComp -$Comp -L GND #PWR05 -U 1 1 5080DC79 -P 9150 4100 -F 0 "#PWR05" H 9150 4100 30 0001 C CNN -F 1 "GND" H 9150 4030 30 0001 C CNN - 1 9150 4100 - 0 1 1 0 -$EndComp -$Comp -L +5V #PWR06 -U 1 1 5080DC8B -P 9150 4000 -F 0 "#PWR06" H 9150 4090 20 0001 C CNN -F 1 "+5V" H 9150 4090 30 0000 C CNN - 1 9150 4000 - 0 -1 -1 0 -$EndComp -$EndSCHEMATC diff --git a/template/ti-stellaris-boosterpack40/boosterpack40_min.kicad_pcb b/template/ti-stellaris-boosterpack40/boosterpack40_min.kicad_pcb deleted file mode 100644 index 2ad6d40269..0000000000 --- a/template/ti-stellaris-boosterpack40/boosterpack40_min.kicad_pcb +++ /dev/null @@ -1,344 +0,0 @@ -(kicad_pcb (version 3) (host pcbnew "(2013-02-23 BZR 3971)-testing") - - (general - (links 1) - (no_connects 1) - (area 172.984525 104.605002 242.305477 149.137511) - (thickness 1.6) - (drawings 7) - (tracks 0) - (zones 0) - (modules 4) - (nets 4) - ) - - (page A3) - (layers - (15 Front signal) - (0 Back signal) - (16 Dessous.Adhes user) - (17 Dessus.Adhes user) - (18 Dessous.Pate user) - (19 Dessus.Pate user) - (20 Dessous.SilkS user) - (21 Dessus.SilkS user) - (22 Dessous.Masque user) - (23 Dessus.Masque user) - (24 Dessin.User user) - (25 Cmts.User user) - (26 Eco1.User user) - (27 Eco2.User user) - (28 Contours.Ci user) - ) - - (setup - (last_trace_width 0.254) - (trace_clearance 0.254) - (zone_clearance 0.508) - (zone_45_only no) - (trace_min 0.254) - (segment_width 0.20066) - (edge_width 0.14986) - (via_size 0.889) - (via_drill 0.635) - (via_min_size 0.889) - (via_min_drill 0.508) - (uvia_size 0.508) - (uvia_drill 0.127) - (uvias_allowed no) - (uvia_min_size 0.508) - (uvia_min_drill 0.127) - (pcb_text_width 0.3) - (pcb_text_size 1 1) - (mod_edge_width 0.14986) - (mod_text_size 1 1) - (mod_text_width 0.15) - (pad_size 1 1) - (pad_drill 0.6) - (pad_to_mask_clearance 0) - (aux_axis_origin 0 0) - (visible_elements 7FFFFFFF) - (pcbplotparams - (layerselection 3178497) - (usegerberextensions true) - (excludeedgelayer true) - (linewidth 152400) - (plotframeref false) - (viasonmask false) - (mode 1) - (useauxorigin false) - (hpglpennumber 1) - (hpglpenspeed 20) - (hpglpendiameter 15) - (hpglpenoverlay 2) - (psnegative false) - (psa4output false) - (plotreference true) - (plotvalue true) - (plotothertext true) - (plotinvisibletext false) - (padsonsilk false) - (subtractmaskfromsilk false) - (outputformat 1) - (mirror false) - (drillshape 1) - (scaleselection 1) - (outputdirectory "")) - ) - - (net 0 "") - (net 1 +5V) - (net 2 GND) - (net 3 VCC) - - (net_class Default "This is the default net class." - (clearance 0.254) - (trace_width 0.254) - (via_dia 0.889) - (via_drill 0.635) - (uvia_dia 0.508) - (uvia_drill 0.127) - (add_net "") - (add_net +5V) - (add_net GND) - (add_net VCC) - ) - - (module SIL-10 (layer Front) (tedit 5080DEE6) (tstamp 5080DE37) - (at 231.14 133.35 270) - (descr "Connecteur 10 pins") - (tags "CONN DEV") - (path /5080DBF4) - (fp_text reference J2 (at -13.97 0 360) (layer Dessus.SilkS) - (effects (font (size 1.72974 1.08712) (thickness 0.3048))) - ) - (fp_text value TI_BOOSTER_40_J2 (at 6.35 -2.54 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.3048))) - ) - (fp_line (start -12.7 1.27) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -12.7 -1.27) (end 12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 -1.27) (end 12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -10.16 1.27) (end -10.16 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 GND) - ) - (pad 2 thru_hole circle (at -8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 3 thru_hole circle (at -6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole circle (at -1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole circle (at 6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 9 thru_hole circle (at 8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole circle (at 11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (module SIL-10 (layer Front) (tedit 5080DEED) (tstamp 5080DE4A) - (at 228.6 133.35 270) - (descr "Connecteur 10 pins") - (tags "CONN DEV") - (path /5080DC12) - (fp_text reference J4 (at -13.97 0 360) (layer Dessus.SilkS) - (effects (font (size 1.72974 1.08712) (thickness 0.3048))) - ) - (fp_text value TI_BOOSTER_40_J4 (at 6.35 -2.54 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.3048))) - ) - (fp_line (start -12.7 1.27) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -12.7 -1.27) (end 12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 -1.27) (end 12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -10.16 1.27) (end -10.16 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 2 thru_hole circle (at -8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 3 thru_hole circle (at -6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole circle (at -1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole circle (at 6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 9 thru_hole circle (at 8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole circle (at 11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (module SIL-10 (layer Front) (tedit 5080DEE0) (tstamp 5080AB71) - (at 187.96 133.35 270) - (descr "Connecteur 10 pins") - (tags "CONN DEV") - (path /5080DC03) - (fp_text reference J3 (at -13.97 0 360) (layer Dessus.SilkS) - (effects (font (size 1.72974 1.08712) (thickness 0.3048))) - ) - (fp_text value TI_BOOSTER_40_J3 (at 6.35 -2.54 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.3048))) - ) - (fp_line (start -12.7 1.27) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -12.7 -1.27) (end 12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 -1.27) (end 12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -10.16 1.27) (end -10.16 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 +5V) - ) - (pad 2 thru_hole circle (at -8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 GND) - ) - (pad 3 thru_hole circle (at -6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole circle (at -1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole circle (at 6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 9 thru_hole circle (at 8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole circle (at 11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (module SIL-10 (layer Front) (tedit 5080DEDC) (tstamp 5080AB8D) - (at 185.42 133.35 270) - (descr "Connecteur 10 pins") - (tags "CONN DEV") - (path /5080DB5C) - (fp_text reference J1 (at -13.97 0 360) (layer Dessus.SilkS) - (effects (font (size 1.72974 1.08712) (thickness 0.3048))) - ) - (fp_text value TI_BOOSTER_40_J1 (at 6.35 -2.54 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.3048))) - ) - (fp_line (start -12.7 1.27) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -12.7 -1.27) (end 12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 -1.27) (end 12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -10.16 1.27) (end -10.16 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 VCC) - ) - (pad 2 thru_hole circle (at -8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 3 thru_hole circle (at -6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole circle (at -1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole circle (at 6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 9 thru_hole circle (at 8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole circle (at 11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (dimension 34.29 (width 0.25) (layer Dessin.User) - (gr_text "1.3500 in" (at 176.800001 130.175 270) (layer Dessin.User) - (effects (font (size 1 1) (thickness 0.25))) - ) - (feature1 (pts (xy 182.88 147.32) (xy 175.800001 147.32))) - (feature2 (pts (xy 182.88 113.03) (xy 175.800001 113.03))) - (crossbar (pts (xy 177.800001 113.03) (xy 177.800001 147.32))) - (arrow1a (pts (xy 177.800001 147.32) (xy 177.213581 146.193497))) - (arrow1b (pts (xy 177.800001 147.32) (xy 178.386421 146.193497))) - (arrow2a (pts (xy 177.800001 113.03) (xy 177.213581 114.156503))) - (arrow2b (pts (xy 177.800001 113.03) (xy 178.386421 114.156503))) - ) - (dimension 8.89 (width 0.25) (layer Dessin.User) - (gr_text "0.3500 in" (at 238.49 117.475 90) (layer Dessin.User) - (effects (font (size 1 1) (thickness 0.25))) - ) - (feature1 (pts (xy 231.14 113.03) (xy 239.49 113.03))) - (feature2 (pts (xy 231.14 121.92) (xy 239.49 121.92))) - (crossbar (pts (xy 237.49 121.92) (xy 237.49 113.03))) - (arrow1a (pts (xy 237.49 113.03) (xy 238.07642 114.156503))) - (arrow1b (pts (xy 237.49 113.03) (xy 236.90358 114.156503))) - (arrow2a (pts (xy 237.49 121.92) (xy 238.07642 120.793497))) - (arrow2b (pts (xy 237.49 121.92) (xy 236.90358 120.793497))) - ) - (gr_line (start 233.68 147.32) (end 182.88 147.32) (angle 90) (layer Contours.Ci) (width 0.15)) - (dimension 50.8 (width 0.25) (layer Dessin.User) - (gr_text "2.0000 in" (at 208.28 105.680002) (layer Dessin.User) - (effects (font (size 1 1) (thickness 0.25))) - ) - (feature1 (pts (xy 233.68 113.03) (xy 233.68 104.680002))) - (feature2 (pts (xy 182.88 113.03) (xy 182.88 104.680002))) - (crossbar (pts (xy 182.88 106.680002) (xy 233.68 106.680002))) - (arrow1a (pts (xy 233.68 106.680002) (xy 232.553497 107.266422))) - (arrow1b (pts (xy 233.68 106.680002) (xy 232.553497 106.093582))) - (arrow2a (pts (xy 182.88 106.680002) (xy 184.006503 107.266422))) - (arrow2b (pts (xy 182.88 106.680002) (xy 184.006503 106.093582))) - ) - (gr_line (start 182.88 147.32) (end 182.88 113.03) (angle 90) (layer Contours.Ci) (width 0.14986)) - (gr_line (start 233.68 113.03) (end 233.68 147.32) (angle 90) (layer Contours.Ci) (width 0.14986)) - (gr_line (start 182.88 113.03) (end 233.68 113.03) (angle 90) (layer Contours.Ci) (width 0.15)) - -) diff --git a/template/ti-stellaris-boosterpack40/meta/icon.png b/template/ti-stellaris-boosterpack40/meta/icon.png deleted file mode 100644 index d0bafd18c4..0000000000 Binary files a/template/ti-stellaris-boosterpack40/meta/icon.png and /dev/null differ diff --git a/template/ti-stellaris-boosterpack40/meta/info.html b/template/ti-stellaris-boosterpack40/meta/info.html deleted file mode 100644 index 25c107b711..0000000000 --- a/template/ti-stellaris-boosterpack40/meta/info.html +++ /dev/null @@ -1,22 +0,0 @@ - - -Ti Launchpad XL - Expansion Board - - -

Launchpad XL

-

Expansion Board

-This project template is the basis of an expansion board for the -TI Launchpad -board. -

-This Board conforms to the 40 pin Launchpad Standard at the maximum size and includes the optional J5 connector. -

-The board outline looks like the following: -
-40 Pin Launchpad -
-(c)2012 Brian Sidebotham
-(c)2012 Henry von Tresckow
-(c)2012 Kicad Developers
- - diff --git a/template/ti-stellaris-boosterpack40/meta/launchpad_standard40.png b/template/ti-stellaris-boosterpack40/meta/launchpad_standard40.png deleted file mode 100644 index c91907351e..0000000000 Binary files a/template/ti-stellaris-boosterpack40/meta/launchpad_standard40.png and /dev/null differ diff --git a/template/ti-stellaris-boosterpack40_min/boosterpack.dcm b/template/ti-stellaris-boosterpack40_min/boosterpack.dcm deleted file mode 100644 index 43700435be..0000000000 --- a/template/ti-stellaris-boosterpack40_min/boosterpack.dcm +++ /dev/null @@ -1,3 +0,0 @@ -EESchema-DOCLIB Version 2.0 Date: Thu 18 Oct 2012 09:37:56 PM PDT -# -#End Doc Library diff --git a/template/ti-stellaris-boosterpack40_min/boosterpack.lib b/template/ti-stellaris-boosterpack40_min/boosterpack.lib deleted file mode 100644 index 24bc6fde0f..0000000000 --- a/template/ti-stellaris-boosterpack40_min/boosterpack.lib +++ /dev/null @@ -1,114 +0,0 @@ -EESchema-LIBRARY Version 2.3 Date: Thu 18 Oct 2012 09:37:56 PM PDT -#encoding utf-8 -# -# Ti_Booster_40_J1 -# -DEF Ti_Booster_40_J1 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J1" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 1.01/Vcc 1 -600 450 300 R 50 50 1 1 W -X 1.02/PB5 2 -600 350 300 R 50 50 1 1 B -X 1.03/PB0/Rxd 3 -600 250 300 R 50 50 1 1 B -X 1.04/PB1/TxD 4 -600 150 300 R 50 50 1 1 B -X 1.05/PE4 5 -600 50 300 R 50 50 1 1 B -X 1.06/PE5 6 -600 -50 300 R 50 50 1 1 B -X 1.07/PB4 7 -600 -150 300 R 50 50 1 1 B -X 1.08/PA5 8 -600 -250 300 R 50 50 1 1 B -X 1.09/PA6 9 -600 -350 300 R 50 50 1 1 B -X 1.10/PA7 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J2 -# -DEF Ti_Booster_40_J2 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J2" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 2.01/GND 1 -600 450 300 R 50 50 1 1 W -X 2.02/PB2 2 -600 350 300 R 50 50 1 1 B -X 2.03/PE0 3 -600 250 300 R 50 50 1 1 B -X 2.04/PF0 4 -600 150 300 R 50 50 1 1 B -X 2.05/RESET 5 -600 50 300 R 50 50 1 1 B -X 2.06/PB7 6 -600 -50 300 R 50 50 1 1 B -X 2.07/PB6 7 -600 -150 300 R 50 50 1 1 B -X 2.08/PA4 8 -600 -250 300 R 50 50 1 1 B -X 2.09/PA3 9 -600 -350 300 R 50 50 1 1 B -X 2.10/PA2 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J3 -# -DEF Ti_Booster_40_J3 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J3" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 3.01/+5V 1 -600 450 300 R 50 50 1 1 W -X 3.02/GND 2 -600 350 300 R 50 50 1 1 B -X 3.03/PD0 3 -600 250 300 R 50 50 1 1 B -X 3.04/PD1 4 -600 150 300 R 50 50 1 1 B -X 3.05/PD2 5 -600 50 300 R 50 50 1 1 B -X 3.06/PD3 6 -600 -50 300 R 50 50 1 1 B -X 3.07/PE1 7 -600 -150 300 R 50 50 1 1 B -X 3.08/PE2 8 -600 -250 300 R 50 50 1 1 B -X 3.09/PE3 9 -600 -350 300 R 50 50 1 1 B -X 3.10/PF1 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J4 -# -DEF Ti_Booster_40_J4 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J4" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 4.01/PF2 1 -600 450 300 R 50 50 1 1 W -X 4.02/PF3 2 -600 350 300 R 50 50 1 1 B -X 4.03/PB3 3 -600 250 300 R 50 50 1 1 B -X 4.04/PC4 4 -600 150 300 R 50 50 1 1 B -X 4.05/PC5 5 -600 50 300 R 50 50 1 1 B -X 4.06/PC6 6 -600 -50 300 R 50 50 1 1 B -X 4.07/PC7 7 -600 -150 300 R 50 50 1 1 B -X 4.08/PD6 8 -600 -250 300 R 50 50 1 1 B -X 4.09/PD7 9 -600 -350 300 R 50 50 1 1 B -X 4.10/PF4 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_J1 -# -DEF Ti_Booster_J1 J 0 40 Y Y 1 F N -F0 "J" -300 1300 60 H V C CNN -F1 "Ti_Booster_J1" -100 -1250 60 H V C CNN -DRAW -S -450 1200 500 -1150 0 1 0 N -X Vcc 1 -750 -950 300 R 50 50 1 1 W -X P1.0/LED1 2 -750 1100 300 R 50 50 1 1 B -X P1.1/Rxd 3 -750 1000 300 R 50 50 1 1 B -X P1.2/TxD 4 -750 900 300 R 50 50 1 1 B -X P1.3/S2 5 -750 800 300 R 50 50 1 1 B -X p1.4 6 -750 700 300 R 50 50 1 1 B -X P1.5 7 -750 600 300 R 50 50 1 1 B -X P2.0 8 -750 200 300 R 50 50 1 1 B -X P2.1 9 -750 100 300 R 50 50 1 1 B -X P2.2 10 -750 0 300 R 50 50 1 1 B -X Gnd 20 -750 -1050 300 R 50 50 1 1 B -X P2.3 11 -750 -100 300 R 50 50 1 1 B -X P2.4 12 -750 -200 300 R 50 50 1 1 B -X P2.5 13 -750 -300 300 R 50 50 1 1 B -X P1.6/Led2 14 -750 500 300 R 50 50 1 1 B -X P1.7 15 -750 400 300 R 50 50 1 1 B -X RST/S1 16 -750 -750 300 R 50 50 1 1 B -X Test 17 -750 -650 300 R 50 50 1 1 B -X P2.7/Xout 18 -750 -550 300 R 50 50 1 1 B -X P2.6/Xin 19 -750 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -#End Library diff --git a/template/ti-stellaris-boosterpack40_min/boosterpack40_min-cache.lib b/template/ti-stellaris-boosterpack40_min/boosterpack40_min-cache.lib deleted file mode 100644 index 3c9da8d784..0000000000 --- a/template/ti-stellaris-boosterpack40_min/boosterpack40_min-cache.lib +++ /dev/null @@ -1,119 +0,0 @@ -EESchema-LIBRARY Version 2.3 Date: Thu 18 Oct 2012 10:11:13 PM PDT -#encoding utf-8 -# -# +5V -# -DEF +5V #PWR 0 40 Y Y 1 F P -F0 "#PWR" 0 90 20 H I C CNN -F1 "+5V" 0 90 30 H V C CNN -DRAW -X +5V 1 0 0 0 U 20 20 0 0 W N -C 0 50 20 0 1 0 N -P 4 0 1 0 0 0 0 30 0 30 0 30 N -ENDDRAW -ENDDEF -# -# GND -# -DEF ~GND #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 0 30 H I C CNN -F1 "GND" 0 -70 30 H I C CNN -DRAW -P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N -X GND 1 0 0 0 U 30 30 1 1 W N -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J1 -# -DEF Ti_Booster_40_J1 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J1" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 1.01/Vcc 1 -600 450 300 R 50 50 1 1 W -X 1.02/PB5 2 -600 350 300 R 50 50 1 1 B -X 1.03/PB0/Rxd 3 -600 250 300 R 50 50 1 1 B -X 1.04/PB1/TxD 4 -600 150 300 R 50 50 1 1 B -X 1.05/PE4 5 -600 50 300 R 50 50 1 1 B -X 1.06/PE5 6 -600 -50 300 R 50 50 1 1 B -X 1.07/PB4 7 -600 -150 300 R 50 50 1 1 B -X 1.08/PA5 8 -600 -250 300 R 50 50 1 1 B -X 1.09/PA6 9 -600 -350 300 R 50 50 1 1 B -X 1.10/PA7 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J2 -# -DEF Ti_Booster_40_J2 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J2" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 2.01/GND 1 -600 450 300 R 50 50 1 1 W -X 2.02/PB2 2 -600 350 300 R 50 50 1 1 B -X 2.03/PE0 3 -600 250 300 R 50 50 1 1 B -X 2.04/PF0 4 -600 150 300 R 50 50 1 1 B -X 2.05/RESET 5 -600 50 300 R 50 50 1 1 B -X 2.06/PB7 6 -600 -50 300 R 50 50 1 1 B -X 2.07/PB6 7 -600 -150 300 R 50 50 1 1 B -X 2.08/PA4 8 -600 -250 300 R 50 50 1 1 B -X 2.09/PA3 9 -600 -350 300 R 50 50 1 1 B -X 2.10/PA2 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J3 -# -DEF Ti_Booster_40_J3 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J3" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 3.01/+5V 1 -600 450 300 R 50 50 1 1 W -X 3.02/GND 2 -600 350 300 R 50 50 1 1 B -X 3.03/PD0 3 -600 250 300 R 50 50 1 1 B -X 3.04/PD1 4 -600 150 300 R 50 50 1 1 B -X 3.05/PD2 5 -600 50 300 R 50 50 1 1 B -X 3.06/PD3 6 -600 -50 300 R 50 50 1 1 B -X 3.07/PE1 7 -600 -150 300 R 50 50 1 1 B -X 3.08/PE2 8 -600 -250 300 R 50 50 1 1 B -X 3.09/PE3 9 -600 -350 300 R 50 50 1 1 B -X 3.10/PF1 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# Ti_Booster_40_J4 -# -DEF Ti_Booster_40_J4 J 0 40 Y Y 1 F N -F0 "J" -50 650 60 H V C CNN -F1 "Ti_Booster_40_J4" 0 -650 60 H V C CNN -DRAW -S -300 550 400 -550 0 1 0 N -X 4.01/PF2 1 -600 450 300 R 50 50 1 1 W -X 4.02/PF3 2 -600 350 300 R 50 50 1 1 B -X 4.03/PB3 3 -600 250 300 R 50 50 1 1 B -X 4.04/PC4 4 -600 150 300 R 50 50 1 1 B -X 4.05/PC5 5 -600 50 300 R 50 50 1 1 B -X 4.06/PC6 6 -600 -50 300 R 50 50 1 1 B -X 4.07/PC7 7 -600 -150 300 R 50 50 1 1 B -X 4.08/PD6 8 -600 -250 300 R 50 50 1 1 B -X 4.09/PD7 9 -600 -350 300 R 50 50 1 1 B -X 4.10/PF4 10 -600 -450 300 R 50 50 1 1 B -ENDDRAW -ENDDEF -# -# VCC -# -DEF VCC #PWR 0 0 Y Y 1 F P -F0 "#PWR" 0 100 30 H I C CNN -F1 "VCC" 0 100 30 H V C CNN -DRAW -X VCC 1 0 0 0 U 20 20 0 0 W N -C 0 50 20 0 1 0 N -P 3 0 1 0 0 0 0 30 0 30 N -ENDDRAW -ENDDEF -# -#End Library diff --git a/template/ti-stellaris-boosterpack40_min/boosterpack40_min.cmp b/template/ti-stellaris-boosterpack40_min/boosterpack40_min.cmp deleted file mode 100644 index eab4a19bd3..0000000000 --- a/template/ti-stellaris-boosterpack40_min/boosterpack40_min.cmp +++ /dev/null @@ -1,38 +0,0 @@ -Cmp-Mod V01 Created by CvPcb (2011-nov-30)-testing date = Thu 18 Oct 2012 09:58:43 PM PDT - -BeginCmp -TimeStamp = /5080DB5C; -Reference = J1; -ValeurCmp = TI_BOOSTER_40_J1; -IdModule = SIL-10; -EndCmp - -BeginCmp -TimeStamp = /5080DBF4; -Reference = J2; -ValeurCmp = TI_BOOSTER_40_J2; -IdModule = SIL-10; -EndCmp - -BeginCmp -TimeStamp = /5080DC03; -Reference = J3; -ValeurCmp = TI_BOOSTER_40_J3; -IdModule = SIL-10; -EndCmp - -BeginCmp -TimeStamp = /5080DC12; -Reference = J4; -ValeurCmp = TI_BOOSTER_40_J4; -IdModule = SIL-10; -EndCmp - -BeginCmp -TimeStamp = /5080A33C; -Reference = J5; -ValeurCmp = CONN_3; -IdModule = SIL-3; -EndCmp - -EndListe diff --git a/template/ti-stellaris-boosterpack40_min/boosterpack40_min.kicad_pcb b/template/ti-stellaris-boosterpack40_min/boosterpack40_min.kicad_pcb deleted file mode 100644 index 2ad6d40269..0000000000 --- a/template/ti-stellaris-boosterpack40_min/boosterpack40_min.kicad_pcb +++ /dev/null @@ -1,344 +0,0 @@ -(kicad_pcb (version 3) (host pcbnew "(2013-02-23 BZR 3971)-testing") - - (general - (links 1) - (no_connects 1) - (area 172.984525 104.605002 242.305477 149.137511) - (thickness 1.6) - (drawings 7) - (tracks 0) - (zones 0) - (modules 4) - (nets 4) - ) - - (page A3) - (layers - (15 Front signal) - (0 Back signal) - (16 Dessous.Adhes user) - (17 Dessus.Adhes user) - (18 Dessous.Pate user) - (19 Dessus.Pate user) - (20 Dessous.SilkS user) - (21 Dessus.SilkS user) - (22 Dessous.Masque user) - (23 Dessus.Masque user) - (24 Dessin.User user) - (25 Cmts.User user) - (26 Eco1.User user) - (27 Eco2.User user) - (28 Contours.Ci user) - ) - - (setup - (last_trace_width 0.254) - (trace_clearance 0.254) - (zone_clearance 0.508) - (zone_45_only no) - (trace_min 0.254) - (segment_width 0.20066) - (edge_width 0.14986) - (via_size 0.889) - (via_drill 0.635) - (via_min_size 0.889) - (via_min_drill 0.508) - (uvia_size 0.508) - (uvia_drill 0.127) - (uvias_allowed no) - (uvia_min_size 0.508) - (uvia_min_drill 0.127) - (pcb_text_width 0.3) - (pcb_text_size 1 1) - (mod_edge_width 0.14986) - (mod_text_size 1 1) - (mod_text_width 0.15) - (pad_size 1 1) - (pad_drill 0.6) - (pad_to_mask_clearance 0) - (aux_axis_origin 0 0) - (visible_elements 7FFFFFFF) - (pcbplotparams - (layerselection 3178497) - (usegerberextensions true) - (excludeedgelayer true) - (linewidth 152400) - (plotframeref false) - (viasonmask false) - (mode 1) - (useauxorigin false) - (hpglpennumber 1) - (hpglpenspeed 20) - (hpglpendiameter 15) - (hpglpenoverlay 2) - (psnegative false) - (psa4output false) - (plotreference true) - (plotvalue true) - (plotothertext true) - (plotinvisibletext false) - (padsonsilk false) - (subtractmaskfromsilk false) - (outputformat 1) - (mirror false) - (drillshape 1) - (scaleselection 1) - (outputdirectory "")) - ) - - (net 0 "") - (net 1 +5V) - (net 2 GND) - (net 3 VCC) - - (net_class Default "This is the default net class." - (clearance 0.254) - (trace_width 0.254) - (via_dia 0.889) - (via_drill 0.635) - (uvia_dia 0.508) - (uvia_drill 0.127) - (add_net "") - (add_net +5V) - (add_net GND) - (add_net VCC) - ) - - (module SIL-10 (layer Front) (tedit 5080DEE6) (tstamp 5080DE37) - (at 231.14 133.35 270) - (descr "Connecteur 10 pins") - (tags "CONN DEV") - (path /5080DBF4) - (fp_text reference J2 (at -13.97 0 360) (layer Dessus.SilkS) - (effects (font (size 1.72974 1.08712) (thickness 0.3048))) - ) - (fp_text value TI_BOOSTER_40_J2 (at 6.35 -2.54 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.3048))) - ) - (fp_line (start -12.7 1.27) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -12.7 -1.27) (end 12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 -1.27) (end 12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -10.16 1.27) (end -10.16 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 GND) - ) - (pad 2 thru_hole circle (at -8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 3 thru_hole circle (at -6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole circle (at -1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole circle (at 6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 9 thru_hole circle (at 8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole circle (at 11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (module SIL-10 (layer Front) (tedit 5080DEED) (tstamp 5080DE4A) - (at 228.6 133.35 270) - (descr "Connecteur 10 pins") - (tags "CONN DEV") - (path /5080DC12) - (fp_text reference J4 (at -13.97 0 360) (layer Dessus.SilkS) - (effects (font (size 1.72974 1.08712) (thickness 0.3048))) - ) - (fp_text value TI_BOOSTER_40_J4 (at 6.35 -2.54 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.3048))) - ) - (fp_line (start -12.7 1.27) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -12.7 -1.27) (end 12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 -1.27) (end 12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -10.16 1.27) (end -10.16 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 2 thru_hole circle (at -8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 3 thru_hole circle (at -6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole circle (at -1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole circle (at 6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 9 thru_hole circle (at 8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole circle (at 11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (module SIL-10 (layer Front) (tedit 5080DEE0) (tstamp 5080AB71) - (at 187.96 133.35 270) - (descr "Connecteur 10 pins") - (tags "CONN DEV") - (path /5080DC03) - (fp_text reference J3 (at -13.97 0 360) (layer Dessus.SilkS) - (effects (font (size 1.72974 1.08712) (thickness 0.3048))) - ) - (fp_text value TI_BOOSTER_40_J3 (at 6.35 -2.54 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.3048))) - ) - (fp_line (start -12.7 1.27) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -12.7 -1.27) (end 12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 -1.27) (end 12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -10.16 1.27) (end -10.16 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 1 +5V) - ) - (pad 2 thru_hole circle (at -8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 2 GND) - ) - (pad 3 thru_hole circle (at -6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole circle (at -1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole circle (at 6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 9 thru_hole circle (at 8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole circle (at 11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (module SIL-10 (layer Front) (tedit 5080DEDC) (tstamp 5080AB8D) - (at 185.42 133.35 270) - (descr "Connecteur 10 pins") - (tags "CONN DEV") - (path /5080DB5C) - (fp_text reference J1 (at -13.97 0 360) (layer Dessus.SilkS) - (effects (font (size 1.72974 1.08712) (thickness 0.3048))) - ) - (fp_text value TI_BOOSTER_40_J1 (at 6.35 -2.54 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.016) (thickness 0.3048))) - ) - (fp_line (start -12.7 1.27) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -12.7 -1.27) (end 12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 -1.27) (end 12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -10.16 1.27) (end -10.16 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (pad 1 thru_hole rect (at -11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - (net 3 VCC) - ) - (pad 2 thru_hole circle (at -8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 3 thru_hole circle (at -6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 4 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 5 thru_hole circle (at -1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 6 thru_hole circle (at 1.27 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 7 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 8 thru_hole circle (at 6.35 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 9 thru_hole circle (at 8.89 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - (pad 10 thru_hole circle (at 11.43 0 270) (size 1.397 1.397) (drill 0.8128) - (layers *.Cu *.Mask Dessus.SilkS) - ) - ) - - (dimension 34.29 (width 0.25) (layer Dessin.User) - (gr_text "1.3500 in" (at 176.800001 130.175 270) (layer Dessin.User) - (effects (font (size 1 1) (thickness 0.25))) - ) - (feature1 (pts (xy 182.88 147.32) (xy 175.800001 147.32))) - (feature2 (pts (xy 182.88 113.03) (xy 175.800001 113.03))) - (crossbar (pts (xy 177.800001 113.03) (xy 177.800001 147.32))) - (arrow1a (pts (xy 177.800001 147.32) (xy 177.213581 146.193497))) - (arrow1b (pts (xy 177.800001 147.32) (xy 178.386421 146.193497))) - (arrow2a (pts (xy 177.800001 113.03) (xy 177.213581 114.156503))) - (arrow2b (pts (xy 177.800001 113.03) (xy 178.386421 114.156503))) - ) - (dimension 8.89 (width 0.25) (layer Dessin.User) - (gr_text "0.3500 in" (at 238.49 117.475 90) (layer Dessin.User) - (effects (font (size 1 1) (thickness 0.25))) - ) - (feature1 (pts (xy 231.14 113.03) (xy 239.49 113.03))) - (feature2 (pts (xy 231.14 121.92) (xy 239.49 121.92))) - (crossbar (pts (xy 237.49 121.92) (xy 237.49 113.03))) - (arrow1a (pts (xy 237.49 113.03) (xy 238.07642 114.156503))) - (arrow1b (pts (xy 237.49 113.03) (xy 236.90358 114.156503))) - (arrow2a (pts (xy 237.49 121.92) (xy 238.07642 120.793497))) - (arrow2b (pts (xy 237.49 121.92) (xy 236.90358 120.793497))) - ) - (gr_line (start 233.68 147.32) (end 182.88 147.32) (angle 90) (layer Contours.Ci) (width 0.15)) - (dimension 50.8 (width 0.25) (layer Dessin.User) - (gr_text "2.0000 in" (at 208.28 105.680002) (layer Dessin.User) - (effects (font (size 1 1) (thickness 0.25))) - ) - (feature1 (pts (xy 233.68 113.03) (xy 233.68 104.680002))) - (feature2 (pts (xy 182.88 113.03) (xy 182.88 104.680002))) - (crossbar (pts (xy 182.88 106.680002) (xy 233.68 106.680002))) - (arrow1a (pts (xy 233.68 106.680002) (xy 232.553497 107.266422))) - (arrow1b (pts (xy 233.68 106.680002) (xy 232.553497 106.093582))) - (arrow2a (pts (xy 182.88 106.680002) (xy 184.006503 107.266422))) - (arrow2b (pts (xy 182.88 106.680002) (xy 184.006503 106.093582))) - ) - (gr_line (start 182.88 147.32) (end 182.88 113.03) (angle 90) (layer Contours.Ci) (width 0.14986)) - (gr_line (start 233.68 113.03) (end 233.68 147.32) (angle 90) (layer Contours.Ci) (width 0.14986)) - (gr_line (start 182.88 113.03) (end 233.68 113.03) (angle 90) (layer Contours.Ci) (width 0.15)) - -) diff --git a/template/ti-stellaris-boosterpack40_min/boosterpack40_min.mod b/template/ti-stellaris-boosterpack40_min/boosterpack40_min.mod deleted file mode 100644 index f0ee628b9e..0000000000 --- a/template/ti-stellaris-boosterpack40_min/boosterpack40_min.mod +++ /dev/null @@ -1,160 +0,0 @@ -PCBNEW-LibModule-V1 Thu 18 Oct 2012 07:20:13 PM PDT -# encoding utf-8 -Units mm -$INDEX -BoosterPack_J1_J2 -$EndINDEX -$MODULE BoosterPack_J1_J2 -Po 0 0 0 15 5080B8D5 00000000 ~~ -Li BoosterPack_J1_J2 -Sc 0 -AR /5080AA0E -Op 0 0 0 -T0 0 8.89 1.524 1.524 0 0.3048 N V 21 N "J1" -T1 0 0 1.524 1.524 0 0.3048 N V 21 N "J1-J2" -DS -2.54 -3.81 48.26 -3.81 0.381 21 -DS 48.26 -3.81 48.26 26.67 0.381 21 -DS 48.26 26.67 -2.54 26.67 0.381 21 -DS -2.54 26.67 -2.54 -3.81 0.381 21 -$PAD -Sh "1" R 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 3 "VCC" -Po 0 0 -$EndPAD -$PAD -Sh "2" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 2.54 -$EndPAD -$PAD -Sh "3" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 5.08 -$EndPAD -$PAD -Sh "4" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 7.62 -$EndPAD -$PAD -Sh "5" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 10.16 -$EndPAD -$PAD -Sh "6" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 12.7 -$EndPAD -$PAD -Sh "7" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 2 "N-000002" -Po 0 15.24 -$EndPAD -$PAD -Sh "8" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 17.78 -$EndPAD -$PAD -Sh "9" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 20.32 -$EndPAD -$PAD -Sh "10" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 0 22.86 -$EndPAD -$PAD -Sh "11" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 22.86 -$EndPAD -$PAD -Sh "12" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 20.32 -$EndPAD -$PAD -Sh "13" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 17.78 -$EndPAD -$PAD -Sh "14" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 15.24 -$EndPAD -$PAD -Sh "15" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 12.7 -$EndPAD -$PAD -Sh "16" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 10.16 -$EndPAD -$PAD -Sh "17" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 7.62 -$EndPAD -$PAD -Sh "18" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 5.08 -$EndPAD -$PAD -Sh "19" C 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 0 "" -Po 45.72 2.54 -$EndPAD -$PAD -Sh "20" R 1.524 1.524 0 0 0 -Dr 1.016 0 0 -At STD N 00E0FFFF -Ne 1 "GND" -Po 45.72 0 -$EndPAD -$EndMODULE BoosterPack_J1_J2 -$EndLIBRARY diff --git a/template/ti-stellaris-boosterpack40_min/boosterpack40_min.net b/template/ti-stellaris-boosterpack40_min/boosterpack40_min.net deleted file mode 100644 index cdd85cc3b9..0000000000 --- a/template/ti-stellaris-boosterpack40_min/boosterpack40_min.net +++ /dev/null @@ -1,58 +0,0 @@ -# EESchema Netlist Version 1.1 created Thu 18 Oct 2012 10:10:38 PM PDT -( - ( /5080DB5C $noname J1 TI_BOOSTER_40_J1 {Lib=TI_BOOSTER_40_J1} - ( 1 VCC ) - ( 2 ? ) - ( 3 ? ) - ( 4 ? ) - ( 5 ? ) - ( 6 ? ) - ( 7 ? ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ) - ( /5080DBF4 $noname J2 TI_BOOSTER_40_J2 {Lib=TI_BOOSTER_40_J2} - ( 1 GND ) - ( 2 ? ) - ( 3 ? ) - ( 4 ? ) - ( 5 ? ) - ( 6 ? ) - ( 7 ? ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ) - ( /5080DC03 $noname J3 TI_BOOSTER_40_J3 {Lib=TI_BOOSTER_40_J3} - ( 1 +5V ) - ( 2 GND ) - ( 3 ? ) - ( 4 ? ) - ( 5 ? ) - ( 6 ? ) - ( 7 ? ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ) - ( /5080DC12 $noname J4 TI_BOOSTER_40_J4 {Lib=TI_BOOSTER_40_J4} - ( 1 ? ) - ( 2 ? ) - ( 3 ? ) - ( 4 ? ) - ( 5 ? ) - ( 6 ? ) - ( 7 ? ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ) -) -* -{ Pin List by Nets -Net 2 "GND" "GND" - J3 2 - J2 1 -} -#End diff --git a/template/ti-stellaris-boosterpack40_min/boosterpack40_min.pro b/template/ti-stellaris-boosterpack40_min/boosterpack40_min.pro deleted file mode 100644 index 1800b36895..0000000000 --- a/template/ti-stellaris-boosterpack40_min/boosterpack40_min.pro +++ /dev/null @@ -1,80 +0,0 @@ -update=Thu 18 Oct 2012 10:08:50 PM PDT -version=1 -last_client=kicad -[eeschema] -version=1 -LibDir= -NetFmtName= -RptD_X=0 -RptD_Y=100 -RptLab=1 -LabSize=60 -[eeschema/libraries] -LibName1=BoosterPack -LibName2=power -LibName3=device -LibName4=transistors -LibName5=conn -LibName6=linear -LibName7=regul -LibName8=74xx -LibName9=cmos4000 -LibName10=adc-dac -LibName11=memory -LibName12=xilinx -LibName13=special -LibName14=microcontrollers -LibName15=dsp -LibName16=microchip -LibName17=analog_switches -LibName18=motorola -LibName19=texas -LibName20=intel -LibName21=audio -LibName22=interface -LibName23=digital-audio -LibName24=philips -LibName25=display -LibName26=cypress -LibName27=siliconi -LibName28=opto -LibName29=atmel -LibName30=contrib -LibName31=valves -[cvpcb] -version=1 -NetIExt=net -[cvpcb/libraries] -EquName1=devcms -[pcbnew] -version=1 -LastNetListRead=BoosterPack20.net -PadDrill=1.016 -PadSizeH=1.524 -PadSizeV=1.524 -PcbTextSizeV=1 -PcbTextSizeH=1 -PcbTextThickness=0.3 -ModuleTextSizeV=1 -ModuleTextSizeH=1 -ModuleTextSizeThickness=0.15 -SolderMaskClearance=0 -DrawSegmentWidth=0.2 -BoardOutlineThickness=0.15 -ModuleOutlineThickness=0.15 -[pcbnew/libraries] -LibDir= -LibName1=BoosterPack20 -LibName2=sockets -LibName3=connect -LibName4=discret -LibName5=pin_array -LibName6=divers -LibName7=libcms -LibName8=display -LibName9=led -LibName10=dip_sockets -LibName11=pga_sockets -LibName12=valves -[general] -version=1 diff --git a/template/ti-stellaris-boosterpack40_min/boosterpack40_min.sch b/template/ti-stellaris-boosterpack40_min/boosterpack40_min.sch deleted file mode 100644 index 6c74c6cbe1..0000000000 --- a/template/ti-stellaris-boosterpack40_min/boosterpack40_min.sch +++ /dev/null @@ -1,120 +0,0 @@ -EESchema Schematic File Version 2 date Thu 18 Oct 2012 10:11:13 PM PDT -LIBS:BoosterPack -LIBS:power -LIBS:device -LIBS:transistors -LIBS:conn -LIBS:linear -LIBS:regul -LIBS:74xx -LIBS:cmos4000 -LIBS:adc-dac -LIBS:memory -LIBS:xilinx -LIBS:special -LIBS:microcontrollers -LIBS:dsp -LIBS:microchip -LIBS:analog_switches -LIBS:motorola -LIBS:texas -LIBS:intel -LIBS:audio -LIBS:interface -LIBS:digital-audio -LIBS:philips -LIBS:display -LIBS:cypress -LIBS:siliconi -LIBS:opto -LIBS:atmel -LIBS:contrib -LIBS:valves -LIBS:BoosterPack40_min-cache -EELAYER 27 0 -EELAYER END -$Descr A4 11693 8268 -encoding utf-8 -Sheet 1 1 -Title "" -Date "19 oct 2012" -Rev "" -Comp "" -Comment1 "" -Comment2 "" -Comment3 "" -Comment4 "" -$EndDescr -$Comp -L GND #PWR01 -U 1 1 5080AA99 -P 9150 2450 -F 0 "#PWR01" H 9150 2450 30 0001 C CNN -F 1 "GND" H 9150 2380 30 0001 C CNN - 1 9150 2450 - 0 1 1 0 -$EndComp -$Comp -L VCC #PWR02 -U 1 1 5080AA9F -P 9150 900 -F 0 "#PWR02" H 9150 1000 30 0001 C CNN -F 1 "VCC" H 9150 1000 30 0000 C CNN - 1 9150 900 - 0 -1 -1 0 -$EndComp -$Comp -L TI_BOOSTER_40_J1 J1 -U 1 1 5080DB5C -P 9750 1350 -F 0 "J1" H 9700 2000 60 0000 C CNN -F 1 "TI_BOOSTER_40_J1" H 9750 700 60 0000 C CNN - 1 9750 1350 - 1 0 0 -1 -$EndComp -$Comp -L TI_BOOSTER_40_J2 J2 -U 1 1 5080DBF4 -P 9750 2900 -F 0 "J2" H 9700 3550 60 0000 C CNN -F 1 "TI_BOOSTER_40_J2" H 9750 2250 60 0000 C CNN - 1 9750 2900 - 1 0 0 -1 -$EndComp -$Comp -L TI_BOOSTER_40_J3 J3 -U 1 1 5080DC03 -P 9750 4450 -F 0 "J3" H 9700 5100 60 0000 C CNN -F 1 "TI_BOOSTER_40_J3" H 9750 3800 60 0000 C CNN - 1 9750 4450 - 1 0 0 -1 -$EndComp -$Comp -L TI_BOOSTER_40_J4 J4 -U 1 1 5080DC12 -P 9750 6000 -F 0 "J4" H 9700 6650 60 0000 C CNN -F 1 "TI_BOOSTER_40_J4" H 9750 5350 60 0000 C CNN - 1 9750 6000 - 1 0 0 -1 -$EndComp -$Comp -L GND #PWR03 -U 1 1 5080DC79 -P 9150 4100 -F 0 "#PWR03" H 9150 4100 30 0001 C CNN -F 1 "GND" H 9150 4030 30 0001 C CNN - 1 9150 4100 - 0 1 1 0 -$EndComp -$Comp -L +5V #PWR04 -U 1 1 5080DC8B -P 9150 4000 -F 0 "#PWR04" H 9150 4090 20 0001 C CNN -F 1 "+5V" H 9150 4090 30 0000 C CNN - 1 9150 4000 - 0 -1 -1 0 -$EndComp -$EndSCHEMATC diff --git a/template/ti-stellaris-boosterpack40_min/meta/icon.png b/template/ti-stellaris-boosterpack40_min/meta/icon.png deleted file mode 100644 index d0bafd18c4..0000000000 Binary files a/template/ti-stellaris-boosterpack40_min/meta/icon.png and /dev/null differ diff --git a/template/ti-stellaris-boosterpack40_min/meta/info.html b/template/ti-stellaris-boosterpack40_min/meta/info.html deleted file mode 100644 index a7e860cf3e..0000000000 --- a/template/ti-stellaris-boosterpack40_min/meta/info.html +++ /dev/null @@ -1,22 +0,0 @@ - - -Ti Launchpad XL - Expansion Board - - -

Launchpad XL

-

Expansion Board

-This project template is the basis of an expansion board for the -TI Launchpad -board. -

-This Board conforms to the 40 pin Launchpad Standard, using the minimum size. -

-The board outline looks like the following: -
-40 Pin Launchpad -
-(c)2012 Brian Sidebotham
-(c)2012 Henry von Tresckow
-(c)2012 Kicad Developers
- - diff --git a/template/ti-stellaris-boosterpack40_min/meta/launchpad_standard40.png b/template/ti-stellaris-boosterpack40_min/meta/launchpad_standard40.png deleted file mode 100644 index c91907351e..0000000000 Binary files a/template/ti-stellaris-boosterpack40_min/meta/launchpad_standard40.png and /dev/null differ