Set DP skew meanders max length to INT32_MAX instead of 100 mm.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16860
This commit is contained in:
Alex Shvartzkop 2024-02-08 19:34:17 +03:00
parent f4cf23e5cf
commit 876449b83d
2 changed files with 4 additions and 18 deletions

View File

@ -66,9 +66,6 @@
#include <dialogs/dialog_tuning_pattern_properties.h> #include <dialogs/dialog_tuning_pattern_properties.h>
#define LENGTH_UNCONSTRAINED std::numeric_limits<int>::max()
enum LENGTH_TUNING_MODE enum LENGTH_TUNING_MODE
{ {
SINGLE, SINGLE,
@ -672,17 +669,6 @@ PCB_TUNING_PATTERN* PCB_TUNING_PATTERN::CreateNew( GENERATOR_TOOL* aTool,
else else
pattern->m_settings.SetTargetLength( constraint.GetValue() ); pattern->m_settings.SetTargetLength( constraint.GetValue() );
} }
else
{
if( aMode == DIFF_PAIR_SKEW )
{
pattern->m_settings.SetTargetSkew( 0 );
}
else
{
pattern->m_settings.SetTargetLength( LENGTH_UNCONSTRAINED );
}
}
pattern->SetFlags( IS_NEW ); pattern->SetFlags( IS_NEW );
@ -1847,7 +1833,7 @@ std::vector<EDA_ITEM*> PCB_TUNING_PATTERN::GetPreviewItems( GENERATOR_TOOL* aToo
} }
else else
{ {
if( m_settings.m_targetLength.Opt() == LENGTH_UNCONSTRAINED ) if( m_settings.m_targetLength.Opt() == PNS::MEANDER_SETTINGS::LENGTH_UNCONSTRAINED )
{ {
statusItem->ClearMinMax(); statusItem->ClearMinMax();
} }

View File

@ -66,9 +66,9 @@ enum MEANDER_SIDE
*/ */
class MEANDER_SETTINGS class MEANDER_SETTINGS
{ {
#define DEFAULT_TOLERANCE 100000
public: public:
static const long long int DEFAULT_TOLERANCE = 100000;
static const long long int LENGTH_UNCONSTRAINED = std::numeric_limits<int>::max();
MEANDER_SETTINGS() MEANDER_SETTINGS()
{ {
@ -77,7 +77,7 @@ public:
m_step = 50000; m_step = 50000;
m_lenPadToDie = 0; m_lenPadToDie = 0;
m_spacing = 600000; m_spacing = 600000;
SetTargetLength( 100000000 ); SetTargetLength( LENGTH_UNCONSTRAINED );
SetTargetSkew( 0 ); SetTargetSkew( 0 );
m_overrideCustomRules = false; m_overrideCustomRules = false;
m_cornerStyle = MEANDER_STYLE_ROUND; m_cornerStyle = MEANDER_STYLE_ROUND;