Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
1ae31edb
Commit
1ae31edb
authored
Mar 06, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gerbview: Minor fixes
parent
46f106b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
26 deletions
+41
-26
events_called_functions.cpp
gerbview/events_called_functions.cpp
+7
-2
rs274x.cpp
gerbview/rs274x.cpp
+32
-22
install.nsi
packaging/windows/nsis/install.nsi
+2
-2
No files found.
gerbview/events_called_functions.cpp
View file @
1ae31edb
...
...
@@ -261,9 +261,14 @@ void GERBVIEW_FRAME::OnShowGerberSourceFile( wxCommandEvent& event )
ExecuteFile
(
this
,
editorname
,
QuoteFullPath
(
fn
)
);
}
else
{
wxMessageBox
(
_
(
"No editor defined. Please select one"
)
);
}
}
else
{
wxString
msg
;
msg
.
Printf
(
_
(
"No file loaded on the active layer %d"
),
layer
+
1
);
wxMessageBox
(
msg
);
}
}
...
...
gerbview/rs274x.cpp
View file @
1ae31edb
...
...
@@ -153,12 +153,14 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command,
char
*&
text
)
{
int
code
;
int
xy_seq_len
;
// not used, provided but not yet in use
int
xy_
seq_char
;
int
seq_len
;
// not used, just provided
int
seq_char
;
bool
ok
=
true
;
char
line
[
GERBER_BUFZ
];
wxString
msg
;
double
fcoord
;
bool
x_fmt_known
=
false
;
bool
y_fmt_known
=
false
;
// conv_scale = scaling factor from inch to Internal Unit
double
conv_scale
=
IU_PER_MILS
*
1000
;
...
...
@@ -170,7 +172,7 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command,
switch
(
command
)
{
case
FORMAT_STATEMENT
:
xy_
seq_len
=
2
;
seq_len
=
2
;
while
(
*
text
!=
'*'
)
{
...
...
@@ -192,11 +194,6 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command,
text
++
;
break
;
case
'D'
:
// Decimal format: sometimes found, but not really documented
m_DecimalFormat
=
true
;
text
++
;
break
;
case
'A'
:
// Absolute coord
m_Relative
=
false
;
text
++
;
...
...
@@ -207,23 +204,36 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command,
text
++
;
break
;
case
'N'
:
// Sequence code (followed by the number of digits
// for the X,Y command
case
'G'
:
case
'N'
:
// Sequence code (followed by one digit: the sequence len)
// (sometimes found before the X,Y sequence)
// Obscure option
text
++
;
xy_seq_char
=
*
text
++
;
if
(
(
xy_seq_char
>=
'0'
)
&&
(
xy_seq_char
<=
'9'
)
)
xy_seq_len
=
-
'0'
;
seq_char
=
*
text
++
;
if
(
(
seq_char
>=
'0'
)
&&
(
seq_char
<=
'9'
)
)
seq_len
=
seq_char
-
'0'
;
break
;
case
'D'
:
case
'M'
:
// Sequence code (followed by one digit: the sequence len)
// (sometimes found after the X,Y sequence)
// Obscure option
code
=
*
text
++
;
if
(
(
*
text
>=
'0'
)
&&
(
*
text
<=
'9'
)
)
text
++
;
// skip the digit
else
if
(
code
==
'D'
)
// Decimal format: sometimes found, but not really documented
m_DecimalFormat
=
true
;
break
;
case
'X'
:
case
'Y'
:
// Values transmitted :2 (really xy_seq_len :
// digits
case
'Y'
:
{
code
=
*
(
text
++
);
char
ctmp
=
*
(
text
++
)
-
'0'
;
if
(
code
==
'X'
)
{
x
y_seq_len
--
;
x
_fmt_known
=
true
;
// number of digits after the decimal point (0 to 6 allowed)
m_FmtScale
.
x
=
*
text
-
'0'
;
m_FmtLen
.
x
=
ctmp
+
m_FmtScale
.
x
;
...
...
@@ -236,7 +246,7 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command,
}
else
{
xy_seq_len
--
;
y_fmt_known
=
true
;
m_FmtScale
.
y
=
*
text
-
'0'
;
m_FmtLen
.
y
=
ctmp
+
m_FmtScale
.
y
;
if
(
m_FmtScale
.
y
<
0
)
...
...
@@ -252,16 +262,16 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command,
break
;
default
:
msg
.
Printf
(
wxT
(
"Unknown id (%c) in FS command"
),
*
text
);
ReportMessage
(
msg
);
GetEndOfBlock
(
buff
,
text
,
m_Current_File
);
ok
=
false
;
break
;
}
}
if
(
xy_seq_len
!=
0
)
{
ReportMessage
(
wxT
(
"RS274X: suspicious Format Statement (FS) command"
)
);
}
if
(
!
x_fmt_known
||
!
y_fmt_known
)
ReportMessage
(
wxT
(
"RS274X: Format Statement (FS) without X or Y format"
)
);
break
;
...
...
packaging/windows/nsis/install.nsi
View file @
1ae31edb
...
...
@@ -17,7 +17,7 @@
; General Product Description Definitions
!define PRODUCT_NAME "KiCad"
!define PRODUCT_VERSION "2013.03.0
4
"
!define PRODUCT_VERSION "2013.03.0
6
"
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
!define COMPANY_NAME ""
...
...
@@ -36,7 +36,7 @@ SetCompressor /final /solid lzma
CRCCheck force
XPStyle on
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "${PRODUCT_NAME}_stable-${PRODUCT_VERSION}-BZR398
2
_Win_full_version.exe"
OutFile "${PRODUCT_NAME}_stable-${PRODUCT_VERSION}-BZR398
6
_Win_full_version.exe"
InstallDir "$PROGRAMFILES\KiCad"
ShowInstDetails hide
ShowUnInstDetails hide
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment