Skip to content

Commit e3774e3

Browse files
committedJan 29, 2019
Fix formatting
1 parent 173559a commit e3774e3

File tree

4 files changed

+100
-87
lines changed

4 files changed

+100
-87
lines changed
 

‎common/triac/triac.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@
1313
<group conditions="horizontal">
1414
<connection name="a2" start="_Start" end="_Middle-30x" edge="Start" />
1515
<connection name="a1" start="_Middle+30x" end="_End" edge="End" />
16-
<connection name="g" start="_Middle-20x-20y" end="_Middle-20x-13y" edge="Start" />
16+
<connection name="g" start="_Middle-20x-20y" end="_Middle-20x-13y" edge="Start" />
1717
</group>
1818

1919
<group conditions="!horizontal">
20-
<connection name="a2" start="_Start" end="_Middle-30y" edge="Start" />
20+
<connection name="a2" start="_Start" end="_Middle-30y" edge="Start" />
2121
<connection name="a1" start="_Middle+30y" end="_End" edge="End" />
22-
<connection name="g" start="_Middle-20x+20y" end="_Middle-13x+20y" edge="Start" />
22+
<connection name="g" start="_Middle-20x+20y" end="_Middle-13x+20y" edge="Start" />
2323
</group>
2424
</connections>
2525

2626
<render>
27-
<group conditions="horizontal">
27+
<group conditions="horizontal">
2828
<ellipse centre="_Middle" rx="20" ry="20" fill="false" />
2929
<line start="_Start" end="_Middle-7x" />
3030
<line start="_Middle+7x" end="_End" />
+76-79
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,84 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<component version="1.2" xmlns="http://schemas.circuit-diagram.org/circuitDiagramDocument/2012/component/xml">
3-
<declaration>
3+
<declaration>
44

5-
<!-- Describe the component -->
6-
<meta name="name" value="4510 BCD Counter" />
7-
<meta name="version" value="1.0" />
8-
<meta name="minsize" value="120" />
9-
<meta name="author" value="Corsaka" />
10-
<meta name="additionalinformation" value="A more advanced 4-bit counter with more options, including pre-loading inputs." />
11-
<meta name="guid" value="688e0993-8cfb-4a6a-8df4-dbf7b99007e2" />
5+
<meta name="name" value="4510 BCD Counter" />
6+
<meta name="version" value="1.0" />
7+
<meta name="minsize" value="120" />
8+
<meta name="author" value="Corsaka" />
9+
<meta name="additionalinformation" value="A more advanced 4-bit counter with more options, including pre-loading inputs." />
10+
<meta name="guid" value="688e0993-8cfb-4a6a-8df4-dbf7b99007e2" />
1211

13-
<!-- Can only be displayed horizontally -->
14-
<flags>
15-
<option>horizontalonly</option>
16-
</flags>
17-
18-
</declaration>
19-
<connections>
12+
<flags>
13+
<option>horizontalonly</option>
14+
</flags>
15+
16+
</declaration>
17+
<connections>
2018

21-
<!-- Allow other components to connect to each of the pins -->
22-
<group>
23-
<connection start="_Start-80y" end="_Middle-48x-80y" edge="Start" />
24-
<connection start="_Start-60y" end="_Middle-48x-60y" edge="Start" />
25-
<connection start="_Middle+48x-80y" end="_End-80y" edge="End" />
26-
<connection start="_Middle+48x-60y" end="_End-60y" edge="End" />
27-
<connection start="_Start-40y" end="_Middle-48x-40y" edge="Start" />
28-
<connection start="_Middle+48x-40y" end="_End-40y" edge="End" />
29-
<connection start="_Start-20y" end="_Middle-48x-20y" edge="Start" />
30-
<connection start="_Middle+48x-20y" end="_End-20y" edge="End" />
31-
<connection start="_Start" end="_Middle-48x" edge="Start" />
32-
<connection start="_Middle+48x" end="_End" edge="End" />
33-
<connection start="_Start+20y" end="_Middle-48x+20y" edge="Start" />
34-
<connection start="_Middle+48x+20y" end="_End+20y" edge="End" />
35-
<connection start="_Start+40y" end="_Middle-48x+40y" edge="Start" />
36-
<connection start="_Middle+48x+40y" end="_End+40y" edge="End"/>
37-
<connection start="_Start+60y" end="_Middle-48x+60y" edge="Start" />
38-
<connection start="_Middle+48x+60y" end="_End+60y" edge="End"/>
39-
</group>
40-
41-
</connections>
42-
<render>
43-
44-
<group>
45-
<!-- Draw the rectangle representing the chip -->
46-
<rect x="_Middle-50" y="_Middle-110" width="100" height="180" />
19+
<group>
20+
<connection start="_Start-80y" end="_Middle-48x-80y" edge="Start" />
21+
<connection start="_Start-60y" end="_Middle-48x-60y" edge="Start" />
22+
<connection start="_Middle+48x-80y" end="_End-80y" edge="End" />
23+
<connection start="_Middle+48x-60y" end="_End-60y" edge="End" />
24+
<connection start="_Start-40y" end="_Middle-48x-40y" edge="Start" />
25+
<connection start="_Middle+48x-40y" end="_End-40y" edge="End" />
26+
<connection start="_Start-20y" end="_Middle-48x-20y" edge="Start" />
27+
<connection start="_Middle+48x-20y" end="_End-20y" edge="End" />
28+
<connection start="_Start" end="_Middle-48x" edge="Start" />
29+
<connection start="_Middle+48x" end="_End" edge="End" />
30+
<connection start="_Start+20y" end="_Middle-48x+20y" edge="Start" />
31+
<connection start="_Middle+48x+20y" end="_End+20y" edge="End" />
32+
<connection start="_Start+40y" end="_Middle-48x+40y" edge="Start" />
33+
<connection start="_Middle+48x+40y" end="_End+40y" edge="End"/>
34+
<connection start="_Start+60y" end="_Middle-48x+60y" edge="Start" />
35+
<connection start="_Middle+48x+60y" end="_End+60y" edge="End"/>
36+
</group>
37+
38+
</connections>
39+
<render>
40+
41+
<group>
42+
<!-- Draw the rectangle representing the chip -->
43+
<rect x="_Middle-50" y="_Middle-110" width="100" height="180" />
4744

48-
<!-- Draw a line to each pin -->
49-
<line start="_Start-80y" end="_Middle-50x-80y" />
50-
<line start="_Start-60y" end="_Middle-50x-60y" />
51-
<line start="_Middle+50x-80y" end="_End-80y" />
52-
<line start="_Middle+50x-60y" end="_End-60y" />
53-
<line start="_Start-40y" end="_Middle-50x-40y" />
54-
<line start="_Middle+50x-40y" end="_End-40y" />
55-
<line start="_Start-20y" end="_Middle-50x-20y" />
56-
<line start="_Middle+50x-20y" end="_End-20y" />
57-
<line start="_Start" end="_Middle-50x" />
58-
<line start="_Middle+50x" end="_End" />
59-
<line start="_Start+20y" end="_Middle-50x+20y" />
60-
<line start="_Middle+50x+20y" end="_End+20y" />
61-
<line start="_Start+40y" end="_Middle-50x+40y" />
62-
<line start="_Middle+50x+40y" end="_End+40y" />
63-
<line start="_Start+60y" end="_Middle-50x+60y" />
64-
<line start="_Middle+50x+60y" end="_End+60y" />
45+
<!-- Draw a line to each pin -->
46+
<line start="_Start-80y" end="_Middle-50x-80y" />
47+
<line start="_Start-60y" end="_Middle-50x-60y" />
48+
<line start="_Middle+50x-80y" end="_End-80y" />
49+
<line start="_Middle+50x-60y" end="_End-60y" />
50+
<line start="_Start-40y" end="_Middle-50x-40y" />
51+
<line start="_Middle+50x-40y" end="_End-40y" />
52+
<line start="_Start-20y" end="_Middle-50x-20y" />
53+
<line start="_Middle+50x-20y" end="_End-20y" />
54+
<line start="_Start" end="_Middle-50x" />
55+
<line start="_Middle+50x" end="_End" />
56+
<line start="_Start+20y" end="_Middle-50x+20y" />
57+
<line start="_Middle+50x+20y" end="_End+20y" />
58+
<line start="_Start+40y" end="_Middle-50x+40y" />
59+
<line start="_Middle+50x+40y" end="_End+40y" />
60+
<line start="_Start+60y" end="_Middle-50x+60y" />
61+
<line start="_Middle+50x+60y" end="_End+60y" />
6562

