Fix a minor compatibility issue in .pro file for new boards, between decimils and nanometers versions of Pcbnew.
This commit is contained in:
parent
0e1e7f53b1
commit
f03b9048fe
|
@ -463,6 +463,53 @@ void PARAM_CFG_INT::SaveParam( wxConfigBase* aConfig ) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE( const wxChar* ident, int* ptparam,
|
||||||
|
int default_val, int min, int max,
|
||||||
|
const wxChar* group, double aBiu2cfgunit ) :
|
||||||
|
PARAM_CFG_INT( ident, ptparam, default_val, min, max, group )
|
||||||
|
{
|
||||||
|
m_Type = PARAM_INT_WITH_SCALE;
|
||||||
|
m_BIU_to_cfgunit = aBiu2cfgunit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE( bool Insetup,
|
||||||
|
const wxChar* ident, int* ptparam,
|
||||||
|
int default_val, int min, int max,
|
||||||
|
const wxChar* group, double aBiu2cfgunit ) :
|
||||||
|
PARAM_CFG_INT( Insetup, ident, ptparam, default_val, min, max, group )
|
||||||
|
{
|
||||||
|
m_Type = PARAM_INT_WITH_SCALE;
|
||||||
|
m_BIU_to_cfgunit = aBiu2cfgunit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PARAM_CFG_INT_WITH_SCALE::ReadParam( wxConfigBase* aConfig ) const
|
||||||
|
{
|
||||||
|
if( m_Pt_param == NULL || aConfig == NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
|
double default_value = m_Default * m_BIU_to_cfgunit;
|
||||||
|
double dtmp = aConfig->Read( m_Ident, default_value );
|
||||||
|
|
||||||
|
int itmp = KiROUND( dtmp / m_BIU_to_cfgunit );
|
||||||
|
|
||||||
|
if( (itmp < m_Min) || (itmp > m_Max) )
|
||||||
|
itmp = m_Default;
|
||||||
|
|
||||||
|
*m_Pt_param = itmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PARAM_CFG_INT_WITH_SCALE::SaveParam( wxConfigBase* aConfig ) const
|
||||||
|
{
|
||||||
|
if( m_Pt_param == NULL || aConfig == NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
|
aConfig->Write( m_Ident, *m_Pt_param * m_BIU_to_cfgunit );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PARAM_CFG_SETCOLOR::PARAM_CFG_SETCOLOR( const wxChar* ident, EDA_COLOR_T* ptparam,
|
PARAM_CFG_SETCOLOR::PARAM_CFG_SETCOLOR( const wxChar* ident, EDA_COLOR_T* ptparam,
|
||||||
EDA_COLOR_T default_val,
|
EDA_COLOR_T default_val,
|
||||||
const wxChar* group ) :
|
const wxChar* group ) :
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
/** Type of parameter in the configuration file */
|
/** Type of parameter in the configuration file */
|
||||||
enum paramcfg_id {
|
enum paramcfg_id {
|
||||||
PARAM_INT,
|
PARAM_INT,
|
||||||
|
PARAM_INT_WITH_SCALE,
|
||||||
PARAM_SETCOLOR,
|
PARAM_SETCOLOR,
|
||||||
PARAM_DOUBLE,
|
PARAM_DOUBLE,
|
||||||
PARAM_BOOL,
|
PARAM_BOOL,
|
||||||
|
@ -92,6 +93,36 @@ public:
|
||||||
virtual void SaveParam( wxConfigBase* aConfig ) const;
|
virtual void SaveParam( wxConfigBase* aConfig ) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration parameter - Integer Class
|
||||||
|
* with unit conversion.
|
||||||
|
* Mainly used to store an integer value in millimeters (or inches)
|
||||||
|
* and retrieve it in internal units
|
||||||
|
* the stored value is a floating number
|
||||||
|
*/
|
||||||
|
class PARAM_CFG_INT_WITH_SCALE : public PARAM_CFG_INT
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
double m_BIU_to_cfgunit; ///< the factor to convert the saved value in internal value
|
||||||
|
|
||||||
|
public:
|
||||||
|
PARAM_CFG_INT_WITH_SCALE( const wxChar* ident, int* ptparam,
|
||||||
|
int default_val = 0,
|
||||||
|
int min = std::numeric_limits<int>::min(),
|
||||||
|
int max = std::numeric_limits<int>::max(),
|
||||||
|
const wxChar* group = NULL,
|
||||||
|
double aBiu2cfgunit = 1.0);
|
||||||
|
PARAM_CFG_INT_WITH_SCALE( bool Insetup, const wxChar* ident, int* ptparam,
|
||||||
|
int default_val = 0,
|
||||||
|
int min = std::numeric_limits<int>::min(),
|
||||||
|
int max = std::numeric_limits<int>::max(),
|
||||||
|
const wxChar* group = NULL,
|
||||||
|
double aBiu2cfgunit = 1.0 );
|
||||||
|
|
||||||
|
virtual void ReadParam( wxConfigBase* aConfig ) const;
|
||||||
|
virtual void SaveParam( wxConfigBase* aConfig ) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration parameter - SetColor Class
|
* Configuration parameter - SetColor Class
|
||||||
|
|
|
@ -11,8 +11,20 @@
|
||||||
#include <class_board_design_settings.h>
|
#include <class_board_design_settings.h>
|
||||||
|
|
||||||
#include <class_track.h>
|
#include <class_track.h>
|
||||||
|
#include <convert_from_iu.h>
|
||||||
|
|
||||||
#define DEFAULT_BOARD_THICKNESS_DMILS 620
|
// Board thickness, mainly for 3D view:
|
||||||
|
#define DEFAULT_BOARD_THICKNESS_MM 1.6
|
||||||
|
|
||||||
|
// Default values for some board items
|
||||||
|
#define DEFAULT_TEXT_PCB_SIZE Millimeter2iu( 1.5 )
|
||||||
|
#define DEFAULT_TEXT_PCB_THICKNESS Millimeter2iu( 0.3 )
|
||||||
|
#define DEFAULT_PCB_EDGE_THICKNESS Millimeter2iu( 0.15 )
|
||||||
|
#define DEFAULT_GRAPHIC_THICKNESS Millimeter2iu( 0.2 )
|
||||||
|
#define DEFAULT_TEXT_MODULE_SIZE Millimeter2iu( 1.5 )
|
||||||
|
#define DEFAULT_GR_MODULE_THICKNESS Millimeter2iu( 0.15 )
|
||||||
|
|
||||||
|
#define DEFAULT_SOLDERMASK_CLEARANCE Millimeter2iu( 0.1 )
|
||||||
|
|
||||||
|
|
||||||
BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
|
BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
|
||||||
|
@ -36,13 +48,13 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
|
||||||
|
|
||||||
m_MicroViasAllowed = false; // true to allow micro vias
|
m_MicroViasAllowed = false; // true to allow micro vias
|
||||||
|
|
||||||
m_DrawSegmentWidth = DMils2iu( 100 ); // current graphic line width (not EDGE layer)
|
m_DrawSegmentWidth = DEFAULT_GRAPHIC_THICKNESS; // current graphic line width (not EDGE layer)
|
||||||
|
|
||||||
m_EdgeSegmentWidth = DMils2iu( 100 ); // current graphic line width (EDGE layer only)
|
m_EdgeSegmentWidth = DEFAULT_PCB_EDGE_THICKNESS; // current graphic line width (EDGE layer only)
|
||||||
m_PcbTextWidth = DMils2iu( 100 ); // current Pcb (not module) Text width
|
m_PcbTextWidth = DEFAULT_TEXT_PCB_THICKNESS; // current Pcb (not module) Text width
|
||||||
|
|
||||||
m_PcbTextSize = wxSize( DMils2iu( 500 ), DMils2iu( 500 ) );
|
m_PcbTextSize = wxSize( DEFAULT_TEXT_PCB_SIZE,
|
||||||
// current Pcb (not module) Text size
|
DEFAULT_TEXT_PCB_SIZE ); // current Pcb (not module) Text size
|
||||||
|
|
||||||
m_TrackMinWidth = DMils2iu( 100 ); // track min value for width ((min copper size value
|
m_TrackMinWidth = DMils2iu( 100 ); // track min value for width ((min copper size value
|
||||||
m_ViasMinSize = DMils2iu( 350 ); // vias (not micro vias) min diameter
|
m_ViasMinSize = DMils2iu( 350 ); // vias (not micro vias) min diameter
|
||||||
|
@ -51,57 +63,80 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS() :
|
||||||
m_MicroViasMinDrill = DMils2iu( 50 ); // micro vias (not vias) min drill diameter
|
m_MicroViasMinDrill = DMils2iu( 50 ); // micro vias (not vias) min drill diameter
|
||||||
|
|
||||||
// Global mask margins:
|
// Global mask margins:
|
||||||
m_SolderMaskMargin = DMils2iu( 150 ); // Solder mask margin
|
m_SolderMaskMargin = DEFAULT_SOLDERMASK_CLEARANCE; // Solder mask margin
|
||||||
m_SolderPasteMargin = 0; // Solder paste margin absolute value
|
m_SolderPasteMargin = 0; // Solder paste margin absolute value
|
||||||
m_SolderPasteMarginRatio = 0.0; // Solder pask margin ratio value of pad size
|
m_SolderPasteMarginRatio = 0.0; // Solder pask margin ratio value of pad size
|
||||||
// The final margin is the sum of these 2 values
|
// The final margin is the sum of these 2 values
|
||||||
// Usually < 0 because the mask is smaller than pad
|
// Usually < 0 because the mask is smaller than pad
|
||||||
|
|
||||||
m_ModuleTextSize = wxSize( DMils2iu( 500 ), DMils2iu( 500 ) );
|
m_ModuleTextSize = wxSize( DEFAULT_TEXT_MODULE_SIZE,
|
||||||
m_ModuleTextWidth = DMils2iu( 100 );
|
DEFAULT_TEXT_MODULE_SIZE );
|
||||||
m_ModuleSegmentWidth = DMils2iu( 100 );
|
m_ModuleTextWidth = DEFAULT_GR_MODULE_THICKNESS;
|
||||||
|
m_ModuleSegmentWidth = DEFAULT_GR_MODULE_THICKNESS;
|
||||||
|
|
||||||
// Layer thickness for 3D viewer
|
// Layer thickness for 3D viewer
|
||||||
m_boardThickness = DMils2iu( DEFAULT_BOARD_THICKNESS_DMILS );
|
m_boardThickness = Millimeter2iu( DEFAULT_BOARD_THICKNESS_MM );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add parameters to save in project config.
|
||||||
|
// values are saved in mm
|
||||||
void BOARD_DESIGN_SETTINGS::AppendConfigs( PARAM_CFG_ARRAY* aResult )
|
void BOARD_DESIGN_SETTINGS::AppendConfigs( PARAM_CFG_ARRAY* aResult )
|
||||||
{
|
{
|
||||||
m_Pad_Master.AppendConfigs( aResult );
|
m_Pad_Master.AppendConfigs( aResult );
|
||||||
|
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "BoardThickness" ), &m_boardThickness,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "PcbTextSizeV" ),
|
||||||
DMils2iu( DEFAULT_BOARD_THICKNESS_DMILS ), 0, 0xFFFF ) );
|
&m_PcbTextSize.y,
|
||||||
|
DEFAULT_TEXT_PCB_SIZE, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
|
||||||
|
NULL, MM_PER_IU ) );
|
||||||
|
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "TxtPcbV" ), &m_PcbTextSize.y,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "PcbTextSizeH" ),
|
||||||
DMils2iu( 600 ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) );
|
&m_PcbTextSize.x,
|
||||||
|
DEFAULT_TEXT_PCB_SIZE, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
|
||||||
|
NULL, MM_PER_IU ) );
|
||||||
|
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "TxtPcbH" ), &m_PcbTextSize.x,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "PcbTextThickness" ),
|
||||||
DMils2iu( 600 ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) );
|
&m_PcbTextWidth,
|
||||||
|
DEFAULT_TEXT_PCB_THICKNESS,
|
||||||
|
Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
|
||||||
|
NULL, MM_PER_IU ) );
|
||||||
|
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "TxtModV" ), &m_ModuleTextSize.y,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "ModuleTextSizeV" ),
|
||||||
DMils2iu( 500 ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) );
|
&m_ModuleTextSize.y,
|
||||||
|
DEFAULT_TEXT_MODULE_SIZE, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
|
||||||
|
NULL, MM_PER_IU ) );
|
||||||
|
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "TxtModH" ), &m_ModuleTextSize.x,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "ModuleTextSizeH" ),
|
||||||
DMils2iu( 500 ), TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) );
|
&m_ModuleTextSize.x,
|
||||||
|
DEFAULT_TEXT_MODULE_SIZE, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE,
|
||||||
|
NULL, MM_PER_IU ) );
|
||||||
|
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "TxtModW" ), &m_ModuleTextWidth,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "ModuleTextSizeThickness" ),
|
||||||
DMils2iu( 100 ), 1, TEXTS_MAX_WIDTH ) );
|
&m_ModuleTextWidth,
|
||||||
|
DEFAULT_GR_MODULE_THICKNESS, 1, TEXTS_MAX_WIDTH,
|
||||||
|
NULL, MM_PER_IU ) );
|
||||||
|
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "VEgarde" ), &m_SolderMaskMargin,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "SolderMaskClearance" ),
|
||||||
DMils2iu( 100 ), 0, DMils2iu( 10000 ) ) );
|
&m_SolderMaskMargin,
|
||||||
|
DEFAULT_SOLDERMASK_CLEARANCE, 0, Millimeter2iu( 1.0 ),
|
||||||
|
NULL, MM_PER_IU ) );
|
||||||
|
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "DrawLar" ), &m_DrawSegmentWidth,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "DrawSegmentWidth" ),
|
||||||
DMils2iu( 120 ), 0, 0xFFFF ) );
|
&m_DrawSegmentWidth,
|
||||||
|
DEFAULT_GRAPHIC_THICKNESS,
|
||||||
|
Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
|
||||||
|
NULL, MM_PER_IU ) );
|
||||||
|
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "EdgeLar" ), &m_EdgeSegmentWidth,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "BoardOutlineThickness" ),
|
||||||
DMils2iu( 120 ), 0, 0xFFFF ) );
|
&m_EdgeSegmentWidth,
|
||||||
|
DEFAULT_PCB_EDGE_THICKNESS,
|
||||||
|
Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
|
||||||
|
NULL, MM_PER_IU ) );
|
||||||
|
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "TxtLar" ), &m_PcbTextWidth,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "ModuleOutlineThickness" ),
|
||||||
DMils2iu( 120 ), 0, 0xFFFF ) );
|
&m_ModuleSegmentWidth,
|
||||||
|
DEFAULT_GR_MODULE_THICKNESS,
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "MSegLar" ), &m_ModuleSegmentWidth,
|
Millimeter2iu( 0.01 ), Millimeter2iu( 5.0 ),
|
||||||
DMils2iu( 120 ), 0, 0xFFFF ) );
|
NULL, MM_PER_IU ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#include <class_board.h>
|
#include <class_board.h>
|
||||||
#include <class_module.h>
|
#include <class_module.h>
|
||||||
#include <polygon_test_point_inside.h>
|
#include <polygon_test_point_inside.h>
|
||||||
|
#include <convert_from_iu.h>
|
||||||
|
|
||||||
|
|
||||||
int D_PAD::m_PadSketchModePenSize = 0; // Pen size used to draw pads in sketch mode
|
int D_PAD::m_PadSketchModePenSize = 0; // Pen size used to draw pads in sketch mode
|
||||||
|
@ -165,14 +166,23 @@ void D_PAD::Flip( int aTranslationY )
|
||||||
|
|
||||||
void D_PAD::AppendConfigs( PARAM_CFG_ARRAY* aResult )
|
void D_PAD::AppendConfigs( PARAM_CFG_ARRAY* aResult )
|
||||||
{
|
{
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "PadDrlX" ), &m_Drill.x,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "PadDrill" ),
|
||||||
320, 0, 0x7FFF ) );
|
&m_Drill.x,
|
||||||
|
Millimeter2iu( 0.6 ),
|
||||||
|
Millimeter2iu( 0.1 ), Millimeter2iu( 10.0 ),
|
||||||
|
NULL, MM_PER_IU ) );
|
||||||
|
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "PadDimH" ), &m_Size.x,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "PadSizeH" ),
|
||||||
550, 0, 0x7FFF ) );
|
&m_Size.x,
|
||||||
|
Millimeter2iu( 1.4 ),
|
||||||
|
Millimeter2iu( 0.1 ), Millimeter2iu( 20.0 ),
|
||||||
|
NULL, MM_PER_IU ) );
|
||||||
|
|
||||||
aResult->push_back( new PARAM_CFG_INT( wxT( "PadDimV" ), &m_Size.y,
|
aResult->push_back( new PARAM_CFG_INT_WITH_SCALE( wxT( "PadSizeV" ),
|
||||||
550, 0, 0x7FFF ) );
|
&m_Size.y,
|
||||||
|
Millimeter2iu( 1.4 ),
|
||||||
|
Millimeter2iu( 0.1 ), Millimeter2iu( 20.0 ),
|
||||||
|
NULL, MM_PER_IU ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
|
@ -1,22 +1,23 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Raspberry Pi - Expansion Board</title>
|
<title>Raspberry Pi - Expansion Board</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Raspberry Pi</h1>
|
<h1>Raspberry Pi</h1>
|
||||||
<h2>Expansion Board</h2>
|
<h2>Expansion Board</h2>
|
||||||
This project template is the basis of an expansion board for the
|
This project template is the basis of an expansion board for the
|
||||||
<a href="http://www.raspberrypi.org/" target="blank">Raspberry Pi $25 ARM
|
<a href="http://www.raspberrypi.org/" target="blank">Raspberry Pi $25 ARM
|
||||||
board.</a>
|
board.</a>
|
||||||
<br><br>
|
<br><br>
|
||||||
This base project includes a PCB edge defined as the same size as the
|
This base project includes a PCB edge defined as the same size as the
|
||||||
Raspberry-Pi PCB with the connectors placed correctly to align the two boards.
|
Raspberry-Pi PCB with the connectors placed correctly to align the two boards.
|
||||||
All IO present on the Raspberry-Pi board is connected to the project through the
|
All IO present on the Raspberry-Pi board is connected to the project through the
|
||||||
0.1" expansion headers.
|
0.1" expansion headers.
|
||||||
<br><br>
|
<br><br>
|
||||||
The board outline looks like the following:
|
The board outline looks like the following:
|
||||||
<br><br>
|
<P><IMG SRC="brd.png" NAME="brd" ALIGN=LEFT WIDTH=680 HEIGHT=378 BORDER=0><BR><BR>(c)2012
|
||||||
(c)2012 Brian Sidebotham<br>
|
<br><br>
|
||||||
(c)2012 Kicad Developers<br>
|
(c)2012 Brian Sidebotham<br>
|
||||||
</body>
|
(c)2012 Kicad Developers<br>
|
||||||
</html>
|
</body>
|
||||||
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue