Commit 03812618 authored by lifekidyeaa's avatar lifekidyeaa

eeschema:

* made schematic loading of 'GLabels' dependent on the schematic file version (currently at 2). 
If the version == 1, these are loaded as hierarchal labels
* made text labels global in the herarchy, consistent with their historical usage. 
parent c5cd8502
This diff is collapsed.
EESchema Schematic File Version 1
LIBS:power,device,conn,linear,regul,74xx,cmos4000,adc-dac,memory,xilinx,special,microcontrollers,dsp,microchip,analog_switches,motorola,texas,intel,audio,interface,digital-audio,philips,display,cypress,siliconi,contrib,valves,.\pic_programmer.cache
EESchema Schematic File Version 2
LIBS:power,device,conn,linear,regul,74xx,cmos4000,adc-dac,memory,xilinx,special,microcontrollers,dsp,microchip,analog_switches,motorola,texas,intel,audio,interface,digital-audio,philips,display,cypress,siliconi,contrib,valves,./pic_programmer.cache
EELAYER 23 0
EELAYER END
$Descr A4 11700 8267
Sheet 2 2
Sheet 1 1
Title "JDM - COM84 PIC Programmer with 13V DC/DC converter"
Date "16 may 2007"
Rev "3"
......@@ -74,24 +74,24 @@ Wire Wire Line
Text Label 3950 6900 0 60 ~
VCC_PIC
$Comp
L GND #PWR036
L GND #PWR
U 1 1 4639BE2E
P 4550 7400
F 0 "#PWR036" H 4550 7400 30 0001 C C
F 0 "#PWR" H 4550 7400 30 0001 C C
F 1 "GND" H 4550 7330 30 0001 C C
1 4550 7400
1 0 0 -1
$EndComp
$Comp
L C C8
L C C
U 1 1 4639BE2C
P 4550 7200
F 0 "C8" H 4600 7300 50 0000 L C
F 0 "C" H 4600 7300 50 0000 L C
F 1 "100nF" H 4600 7100 50 0000 L C
1 4550 7200
1 0 0 -1
$EndComp
Text GLabel 2350 2150 0 60 Input
Text HLabel 2350 2150 0 60 Input
VCC_PIC
Text Label 2550 2150 0 60 ~
VCC_PIC
......@@ -102,10 +102,10 @@ VCC_PIC
Text Label 9650 2500 0 60 ~
VCC_PIC
$Comp
L GND #PWR037
L GND #PWR
U 1 1 442A8794
P 8450 5250
F 0 "#PWR037" H 8450 5250 30 0001 C C
F 0 "#PWR" H 8450 5250 30 0001 C C
F 1 "GND" H 8450 5180 30 0001 C C
1 8450 5250
0 1 1 0
......@@ -113,10 +113,10 @@ $EndComp
Text Label 4300 4850 0 60 ~
VCC_PIC
$Comp
L GND #PWR038
L GND #PWR
U 1 1 443CCA5D
P 8450 4850
F 0 "#PWR038" H 8450 4850 30 0001 C C
F 0 "#PWR" H 8450 4850 30 0001 C C
F 1 "GND" H 8450 4780 30 0001 C C
1 8450 4850
0 1 1 0
......@@ -144,19 +144,19 @@ NoConn ~ 8200 2000
NoConn ~ 8200 1900
NoConn ~ 8200 1800
$Comp
L GND #PWR039
L GND #PWR
U 1 1 443697C7
P 9400 2600
F 0 "#PWR039" H 9400 2600 30 0001 C C
F 0 "#PWR" H 9400 2600 30 0001 C C
F 1 "GND" H 9400 2530 30 0001 C C
1 9400 2600
0 -1 -1 0
$EndComp
$Comp
L GND #PWR040
L GND #PWR
U 1 1 443697C3
P 8200 2400
F 0 "#PWR040" H 8200 2400 30 0001 C C
F 0 "#PWR" H 8200 2400 30 0001 C C
F 1 "GND" H 8200 2330 30 0001 C C
1 8200 2400
0 1 1 0
......@@ -168,55 +168,55 @@ DATA-RB7
Text Label 7550 1700 0 60 ~
VPP-MCLR
$Comp
L SUPP28 P2
L SUPP28 P
U 1 1 4436967E
P 8800 2350
F 0 "P2" H 8850 3150 70 0000 C C
F 0 "P" H 8850 3150 70 0000 C C
F 1 "SUPP28" H 8800 1550 70 0000 C C
1 8800 2350
1 0 0 -1
$EndComp
$Comp
L GND #PWR041
L GND #PWR
U 1 1 442AA147
P 3700 7400
F 0 "#PWR041" H 3700 7400 30 0001 C C
F 0 "#PWR" H 3700 7400 30 0001 C C
F 1 "GND" H 3700 7330 30 0001 C C
1 3700 7400
1 0 0 -1
$EndComp
$Comp
L C C7
L C C
U 1 1 442AA145
P 3700 7200
F 0 "C7" H 3750 7300 50 0000 L C
F 0 "C" H 3750 7300 50 0000 L C
F 1 "100nF" H 3750 7100 50 0000 L C
1 3700 7200
1 0 0 -1
$EndComp
$Comp
L GND #PWR042
L GND #PWR
U 1 1 442AA138
P 2700 7400
F 0 "#PWR042" H 2700 7400 30 0001 C C
F 0 "#PWR" H 2700 7400 30 0001 C C
F 1 "GND" H 2700 7330 30 0001 C C
1 2700 7400
1 0 0 -1
$EndComp
$Comp
L VCC #PWR043
L VCC #PWR
U 1 1 442AA134
P 2700 7000
F 0 "#PWR043" H 2700 7100 30 0001 C C
F 0 "#PWR" H 2700 7100 30 0001 C C
F 1 "VCC" H 2700 7100 30 0000 C C
1 2700 7000
1 0 0 -1
$EndComp
$Comp
L C C6
L C C
U 1 1 442AA12B
P 2700 7200
F 0 "C6" H 2750 7300 50 0000 L C
F 0 "C" H 2750 7300 50 0000 L C
F 1 "100nF" H 2750 7100 50 0000 L C
1 2700 7200
1 0 0 -1
......@@ -254,29 +254,29 @@ NoConn ~ 8450 4450
NoConn ~ 8450 4350
NoConn ~ 8450 4250
$Comp
L GND #PWR044
L GND #PWR
U 1 1 442A896A
P 9650 5050
F 0 "#PWR044" H 9650 5050 30 0001 C C
F 0 "#PWR" H 9650 5050 30 0001 C C
F 1 "GND" H 9650 4980 30 0001 C C
1 9650 5050
0 -1 -1 0
$EndComp
$Comp
L SUPP40 P3
L SUPP40 P
U 1 1 442A88ED
P 9050 5100
F 0 "P3" H 9100 6200 70 0000 C C
F 0 "P" H 9100 6200 70 0000 C C
F 1 "SUPP40" H 8900 4000 70 0000 C C
1 9050 5100
1 0 0 -1
$EndComp
NoConn ~ 4550 1100
$Comp
L GND #PWR045
L GND #PWR
U 1 1 442A8838
P 2950 1250
F 0 "#PWR045" H 2950 1250 30 0001 C C
F 0 "#PWR" H 2950 1250 30 0001 C C
F 1 "GND" H 2950 1180 30 0001 C C
1 2950 1250
1 0 0 -1
......@@ -286,10 +286,10 @@ DATA-RB7
Text Label 4700 1300 0 60 ~
CLOCK-RB6
$Comp
L 24C16 U1
L 24C16 U
U 1 1 442A87F7
P 3850 1200
F 0 "U1" H 4000 1550 60 0000 C C
F 0 "U" H 4000 1550 60 0000 C C
F 1 "24Cxx" H 4050 850 60 0000 C C
1 3850 1200
1 0 0 -1
......@@ -314,10 +314,10 @@ NoConn ~ 2500 5000
NoConn ~ 2500 4550
NoConn ~ 2500 4250
$Comp
L PIC16F54 U5
L PIC16F54 U
U 1 1 442A81A7
P 3300 4850
F 0 "U5" H 3600 5650 60 0000 C C
F 0 "U" H 3600 5650 60 0000 C C
F 1 "PIC_18_PINS" H 3750 4050 60 0000 C C
1 3300 4850
1 0 0 -1
......@@ -337,35 +337,35 @@ Text Label 4700 2850 0 60 ~
CLOCK-RB6
Text Label 4700 2450 0 60 ~
DATA-RB7
Text GLabel 1350 4450 0 60 Input
Text HLabel 1350 4450 0 60 Input
VPP-MCLR
Text GLabel 1350 4250 0 60 Input
Text HLabel 1350 4250 0 60 Input
CLOCK-RB6
Text GLabel 1350 4050 0 60 Input
Text HLabel 1350 4050 0 60 Input
DATA-RB7
$Comp
L GND #PWR046
L GND #PWR
U 1 1 442A820F
P 2300 4900
F 0 "#PWR046" H 2300 4900 30 0001 C C
F 0 "#PWR" H 2300 4900 30 0001 C C
F 1 "GND" H 2300 4830 30 0001 C C
1 2300 4900
1 0 0 -1
$EndComp
$Comp
L GND #PWR047
L GND #PWR
U 1 1 442A8205
P 4550 2150
F 0 "#PWR047" H 4550 2150 30 0001 C C
F 0 "#PWR" H 4550 2150 30 0001 C C
F 1 "GND" H 4550 2080 30 0001 C C
1 4550 2150
0 -1 -1 0
$EndComp
$Comp
L PIC12C508A U6
L PIC12C508A U
U 1 1 442A81A5
P 3850 2650
F 0 "U6" H 3800 3350 60 0000 C C
F 0 "U" H 3800 3350 60 0000 C C
F 1 "PIC_8_PINS" H 3850 1950 60 0000 C C
1 3850 2650
1 0 0 -1
......
......@@ -11,7 +11,7 @@
#define ul unsigned long
/* Entete des fichiers schematique */
#define EESCHEMA_VERSION 1
#define EESCHEMA_VERSION 2
#define SCHEMATIC_HEAD_STRING "Schematic File Version"
#define EESCHEMA_FILE_STAMP "EESchema"
......
......@@ -118,7 +118,8 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& F
fclose( f );
return FALSE;
}
//get the file version here.
char version = Line[9 + sizeof(SCHEMATIC_HEAD_STRING)];
LineCount++;
if( fgets( Line, 1024 - 1, f ) == NULL || strncmp( Line, "LIBS:", 5 ) != 0 )
{
......@@ -381,7 +382,7 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& F
TextStruct->m_Orient = orient;
Struct = (EDA_BaseStruct*) TextStruct;
}
else if( Name1[0] == 'G')
else if( Name1[0] == 'G' && version > '1')
{
DrawGlobalLabelStruct* TextStruct =
new DrawGlobalLabelStruct(pos, CONV_FROM_UTF8( text ) );
......@@ -397,8 +398,8 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& F
if( stricmp( Name2, SheetLabelType[NET_UNSPECIFIED] ) == 0 )
TextStruct->m_Shape = NET_UNSPECIFIED;
}
else if( Name1[0] == 'H')
{
else if( (Name1[0] == 'H') || (Name1[0] == 'G' && version == '1'))
{ //in sschematic file version 1, glabels were actually hierarchal labels.
DrawHierLabelStruct* TextStruct =
new DrawHierLabelStruct(pos, CONV_FROM_UTF8( text ) );
Struct = (EDA_BaseStruct*) TextStruct;
......
......@@ -1098,15 +1098,16 @@ static void LabelConnect( ObjetNetListStruct* LabelRef )
if( netTable[i].m_SheetList != LabelRef->m_SheetList )
{
if( netTable[i].m_Type != NET_PINLABEL
if( netTable[i].m_Type != NET_LABEL // (***)
&& netTable[i].m_Type != NET_PINLABEL
&& netTable[i].m_Type != NET_GLOBLABEL
&& netTable[i].m_Type != NET_GLOBBUSLABELMEMBER)
continue;
}
//regular labels are sheet-local;
//NET_HIERLABEL are used to connect sheets.
//there are no true global labels yet,
//though I've (tried) to implement them in this file.
//NET_LABEL can be either sheet-local or global.
//historically, it was global, so we must implement that (***)
if( netTable[i].m_Type == NET_LABEL
|| netTable[i].m_Type == NET_GLOBLABEL
|| netTable[i].m_Type == NET_BUSLABELMEMBER
......
......@@ -358,6 +358,7 @@ DrawSheetLabelStruct* WinEDA_SchematicFrame::Import_PinSheet( DrawSheetStruct* S
DrawSheetLabelStruct* NewSheetLabel, * SheetLabel = NULL;
DrawHierLabelStruct* HLabel = NULL;
if(!Sheet->m_s) return NULL;
DrawStruct = Sheet->m_s->EEDrawList;
HLabel = NULL;
for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment