diff --git a/common/dialogs/dialog_unit_entry.cpp b/common/dialogs/dialog_unit_entry.cpp index a2e56ffc83..7dd88326bf 100644 --- a/common/dialogs/dialog_unit_entry.cpp +++ b/common/dialogs/dialog_unit_entry.cpp @@ -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 ) { diff --git a/include/dialogs/dialog_unit_entry.h b/include/dialogs/dialog_unit_entry.h index 6afe86f310..8020f42412 100644 --- a/include/dialogs/dialog_unit_entry.h +++ b/include/dialogs/dialog_unit_entry.h @@ -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 diff --git a/pcbnew/router/length_tuner_tool.cpp b/pcbnew/router/length_tuner_tool.cpp index b936b34be4..6940a28655 100644 --- a/pcbnew/router/length_tuner_tool.cpp +++ b/pcbnew/router/length_tuner_tool.cpp @@ -29,6 +29,7 @@ #include #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( 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& drcEngine = bds.m_DRCEngine; DRC_CONSTRAINT constraint; diff --git a/pcbnew/router/pns_meander_skew_placer.cpp b/pcbnew/router/pns_meander_skew_placer.cpp index 0e8c25a15c..e2354d8109 100644 --- a/pcbnew/router/pns_meander_skew_placer.cpp +++ b/pcbnew/router/pns_meander_skew_placer.cpp @@ -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; } diff --git a/pcbnew/router/pns_meander_skew_placer.h b/pcbnew/router/pns_meander_skew_placer.h index 1e0e213c2b..0962976bc9 100644 --- a/pcbnew/router/pns_meander_skew_placer.h +++ b/pcbnew/router/pns_meander_skew_placer.h @@ -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;