projects
/
hw
/
altusmetrum
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
convert Python footprint generators to Python 3
[hw/altusmetrum]
/
packages
/
UBLOX-ZOE.py
diff --git
a/packages/UBLOX-ZOE.py
b/packages/UBLOX-ZOE.py
old mode 100755
(executable)
new mode 100644
(file)
index
86da5f6
..
bb9ef48
--- a/
packages/UBLOX-ZOE.py
+++ b/
packages/UBLOX-ZOE.py
@@
-1,4
+1,4
@@
-#!/usr/bin/python
2
+#!/usr/bin/python
3
# Copyright 2020 by Bdale Garbee <bdale@gag.com>. GPLv3
#
# Program to emit PCB footprint for U-Blox ZOE-8 GPS receiver
# Copyright 2020 by Bdale Garbee <bdale@gag.com>. GPLv3
#
# Program to emit PCB footprint for U-Blox ZOE-8 GPS receiver
@@
-26,13
+26,13
@@
import sys
def mm2mils100( mm ):
return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 )
def mm2mils100( mm ):
return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 )
-print
'# author: Bdale Garbee'
-print
'# email: bdale@gag.com'
-print
'# dist-license: GPL 3'
-print
'# use-license: unlimited'
+print
('# author: Bdale Garbee')
+print
('# email: bdale@gag.com')
+print
('# dist-license: GPL 3')
+print
('# use-license: unlimited')
-print
'Element[0x0 "UBLOX-ZOE" "" "" 0 0 11000 0 0 100 0x0]'
-print
"("
+print
('Element[0x0 "UBLOX-ZOE" "" "" 0 0 11000 0 0 100 0x0]')
+print
("(")
rows = ['A','B','C','D','E','F','G','H','J']
for row in rows:
rows = ['A','B','C','D','E','F','G','H','J']
for row in rows:
@@
-40,7
+40,7
@@
for row in rows:
for col in range (1,10): # col wil run 1..9
ThisPin = row+str(col)
if ThisPin in ValidPin:
for col in range (1,10): # col wil run 1..9
ThisPin = row+str(col)
if ThisPin in ValidPin:
- print
' Pad[',\
+ print
(
' Pad[',\
mm2mils100((col-5) * PadSpacing), \
mm2mils100((rownum-4) * PadSpacing), \
mm2mils100((col-5) * PadSpacing), \
mm2mils100((col-5) * PadSpacing), \
mm2mils100((rownum-4) * PadSpacing), \
mm2mils100((col-5) * PadSpacing), \
@@
-48,39
+48,39
@@
for row in rows:
mm2mils100(PadDiam), \
mm2mils100(Clearance), \
mm2mils100(Mask), \
mm2mils100(PadDiam), \
mm2mils100(Clearance), \
mm2mils100(Mask), \
- '"%s"' % ThisPin, '"%s"' % ThisPin, '""]'
+ '"%s"' % ThisPin, '"%s"' % ThisPin, '""]'
)
-print
' ElementLine[',\
+print
(
' ElementLine[',\
mm2mils100(-BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100( BodySize/2), \
- '1000 ]'
+ '1000 ]'
)
-print
' ElementLine[',\
+print
(
' ElementLine[',\
mm2mils100(-BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100( BodySize/2), \
- '1000 ]'
+ '1000 ]'
)
-print
' ElementLine[',\
+print
(
' ElementLine[',\
mm2mils100( BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100(-BodySize/2), \
- '1000 ]'
+ '1000 ]'
)
-print
' ElementLine[',\
+print
(
' ElementLine[',\
mm2mils100( BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100(-BodySize/2), \
- '1000 ]'
+ '1000 ]'
)
-print
' ElementArc[',\
+print
(
' ElementArc[',\
mm2mils100(-5 * PadSpacing), \
mm2mils100(-5 * PadSpacing), \
mm2mils100(-5 * PadSpacing), \
mm2mils100(-5 * PadSpacing), \
- '500 500 0 360 1000 ]'
+ '500 500 0 360 1000 ]'
)
-print
")"
+print
(")")