fix errors in 8ufson2x2 footprint generator
authorBdale Garbee <bdale@gag.com>
Wed, 20 Mar 2013 20:26:32 +0000 (14:26 -0600)
committerBdale Garbee <bdale@gag.com>
Wed, 20 Mar 2013 20:26:32 +0000 (14:26 -0600)
packages/8ufson2x2.5c

index 6c4fc52760e75498885f9dfa545181f6d99550f3..f25de6fe3a88a4d378fafc09d2e7f2958f11816c 100644 (file)
@@ -22,7 +22,7 @@ real pad_width = 0.30;
 real pad_height = 0.75;
 real pad_spacing = 0.50;
 
-real pad_y_off = 1.4;
+real pad_y_off = (2.8 - pad_height) / 2;
 
 real center_width = 1.6;
 real center_height = 0.45;
@@ -41,19 +41,19 @@ real pad_off(int n) {
 real dot_off = - .3;
 
 for (pad = 0; pad < num_pad; pad++) {
-       /* top side (1-4) */
+       /* bottom side (1-4) */
 
        pad_mm(pad_off(pad),
-              -pad_y_off,
+              pad_y_off,
               pad_width,
               pad_height,
               sprintf("%d", pad + 1),
               sprintf("%d", pad + 1));
        
-       /* bottom side (5-8) */
+       /* top side (5-8) */
 
        pad_mm(-pad_off(pad),
-              pad_y_off,
+              -pad_y_off,
               pad_width,
               pad_height,
               sprintf("%d", pad + 5),
@@ -66,7 +66,7 @@ pad_mm(0, 0, center_width, center_height, "GND", "GND");
 rect(-package_width/2, -package_height/2,
      package_width, package_height);
 
-line(-package_width/2 + dot_off, -package_height/2 + dot_off,
-     -package_width/2 + dot_off, -package_height/2 + dot_off);
+line(-package_width/2 + dot_off, package_height/2,
+     -package_width/2 + dot_off, package_height/2);
 
 element_end();