Make footprint type check more narrow, and set default to ignore.

This commit is contained in:
Jeff Young 2022-10-02 18:19:43 +01:00
parent 27296b5043
commit adbbceacda
2 changed files with 7 additions and 11 deletions

View File

@ -180,12 +180,12 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std:
m_DRCSeverities[ DRCE_TEXT_HEIGHT ] = RPT_SEVERITY_WARNING; m_DRCSeverities[ DRCE_TEXT_HEIGHT ] = RPT_SEVERITY_WARNING;
m_DRCSeverities[ DRCE_TEXT_THICKNESS ] = RPT_SEVERITY_WARNING; m_DRCSeverities[ DRCE_TEXT_THICKNESS ] = RPT_SEVERITY_WARNING;
m_DRCSeverities[ DRCE_FOOTPRINT_TYPE_MISMATCH ] = RPT_SEVERITY_WARNING; m_DRCSeverities[ DRCE_FOOTPRINT_TYPE_MISMATCH ] = RPT_SEVERITY_IGNORE;
m_DRCSeverities[ DRCE_LIB_FOOTPRINT_ISSUES ] = RPT_SEVERITY_WARNING; m_DRCSeverities[ DRCE_LIB_FOOTPRINT_ISSUES ] = RPT_SEVERITY_WARNING;
m_DRCSeverities[ DRCE_LIB_FOOTPRINT_MISMATCH ] = RPT_SEVERITY_WARNING; m_DRCSeverities[ DRCE_LIB_FOOTPRINT_MISMATCH ] = RPT_SEVERITY_WARNING;
// TODO: Change to warning after testing m_DRCSeverities[ DRCE_CONNECTION_WIDTH ] = RPT_SEVERITY_WARNING;
m_DRCSeverities[ DRCE_CONNECTION_WIDTH ] = RPT_SEVERITY_IGNORE;
m_MaxError = ARC_HIGH_DEF; m_MaxError = ARC_HIGH_DEF;
m_ZoneKeepExternalFillets = false; m_ZoneKeepExternalFillets = false;

View File

@ -2293,12 +2293,10 @@ std::vector<PAD*> FOOTPRINT::GetNetTiePads( PAD* aPad ) const
void FOOTPRINT::CheckFootprintAttributes( const std::function<void( const wxString& )>& aErrorHandler ) void FOOTPRINT::CheckFootprintAttributes( const std::function<void( const wxString& )>& aErrorHandler )
{ {
int likelyAttr = GetLikelyAttribute(); int likelyAttr = ( GetLikelyAttribute() & ( FP_SMD | FP_THROUGH_HOLE ) );
int setAttr = ( GetAttributes() & ( FP_SMD | FP_THROUGH_HOLE ) ); int setAttr = ( GetAttributes() & ( FP_SMD | FP_THROUGH_HOLE ) );
// This is only valid if the footprint doesn't have FP_SMD and FP_THROUGH_HOLE set if( setAttr && likelyAttr && setAttr != likelyAttr )
// Which is, unfortunately, possible in theory but not in the UI (I think)
if( aErrorHandler && likelyAttr != setAttr )
{ {
wxString msg; wxString msg;
@ -2310,11 +2308,9 @@ void FOOTPRINT::CheckFootprintAttributes( const std::function<void( const wxStri
case FP_SMD: case FP_SMD:
msg.Printf( _( "(expected 'SMD'; actual '%s')" ), GetTypeName() ); msg.Printf( _( "(expected 'SMD'; actual '%s')" ), GetTypeName() );
break; break;
default:
msg.Printf( _( "(expected 'Other'; actual '%s')" ), GetTypeName() );
break;
} }
if( aErrorHandler )
(aErrorHandler)( msg ); (aErrorHandler)( msg );
} }
} }