Add conductor material selection to cable calculator
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12082
This commit is contained in:
parent
5295342f42
commit
086ebe0f1d
|
@ -16,15 +16,18 @@
|
|||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <wx/choicdlg.h>
|
||||
|
||||
#include <common_data.h>
|
||||
#include <calculator_panels/panel_cable_size.h>
|
||||
#include <pcb_calculator_settings.h>
|
||||
#include <string_utils.h>
|
||||
#include <widgets/unit_selector.h>
|
||||
|
||||
extern double DoubleFromString( const wxString& TextValue );
|
||||
|
||||
#define M2_to_MM2 1000000.0
|
||||
|
||||
#define COPPER_RESISTIVITY 1.72e-8 // ohm meter
|
||||
#define VACCUM_PERMEABILITY 1.256637e-6
|
||||
#define RELATIVE_PERMEABILITY 1
|
||||
|
||||
|
@ -83,7 +86,6 @@ PANEL_CABLE_SIZE::PANEL_CABLE_SIZE( wxWindow* parent, wxWindowID id, const wxPoi
|
|||
|
||||
// Set internal state flags:
|
||||
m_updatingUI = false;
|
||||
m_updatingUI = false;
|
||||
m_updatingDiameter = false;
|
||||
m_updatingArea = false;
|
||||
m_updatingLinResistance = false;
|
||||
|
@ -99,16 +101,13 @@ PANEL_CABLE_SIZE::PANEL_CABLE_SIZE( wxWindow* parent, wxWindowID id, const wxPoi
|
|||
|
||||
// Initialize variables to a reasonable value
|
||||
// Stored in normalized units
|
||||
|
||||
m_diameter = 0.001;
|
||||
m_current = 1.0;
|
||||
m_length = 1.0;
|
||||
m_area = m_diameter * m_diameter / 4 * 3.14156;
|
||||
m_linearResistance = 0.000813269;
|
||||
m_maxFrequency = 17.4272;
|
||||
m_resistance = 0.0218997;
|
||||
m_voltageDrop = 0.0218997;
|
||||
m_dissipatedPower = 0.0218997;
|
||||
m_ampacity = 1.0;
|
||||
m_conductorMaterialResitivity = 1.72e-8; //Initialized for copper
|
||||
|
||||
updateAll( m_diameter / 2 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -129,6 +128,7 @@ void PANEL_CABLE_SIZE::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg )
|
|||
aCfg->m_cableSize.linResUnit = m_linResistanceUnit->GetSelection();
|
||||
aCfg->m_cableSize.frequencyUnit = m_frequencyUnit->GetSelection();
|
||||
aCfg->m_cableSize.lengthUnit = m_lengthUnit->GetSelection();
|
||||
aCfg->m_cableSize.conductorMaterialResitivity = m_textCtrlConductorResistivity->GetValue();
|
||||
}
|
||||
|
||||
|
||||
|
@ -138,6 +138,14 @@ void PANEL_CABLE_SIZE::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg )
|
|||
m_linResistanceUnit->SetSelection( aCfg->m_cableSize.linResUnit );
|
||||
m_frequencyUnit->SetSelection( aCfg->m_cableSize.frequencyUnit );
|
||||
m_lengthUnit->SetSelection( aCfg->m_cableSize.lengthUnit );
|
||||
m_textCtrlConductorResistivity->SetValue( aCfg->m_cableSize.conductorMaterialResitivity );
|
||||
|
||||
if( m_textCtrlConductorResistivity->IsEmpty() )
|
||||
{
|
||||
//Initialize m_textCtrl to fill UI space
|
||||
//Working variable initialized earlier
|
||||
m_textCtrlConductorResistivity->SetValue( "1.72e-8" );
|
||||
}
|
||||
}
|
||||
|
||||
void PANEL_CABLE_SIZE::OnCableSizeChange( wxCommandEvent& aEvent )
|
||||
|
@ -155,6 +163,29 @@ void PANEL_CABLE_SIZE::OnCableSizeChange( wxCommandEvent& aEvent )
|
|||
}
|
||||
}
|
||||
|
||||
void PANEL_CABLE_SIZE::OnConductorResistivityChange( wxCommandEvent& aEvent )
|
||||
{
|
||||
if( !m_updatingUI )
|
||||
{
|
||||
m_conductorMaterialResitivity =
|
||||
std::abs( DoubleFromString( m_textCtrlConductorResistivity->GetValue() ) );
|
||||
updateAll( m_diameter / 2 );
|
||||
}
|
||||
}
|
||||
|
||||
void PANEL_CABLE_SIZE::OnConductorResistivity_Button( wxCommandEvent& event )
|
||||
{
|
||||
wxArrayString list = StandardResistivityList();
|
||||
|
||||
// Shows a list of current Specific resistance list (rho) and select a value
|
||||
wxString value =
|
||||
wxGetSingleChoice( wxEmptyString, _( "Electrical Resistivity in Ohm*m" ), list )
|
||||
.BeforeFirst( ' ' );
|
||||
|
||||
if( !value.IsEmpty() )
|
||||
m_textCtrlConductorResistivity->ChangeValue( value );
|
||||
OnConductorResistivityChange( event );
|
||||
}
|
||||
|
||||
void PANEL_CABLE_SIZE::OnDiameterChange( wxCommandEvent& aEvent )
|
||||
{
|
||||
|
@ -182,8 +213,8 @@ void PANEL_CABLE_SIZE::OnLinResistanceChange( wxCommandEvent& aEvent )
|
|||
|
||||
if( m_linResistanceCtrl->GetValue().ToDouble( &value ) )
|
||||
{
|
||||
updateAll( sqrt( COPPER_RESISTIVITY / ( value * m_linResistanceUnit->GetUnitScale() )
|
||||
/ M_PI ) );
|
||||
updateAll( sqrt( m_conductorMaterialResitivity
|
||||
/ ( value * m_linResistanceUnit->GetUnitScale() ) / M_PI ) );
|
||||
m_sizeChoice->SetSelection( -1 );
|
||||
}
|
||||
m_updatingLinResistance = false;
|
||||
|
@ -217,8 +248,8 @@ void PANEL_CABLE_SIZE::OnFrequencyChange( wxCommandEvent& aEvent )
|
|||
|
||||
if( m_frequencyCtrl->GetValue().ToDouble( &value ) )
|
||||
{
|
||||
updateAll( sqrt( COPPER_RESISTIVITY / value / m_frequencyUnit->GetUnitScale() / M_PI
|
||||
/ VACCUM_PERMEABILITY / RELATIVE_PERMEABILITY ) );
|
||||
updateAll( sqrt( m_conductorMaterialResitivity / value / m_frequencyUnit->GetUnitScale()
|
||||
/ M_PI / VACCUM_PERMEABILITY / RELATIVE_PERMEABILITY ) );
|
||||
m_sizeChoice->SetSelection( -1 );
|
||||
}
|
||||
m_updatingFrequency = false;
|
||||
|
@ -288,7 +319,7 @@ void PANEL_CABLE_SIZE::OnResistanceChange( wxCommandEvent& aEvent )
|
|||
|
||||
if( m_resistanceCtrl->GetValue().ToDouble( &value ) )
|
||||
{
|
||||
updateAll( sqrt( COPPER_RESISTIVITY / value * m_length / M_PI ) );
|
||||
updateAll( sqrt( m_conductorMaterialResitivity / value * m_length / M_PI ) );
|
||||
m_sizeChoice->SetSelection( -1 );
|
||||
}
|
||||
m_updatingResistance = false;
|
||||
|
@ -307,7 +338,8 @@ void PANEL_CABLE_SIZE::OnVDropChange( wxCommandEvent& aEvent )
|
|||
{
|
||||
// in m_vDropCtrl, The value is in mV. We need it in Volt in calculations
|
||||
value /= 1000;
|
||||
updateAll( sqrt( COPPER_RESISTIVITY / value * m_length * m_current / M_PI ) );
|
||||
updateAll(
|
||||
sqrt( m_conductorMaterialResitivity / value * m_length * m_current / M_PI ) );
|
||||
m_sizeChoice->SetSelection( -1 );
|
||||
}
|
||||
m_updatingRVdrop = false;
|
||||
|
@ -326,8 +358,8 @@ void PANEL_CABLE_SIZE::OnPowerChange( wxCommandEvent& aEvent )
|
|||
{
|
||||
// m_powerCtrl shows the power in mW. we need Watts
|
||||
value /= 1000;
|
||||
updateAll(
|
||||
sqrt( COPPER_RESISTIVITY / value * m_length * m_current * m_current / M_PI ) );
|
||||
updateAll( sqrt( m_conductorMaterialResitivity / value * m_length * m_current
|
||||
* m_current / M_PI ) );
|
||||
m_sizeChoice->SetSelection( -1 );
|
||||
}
|
||||
m_updatingPower = false;
|
||||
|
@ -412,10 +444,10 @@ void PANEL_CABLE_SIZE::updateAll( double aRadius )
|
|||
// Update wire properties
|
||||
m_diameter = aRadius * 2;
|
||||
m_area = M_PI * aRadius * aRadius;
|
||||
m_linearResistance = COPPER_RESISTIVITY / m_area;
|
||||
m_linearResistance = m_conductorMaterialResitivity / m_area;
|
||||
|
||||
// max frequency is when skin depth = radius
|
||||
m_maxFrequency = COPPER_RESISTIVITY
|
||||
m_maxFrequency = m_conductorMaterialResitivity
|
||||
/ ( M_PI * aRadius * aRadius * VACCUM_PERMEABILITY * RELATIVE_PERMEABILITY );
|
||||
|
||||
// Based on the 700 circular mils per amp rule of the thumb
|
||||
|
@ -426,6 +458,7 @@ void PANEL_CABLE_SIZE::updateAll( double aRadius )
|
|||
m_resistance = m_linearResistance * m_length;
|
||||
m_voltageDrop = m_resistance * m_current;
|
||||
m_dissipatedPower = m_voltageDrop * m_current;
|
||||
|
||||
printAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -48,8 +48,9 @@ public:
|
|||
void ThemeChanged() override{};
|
||||
|
||||
void OnCableSizeChange( wxCommandEvent& aEvent ) override;
|
||||
void OnConductorResistivityChange( wxCommandEvent& aEvent ) override;
|
||||
void OnConductorResistivity_Button( wxCommandEvent& aEvent ) override;
|
||||
void OnUpdateUnit( wxCommandEvent& aEvent ) override;
|
||||
|
||||
void OnDiameterChange( wxCommandEvent& aEvent ) override;
|
||||
void OnAreaChange( wxCommandEvent& aEvent ) override;
|
||||
void OnLinResistanceChange( wxCommandEvent& aEvent ) override;
|
||||
|
@ -84,6 +85,8 @@ private:
|
|||
bool m_imperial;
|
||||
|
||||
// Stored in normalized units
|
||||
double m_button_ResistivityConductor;
|
||||
double m_conductorMaterialResitivity;
|
||||
double m_diameter;
|
||||
double m_current;
|
||||
double m_length;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -66,6 +66,25 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c
|
|||
m_staticText1641->Wrap( -1 );
|
||||
fgSizerLeft->Add( m_staticText1641, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxALL, 5 );
|
||||
|
||||
m_staticText18 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Conductor resistivity:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText18->Wrap( -1 );
|
||||
fgSizerLeft->Add( m_staticText18, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||
|
||||
wxBoxSizer* bSizerResistivity;
|
||||
bSizerResistivity = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_textCtrlConductorResistivity = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerResistivity->Add( m_textCtrlConductorResistivity, 1, wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
m_button_ResistivityConductor = new wxButton( sbSizer1->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||
bSizerResistivity->Add( m_button_ResistivityConductor, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
|
||||
fgSizerLeft->Add( bSizerResistivity, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizerLeft->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticText16411 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Linear resistance:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText16411->Wrap( -1 );
|
||||
fgSizerLeft->Add( m_staticText16411, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
|
||||
|
@ -193,6 +212,8 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c
|
|||
m_diameterCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnDiameterChange ), NULL, this );
|
||||
m_diameterUnit->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnUpdateUnit ), NULL, this );
|
||||
m_areaCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnAreaChange ), NULL, this );
|
||||
m_textCtrlConductorResistivity->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnConductorResistivityChange ), NULL, this );
|
||||
m_button_ResistivityConductor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnConductorResistivity_Button ), NULL, this );
|
||||
m_linResistanceCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnLinResistanceChange ), NULL, this );
|
||||
m_linResistanceUnit->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnUpdateUnit ), NULL, this );
|
||||
m_frequencyCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnFrequencyChange ), NULL, this );
|
||||
|
@ -213,6 +234,8 @@ PANEL_CABLE_SIZE_BASE::~PANEL_CABLE_SIZE_BASE()
|
|||
m_diameterCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnDiameterChange ), NULL, this );
|
||||
m_diameterUnit->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnUpdateUnit ), NULL, this );
|
||||
m_areaCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnAreaChange ), NULL, this );
|
||||
m_textCtrlConductorResistivity->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnConductorResistivityChange ), NULL, this );
|
||||
m_button_ResistivityConductor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnConductorResistivity_Button ), NULL, this );
|
||||
m_linResistanceCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnLinResistanceChange ), NULL, this );
|
||||
m_linResistanceUnit->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnUpdateUnit ), NULL, this );
|
||||
m_frequencyCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_CABLE_SIZE_BASE::OnFrequencyChange ), NULL, this );
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxFlexGridSizer" expanded="0">
|
||||
<object class="wxFlexGridSizer" expanded="1">
|
||||
<property name="cols">3</property>
|
||||
<property name="flexible_direction">wxBOTH</property>
|
||||
<property name="growablecols">1</property>
|
||||
|
@ -617,6 +617,227 @@
|
|||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Conductor resistivity:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText18</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerResistivity</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_textCtrlConductorResistivity</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnText">OnConductorResistivityChange</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">...</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_button_ResistivityConductor</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxBU_EXACTFIT</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnConductorResistivity_Button</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -24,6 +24,10 @@ class UNIT_SELECTOR_LINEAR_RESISTANCE;
|
|||
#include <wx/settings.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/panel.h>
|
||||
|
@ -47,6 +51,9 @@ class PANEL_CABLE_SIZE_BASE : public CALCULATOR_PANEL
|
|||
wxStaticText* m_staticText161;
|
||||
wxTextCtrl* m_areaCtrl;
|
||||
wxStaticText* m_staticText1641;
|
||||
wxStaticText* m_staticText18;
|
||||
wxTextCtrl* m_textCtrlConductorResistivity;
|
||||
wxButton* m_button_ResistivityConductor;
|
||||
wxStaticText* m_staticText16411;
|
||||
wxTextCtrl* m_linResistanceCtrl;
|
||||
UNIT_SELECTOR_LINEAR_RESISTANCE* m_linResistanceUnit;
|
||||
|
@ -77,6 +84,8 @@ class PANEL_CABLE_SIZE_BASE : public CALCULATOR_PANEL
|
|||
virtual void OnDiameterChange( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdateUnit( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnAreaChange( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnConductorResistivityChange( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnConductorResistivity_Button( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnLinResistanceChange( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnFrequencyChange( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnAmpacityChange( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
|
|
@ -83,6 +83,10 @@ PCB_CALCULATOR_SETTINGS::PCB_CALCULATOR_SETTINGS() :
|
|||
m_params.emplace_back( new PARAM<wxString>( "regulators.selected_regulator",
|
||||
&m_Regulators.selected_regulator, "" ) );
|
||||
|
||||
|
||||
m_params.emplace_back( new PARAM<wxString>( "cable_size.conductorMaterialResitivity",
|
||||
&m_cableSize.conductorMaterialResitivity, "" ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<int>( "regulators.type", &m_Regulators.type, 0 ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<int>( "regulators.last_param", &m_Regulators.last_param, 0 ) );
|
||||
|
|
|
@ -68,6 +68,7 @@ public:
|
|||
int linResUnit;
|
||||
int frequencyUnit;
|
||||
int lengthUnit;
|
||||
wxString conductorMaterialResitivity;
|
||||
};
|
||||
|
||||
struct WAVELENGTH
|
||||
|
|
Loading…
Reference in New Issue