66-
<!-- Draw a label at each pin -->
67-
<text x="_Middle-13" y="_Middle-100" align="CentreLeft" size="large" value="4510" />
68-
<text x="_Middle-46" y="_Middle-80" align="CentreLeft" size="large" value="Load" />
69-
<text x="_Middle-46" y="_Middle-60" align="CentreLeft" size="large" value="L0" />
70-
<text x="_Middle+46" y="_Middle-80" align="CentreRight" size="large" value="Vcc" />
71-
<text x="_Middle+46" y="_Middle-60" align="CentreRight" size="large" value="A" />
72-
<text x="_Middle-46" y="_Middle-40" align="CentreLeft" size="large" value="L1" />
73-
<text x="_Middle+46" y="_Middle-40" align="CentreRight" size="large" value="B" />
74-
<text x="_Middle-46" y="_Middle-20" align="CentreLeft" size="large" value="L2" />
75-
<text x="_Middle+46" y="_Middle-20" align="CentreRight" size="large" value="C" />
76-
<text x="_Middle-46" y="_Middle" align="CentreLeft" size="large" value="L3" />
77-
<text x="_Middle+46" y="_Middle" align="CentreRight" size="large" value="D" />
78-
<text x="_Middle-46" y="_Middle+20" align="CentreLeft" size="large" value="Clock" />
79-
<text x="_Middle+46" y="_Middle+20" align="CentreRight" size="large" value="CE" />
80-
<text x="_Middle-46" y="_Middle+40" align="CentreLeft" size="large" value="TC" />
81-
<text x="_Middle+46" y="_Middle+40" align="CentreRight" size="large" value="UP/DN" />
82-
<text x="_Middle-46" y="_Middle+60" align="CentreLeft" size="large" value="Gnd" />
83-
<text x="_Middle+46" y="_Middle+60" align="CentreRight" size="large" value="R" />
84-
</group>
85-
86-
</render>
63+
<!-- Draw a label at each pin -->
64+
<text x="_Middle-13" y="_Middle-100" align="CentreLeft" size="large" value="4510" />
65+
<text x="_Middle-46" y="_Middle-80" align="CentreLeft" size="large" value="Load" />
66+
<text x="_Middle-46" y="_Middle-60" align="CentreLeft" size="large" value="L0" />
67+
<text x="_Middle+46" y="_Middle-80" align="CentreRight" size="large" value="Vcc" />
68+
<text x="_Middle+46" y="_Middle-60" align="CentreRight" size="large" value="A" />
69+
<text x="_Middle-46" y="_Middle-40" align="CentreLeft" size="large" value="L1" />
70+
<text x="_Middle+46" y="_Middle-40" align="CentreRight" size="large" value="B" />
71+
<text x="_Middle-46" y="_Middle-20" align="CentreLeft" size="large" value="L2" />
72+
<text x="_Middle+46" y="_Middle-20" align="CentreRight" size="large" value="C" />
73+
<text x="_Middle-46" y="_Middle" align="CentreLeft" size="large" value="L3" />
74+
<text x="_Middle+46" y="_Middle" align="CentreRight" size="large" value="D" />
75+
<text x="_Middle-46" y="_Middle+20" align="CentreLeft" size="large" value="Clock" />
76+
<text x="_Middle+46" y="_Middle+20" align="CentreRight" size="large" value="CE" />
77+
<text x="_Middle-46" y="_Middle+40" align="CentreLeft" size="large" value="TC" />
78+
<text x="_Middle+46" y="_Middle+40" align="CentreRight" size="large" value="UP/DN" />
79+
<text x="_Middle-46" y="_Middle+60" align="CentreLeft" size="large" value="Gnd" />
80+
<text x="_Middle+46" y="_Middle+60" align="CentreRight" size="large" value="R" />
81+
</group>
82+
83+
</render>
8784
</component>

‎lint.ps1

+19-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
$script:exit = 0
2+
3+
Get-ChildItem . -Recurse -Filter *.xml | Foreach-Object {
4+
$content = Get-Content $_.FullName
5+
6+
if ($content -match "\t") {
7+
$script:exit = 1
8+
Write-Output "[ERROR] Indented with tabs: $($_.FullName)"
9+
}
10+
}
11+
112
[xml]$manifest = Get-Content "Build/manifest.xml"
213

314
$inputs = @()
@@ -28,7 +39,7 @@ if ($duplicateGuids)
2839
Write-Output ""
2940
}
3041

31-
exit 1
42+
$script:exit = 1
3243
}
3344

3445
# Check file names
@@ -43,7 +54,12 @@ if ($invalidFileNames)
4354
}
4455
Write-Output ""
4556

46-
exit 1
57+
$script:exit = 1
58+
}
59+
60+
if (!$script:exit)
61+
{
62+
Write-Output "All components pass linting."
4763
}
4864

49-
Write-Output "All components pass linting."
65+
exit $script:exit

‎output/7_segment_display/7_segment_display.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
</group>
125125

126126
<!-- Common anode/cathode -->
127-
<group conditions="$Type==CommonAnode">
127+
<group conditions="$Type==CommonAnode">
128128
<text value="+" x="_End-58" y="_End+40" align="CentreLeft" />
129129
</group>
130130
<group conditions="$Type==CommonCathode">

0 commit comments

Comments
 (0)
Please sign in to comment.