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
8afe4599
Commit
8afe4599
authored
Apr 22, 2014
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Teach cvpcb about new KIWAY based cross-probing, factor out MAIL_T into mail_type.h
parent
7a129e16
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
28 deletions
+31
-28
kiway.cpp
common/kiway.cpp
+1
-1
kiway_express.cpp
common/kiway_express.cpp
+1
-1
cvframe.cpp
cvpcb/cvframe.cpp
+7
-9
kiway.h
include/kiway.h
+2
-1
kiway_express.h
include/kiway_express.h
+4
-16
mail_type.h
include/mail_type.h
+16
-0
No files found.
common/kiway.cpp
View file @
8afe4599
...
...
@@ -297,7 +297,7 @@ bool KIWAY::PlayersClose( bool doForce )
void
KIWAY
::
ExpressMail
(
FRAME_T
aDestination
,
int
aCommand
,
const
std
::
string
&
aPayload
,
wxWindow
*
aSource
)
MAIL_T
aCommand
,
const
std
::
string
&
aPayload
,
wxWindow
*
aSource
)
{
KIWAY_EXPRESS
mail
(
aDestination
,
aCommand
,
aPayload
,
aSource
);
...
...
common/kiway_express.cpp
View file @
8afe4599
...
...
@@ -49,7 +49,7 @@ KIWAY_EXPRESS::KIWAY_EXPRESS( const KIWAY_EXPRESS& anOther ) :
}
KIWAY_EXPRESS
::
KIWAY_EXPRESS
(
FRAME_T
aDestination
,
int
aCommand
,
KIWAY_EXPRESS
::
KIWAY_EXPRESS
(
FRAME_T
aDestination
,
MAIL_T
aCommand
,
const
std
::
string
&
aPayload
,
wxWindow
*
aSource
)
:
wxEvent
(
aCommand
,
wxEVENT_ID
),
m_destination
(
aDestination
),
...
...
cvpcb/cvframe.cpp
View file @
8afe4599
...
...
@@ -786,14 +786,10 @@ void CVPCB_MAINFRAME::UpdateTitle()
void
CVPCB_MAINFRAME
::
SendMessageToEESCHEMA
()
{
char
cmd
[
1024
];
int
selection
;
COMPONENT
*
Component
;
if
(
m_netlist
.
IsEmpty
()
)
return
;
selection
=
m_ListCmp
->
GetSelection
();
int
selection
=
m_ListCmp
->
GetSelection
();
if
(
selection
<
0
)
selection
=
0
;
...
...
@@ -801,12 +797,14 @@ void CVPCB_MAINFRAME::SendMessageToEESCHEMA()
if
(
m_netlist
.
GetComponent
(
selection
)
==
NULL
)
return
;
Component
=
m_netlist
.
GetComponent
(
selection
);
C
OMPONENT
*
c
omponent
=
m_netlist
.
GetComponent
(
selection
);
sprintf
(
cmd
,
"$PART:
\"
%s
\"
"
,
TO_UTF8
(
Component
->
GetReference
()
)
);
SendCommand
(
MSG_TO_SCH
,
cmd
);
std
::
string
packet
=
StrPrintf
(
"$PART:
\"
%s
\"
"
,
TO_UTF8
(
component
->
GetReference
()
)
);
if
(
Kiface
().
IsSingle
()
)
SendCommand
(
MSG_TO_SCH
,
packet
.
c_str
()
);
else
Kiway
().
ExpressMail
(
FRAME_SCH
,
MAIL_CROSS_PROBE
,
packet
,
this
);
}
...
...
include/kiway.h
View file @
8afe4599
...
...
@@ -102,6 +102,7 @@ as such! As such, it is OK to use UTF8 characters:
#include <search_stack.h>
#include <project.h>
#include <frame_type.h>
#include <mail_type.h>
#define VTBL_ENTRY virtual
...
...
@@ -324,7 +325,7 @@ public:
*/
VTBL_ENTRY
bool
PlayersClose
(
bool
doForce
);
VTBL_ENTRY
void
ExpressMail
(
FRAME_T
aDestination
,
int
aCommand
,
const
std
::
string
&
aPayload
,
wxWindow
*
aSource
=
NULL
);
VTBL_ENTRY
void
ExpressMail
(
FRAME_T
aDestination
,
MAIL_T
aCommand
,
const
std
::
string
&
aPayload
,
wxWindow
*
aSource
=
NULL
);
/**
* Function Prj
...
...
include/kiway_express.h
View file @
8afe4599
...
...
@@ -28,24 +28,12 @@
#include <wx/wx.h>
#include <frame_type.h>
/**
* Enum MAIL_T
* is the set of mail types sendable via KIWAY::ExpressMail() and supplied as
* the @a aCommand parameter to that function. Such mail will be received in
* KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) and aEvent.Command() will
* match aCommand to ExpressMail().
*/
enum
MAIL_T
{
MAIL_CROSS_PROBE
,
};
#include <mail_type.h>
/**
* Class KIWAY_EXPRESS
* carries a payload from one KIWAY_PLAYER to anoth
ing
within a PROJECT.
* carries a payload from one KIWAY_PLAYER to anoth
er
within a PROJECT.
*/
class
KIWAY_EXPRESS
:
public
wxEvent
{
...
...
@@ -58,7 +46,7 @@ public:
/**
* Function Command
* returns the
EXPRESS_
MAIL_T associated with this mail.
* returns the MAIL_T associated with this mail.
*/
MAIL_T
Command
()
{
...
...
@@ -78,7 +66,7 @@ public:
//KIWAY_EXPRESS() {}
KIWAY_EXPRESS
(
FRAME_T
aDestination
,
wxEventType
aCommand
,
MAIL_T
aCommand
,
const
std
::
string
&
aPayload
,
wxWindow
*
aSource
=
NULL
);
...
...
include/mail_type.h
0 → 100644
View file @
8afe4599
#ifndef MAIL_TYPE_H_
#define MAIL_TYPE_H_
/**
* Enum MAIL_T
* is the set of mail types sendable via KIWAY::ExpressMail() and supplied as
* the @a aCommand parameter to that function. Such mail will be received in
* KIWAY_PLAYER::KiwayMailIn( KIWAY_EXPRESS& aEvent ) and aEvent.Command() will
* match aCommand to KIWAY::ExpressMail().
*/
enum
MAIL_T
{
MAIL_CROSS_PROBE
,
///< PCB<->SCH, CVPCB->SCH cross-probing.
};
#endif // MAIL_TYPE_H_
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