Default skew tuning lenght to diff between N/P, but allow override.
This commit is contained in:
parent
5793abd310
commit
35d8635a6b
|
@ -27,7 +27,7 @@
|
|||
|
||||
|
||||
WX_UNIT_ENTRY_DIALOG::WX_UNIT_ENTRY_DIALOG( EDA_DRAW_FRAME* aParent, const wxString& aCaption,
|
||||
const wxString& aLabel, int aDefaultValue ) :
|
||||
const wxString& aLabel, long long int aDefaultValue ) :
|
||||
WX_UNIT_ENTRY_DIALOG_BASE( ( wxWindow* ) aParent, wxID_ANY, aCaption ),
|
||||
m_unit_binder( aParent, m_label, m_textCtrl, m_unit_label, true )
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ class WX_UNIT_ENTRY_DIALOG : public WX_UNIT_ENTRY_DIALOG_BASE
|
|||
{
|
||||
public:
|
||||
WX_UNIT_ENTRY_DIALOG( EDA_DRAW_FRAME* aParent, const wxString& aCaption, const wxString& aLabel,
|
||||
int aDefaultValue );
|
||||
long long int aDefaultValue );
|
||||
|
||||
/**
|
||||
* Returns the value in internal units
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <board_design_settings.h>
|
||||
#include "pns_router.h"
|
||||
#include "pns_meander_placer.h" // fixme: move settings to separate header
|
||||
#include "pns_meander_skew_placer.h"
|
||||
#include "pns_tune_status_popup.h"
|
||||
|
||||
#include "length_tuner_tool.h"
|
||||
|
@ -184,8 +185,22 @@ void LENGTH_TUNER_TOOL::performTuning()
|
|||
return;
|
||||
}
|
||||
|
||||
if( m_lastTuneMode == PNS::PNS_MODE_TUNE_SINGLE
|
||||
|| m_lastTuneMode == PNS::PNS_MODE_TUNE_DIFF_PAIR )
|
||||
if( m_lastTuneMode == PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW )
|
||||
{
|
||||
PNS::MEANDER_SKEW_PLACER* skewPlacer = static_cast<PNS::MEANDER_SKEW_PLACER*>( placer );
|
||||
WX_UNIT_ENTRY_DIALOG dlg( frame(), _( "Skew Tuning" ), _( "Target skew:" ),
|
||||
skewPlacer->CurrentSkew() );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
{
|
||||
m_router->StopRouting();
|
||||
highlightNets( false );
|
||||
return;
|
||||
}
|
||||
|
||||
settings->m_targetLength = dlg.GetValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
std::shared_ptr<DRC_ENGINE>& drcEngine = bds.m_DRCEngine;
|
||||
DRC_CONSTRAINT constraint;
|
||||
|
|
|
@ -132,7 +132,7 @@ long long int MEANDER_SKEW_PLACER::origPathLength() const
|
|||
}
|
||||
|
||||
|
||||
long long int MEANDER_SKEW_PLACER::currentSkew() const
|
||||
long long int MEANDER_SKEW_PLACER::CurrentSkew() const
|
||||
{
|
||||
return m_lastLength - m_coupledLength;
|
||||
}
|
||||
|
|
|
@ -51,9 +51,9 @@ public:
|
|||
/// @copydoc MEANDER_PLACER_BASE::TuningInfo()
|
||||
const wxString TuningInfo( EDA_UNITS aUnits ) const override;
|
||||
|
||||
private:
|
||||
long long int currentSkew() const;
|
||||
long long int CurrentSkew() const;
|
||||
|
||||
private:
|
||||
long long int origPathLength() const override;
|
||||
|
||||
DIFF_PAIR m_originPair;
|
||||
|
|
Loading…
Reference in New Issue