Enable storing pin function (pin name) in pads.

This is useful in board routing.
It is plotted in pad attribute TO.P in Gerber files.
This commit is contained in:
jean-pierre charras 2020-04-02 20:11:51 +02:00
parent b59da3e4dc
commit 161b73e55b
3 changed files with 6 additions and 18 deletions

View File

@ -165,7 +165,6 @@ ADVANCED_CFG::ADVANCED_CFG()
// Init defaults - this is done in case the config doesn't exist,
// then the values will remain as set here.
m_EnableUsePadProperty = false;
m_EnableUsePinFunction = false;
m_realTimeConnectivity = true;
m_coroutineStackSize = AC_STACK::default_stack;
@ -204,9 +203,6 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::UsePadProperty,
&m_EnableUsePadProperty, false ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::UsePinFunction,
&m_EnableUsePinFunction, false ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::RealtimeConnectivity,
&m_realTimeConnectivity, false ) );

View File

@ -68,11 +68,6 @@ public:
*/
static const ADVANCED_CFG& GetCfg();
/**
* Enable pad pin function handling in pcbnew.
*/
bool m_EnableUsePinFunction;
/**
* Enable pad property handling in pcbnew.
*/

View File

@ -1424,15 +1424,12 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const
StrPrintf( &output, " (net %d %s)", m_mapping->Translate( aPad->GetNetCode() ),
m_out->Quotew( aPad->GetNetname() ).c_str() );
if( ADVANCED_CFG::GetCfg().m_EnableUsePinFunction )
{
// Add pinfunction, if exists.
// Pin function is closely related to nets, so if CTL_OMIT_NETS is set,
// omit also pin function (for instance when saved from library editor)
if( !(m_ctl & CTL_OMIT_NETS) && !aPad->GetPinFunction().IsEmpty() )
StrPrintf( &output, " (pinfunction %s)",
m_out->Quotew( aPad->GetPinFunction() ).c_str() );
}
// Add pinfunction, if exists.
// Pin function is closely related to nets, so if CTL_OMIT_NETS is set,
// omit also pin function (for instance when saved from library editor)
if( !(m_ctl & CTL_OMIT_NETS) && !aPad->GetPinFunction().IsEmpty() )
StrPrintf( &output, " (pinfunction %s)",
m_out->Quotew( aPad->GetPinFunction() ).c_str() );
if( aPad->GetPadToDieLength() != 0 )
StrPrintf( &output, " (die_length %s)",