Send commitlog mailing list submissions to
commitlog@lists.openmoko.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
commitlog-requ...@lists.openmoko.org
You can reach the person managing the list at
commitlog-ow...@lists.openmoko.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:
1. r5968 - trunk/eda/fped (wer...@docs.openmoko.org)
2. r5969 - in trunk/gta02-core: . modules (wer...@docs.openmoko.org)
--- Begin Message ---
Author: werner
Date: 2010-05-30 11:04:26 +0200 (Sun, 30 May 2010)
New Revision: 5968
Modified:
trunk/eda/fped/coord.c
trunk/eda/fped/coord.h
trunk/eda/fped/gui_meas.c
trunk/eda/fped/gui_util.c
trunk/eda/fped/kicad.c
trunk/eda/fped/util.h
Log:
When dragging an endpoint of an inverted measurement, we didn't consider that
inst->base and inst->u.meas.end are swapped, causing fped to crash in vec_at.
Also introduced a universal swap() function.
- util.h (swap): new swap function for arguments of any type
- gui_meas.c (begin_drag_move_meas, draw_move_meas): swap the endpoints if
moving an inverted measurement
- coord.c (sort_coord): use swap() instead of swap_coord
- coord.h, coord.c (swap_coord): removed
- gui_util.c (save_pix_buf): use swap() instead of open-coding the swap
- kicad.c (kicad_centric): use sort_coord instead of "manually" sorting the
coordinates
Modified: trunk/eda/fped/coord.c
===================================================================
--- trunk/eda/fped/coord.c 2010-05-29 21:13:48 UTC (rev 5967)
+++ trunk/eda/fped/coord.c 2010-05-30 09:04:26 UTC (rev 5968)
@@ -1,8 +1,8 @@
/*
* coord.c - Coordinate representation and basic operations
*
- * Written 2009 by Werner Almesberger
- * Copyright 2009 by Werner Almesberger
+ * Written 2009, 2010 by Werner Almesberger
+ * Copyright 2009, 2010 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -13,6 +13,7 @@
#include <math.h>
+#include "util.h"
#include "coord.h"
@@ -153,22 +154,12 @@
/* ----- sorting coordinates ----------------------------------------------- */
-void swap_coord(unit_type *a, unit_type *b)
-{
- unit_type tmp;
-
- tmp = *a;
- *a = *b;
- *b = tmp;
-}
-
-
void sort_coord(struct coord *min, struct coord *max)
{
if (min->x > max->x)
- swap_coord(&min->x, &max->x);
+ swap(min->x, max->x);
if (min->y > max->y)
- swap_coord(&min->y, &max->y);
+ swap(min->y, max->y);
}
Modified: trunk/eda/fped/coord.h
===================================================================
--- trunk/eda/fped/coord.h 2010-05-29 21:13:48 UTC (rev 5967)
+++ trunk/eda/fped/coord.h 2010-05-30 09:04:26 UTC (rev 5968)
@@ -1,8 +1,8 @@
/*
* coord.h - Coordinate representation and basic operations
*
- * Written 2009 by Werner Almesberger
- * Copyright 2009 by Werner Almesberger
+ * Written 2009, 2010 by Werner Almesberger
+ * Copyright 2009, 2010 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -87,7 +87,6 @@
double theta_vec(struct coord v);
double theta(struct coord c, struct coord p);
-void swap_coord(unit_type *a, unit_type *b);
void sort_coord(struct coord *min, struct coord *max);
unit_type dist_point(struct coord a, struct coord b);
Modified: trunk/eda/fped/gui_meas.c
===================================================================
--- trunk/eda/fped/gui_meas.c 2010-05-29 21:13:48 UTC (rev 5967)
+++ trunk/eda/fped/gui_meas.c 2010-05-30 09:04:26 UTC (rev 5968)
@@ -189,7 +189,8 @@
struct pix_buf *draw_move_meas(struct inst *inst, struct coord pos, int i)
{
- return draw_move_line_common(inst, inst->u.meas.end, pos, i);
+ return draw_move_line_common(inst, inst->u.meas.end, pos,
+ inst->obj->u.meas.inverted ? 1-i : i);
}
@@ -349,6 +350,7 @@
void begin_drag_move_meas(struct inst *inst, int i)
{
const struct meas *meas = &inst->obj->u.meas;
+ struct coord a, b;
switch (meas->type) {
case mt_xy_next:
@@ -367,14 +369,24 @@
abort();
}
highlight = meas_highlight_b;
+
+ /*
+ * We're setting up the same conditions as after picking the first
+ * point when making a new measurement. Thus, we set meas_inst to the
+ * vector to the endpoint we're not moving.
+ */
+ a = inst->base;
+ b = inst->u.meas.end;
+ if (inst->obj->u.meas.inverted)
+ swap(a, b);
switch (i) {
case 0:
mode = meas->type < 3 ? next_to_min : max_to_min;
- meas_inst = vec_at(inst->obj->u.meas.high, inst->u.meas.end);
+ meas_inst = vec_at(inst->obj->u.meas.high, b);
break;
case 1:
mode = min_to_next_or_max;
- meas_inst = vec_at(inst->obj->base, inst->base);
+ meas_inst = vec_at(inst->obj->base, a);
break;
default:
abort();
Modified: trunk/eda/fped/gui_util.c
===================================================================
--- trunk/eda/fped/gui_util.c 2010-05-29 21:13:48 UTC (rev 5967)
+++ trunk/eda/fped/gui_util.c 2010-05-30 09:04:26 UTC (rev 5968)
@@ -65,19 +65,12 @@
int border)
{
struct pix_buf *buf;
- int tmp;
int w, h;
- if (xa > xb) {
- tmp = xa;
- xa = xb;
- xb = tmp;
- }
- if (ya > yb) {
- tmp = ya;
- ya = yb;
- yb = tmp;
- }
+ if (xa > xb)
+ swap(xa, xb);
+ if (ya > yb)
+ swap(ya, yb);
buf = alloc_type(struct pix_buf);
buf->da = da;
buf->x = xa-border;
Modified: trunk/eda/fped/kicad.c
===================================================================
--- trunk/eda/fped/kicad.c 2010-05-29 21:13:48 UTC (rev 5967)
+++ trunk/eda/fped/kicad.c 2010-05-30 09:04:26 UTC (rev 5968)
@@ -30,23 +30,13 @@
struct coord *center, struct coord *size)
{
struct coord min, max;
- unit_type tmp;
min.x = units_to_kicad(a.x);
min.y = units_to_kicad(a.y);
max.x = units_to_kicad(b.x);
max.y = units_to_kicad(b.y);
- if (min.x > max.x) {
- tmp = min.x;
- min.x = max.x;
- max.x = tmp;
- }
- if (min.y > max.y) {
- tmp = min.y;
- min.y = max.y;
- max.y = tmp;
- }
+ sort_coord(&min, &max);
size->x = max.x-min.x;
size->y = max.y-min.y;
Modified: trunk/eda/fped/util.h
===================================================================
--- trunk/eda/fped/util.h 2010-05-29 21:13:48 UTC (rev 5967)
+++ trunk/eda/fped/util.h 2010-05-30 09:04:26 UTC (rev 5968)
@@ -1,8 +1,8 @@
/*
* util.h - Common utility functions
*
- * Written 2006, 2009 by Werner Almesberger
- * Copyright 2006, 2009 Werner Almesberger
+ * Written 2006, 2009, 2010 by Werner Almesberger
+ * Copyright 2006, 2009, 2010 Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -51,7 +51,12 @@
strnalloc_tmp[n] = 0; \
strnalloc_tmp; })
+#define swap(a, b) \
+ ({ typeof(a) swap_tmp = (a); \
+ (a) = (b); \
+ (b) = swap_tmp; })
+
char *stralloc_vprintf(const char *fmt, va_list ap);
char *stralloc_printf(const char *fmt, ...)
__attribute__((format(printf, 1, 2)));
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2010-05-30 11:49:14 +0200 (Sun, 30 May 2010)
New Revision: 5969
Added:
trunk/gta02-core/modules/amp-10100492.fpd
Modified:
trunk/gta02-core/AUTHORS
trunk/gta02-core/modules/INFO
trunk/gta02-core/modules/STATUS
trunk/gta02-core/modules/mkloe
trunk/gta02-core/sd-sim.sch
Log:
Footprint for the replacement SIM/SD holder. Fped >= revision 5667 required.
- AUTHORS, modules/STATUS, modules/INFO, modules/mkloe,
modules/amp-10100492.fpd: added draft footprint for the AMP 10100492 SIM/SD
combi-holder
- sd-sim.sch: added footprint of CON7501
Modified: trunk/gta02-core/AUTHORS
===================================================================
--- trunk/gta02-core/AUTHORS 2010-05-30 09:04:26 UTC (rev 5968)
+++ trunk/gta02-core/AUTHORS 2010-05-30 09:49:14 UTC (rev 5969)
@@ -98,6 +98,7 @@
components/mkloe
components/amp-10100492.lib (based on Alvaro's smsn16.lib)
modules/332fbga-p05.fpd
+ modules/amp-10100492.fpd
modules/bga96-8x12-0mm8.fpd
modules/ge865.fpd
modules/sod-523.fpd
Modified: trunk/gta02-core/modules/INFO
===================================================================
--- trunk/gta02-core/modules/INFO 2010-05-30 09:04:26 UTC (rev 5968)
+++ trunk/gta02-core/modules/INFO 2010-05-30 09:49:14 UTC (rev 5969)
@@ -127,4 +127,6 @@
F: dtc123je
D:
http://www.digikey.com/Web%20Export/Supplier%20Content/ROHM_511/PDF/Rohm_TransistorSoldering.pdf
-
+# AMP 10100492
+F: amp-10100492
+S: simsd
Modified: trunk/gta02-core/modules/STATUS
===================================================================
--- trunk/gta02-core/modules/STATUS 2010-05-30 09:04:26 UTC (rev 5968)
+++ trunk/gta02-core/modules/STATUS 2010-05-30 09:49:14 UTC (rev 5969)
@@ -1,6 +1,7 @@
Footprint (file name) Author Review 2nd rv. 3rd rv. Remarks
----------------------- ------- ------- ------- -------
-------------
332fbga-p05 Werner EXPERIMENTAL - DO NOT USE YET
+amp-10100492 Werner DRAFT
bf2520 Dave
bga96-8x12-0mm8 Werner
dfbm-cs320 Rene
Added: trunk/gta02-core/modules/amp-10100492.fpd
===================================================================
--- trunk/gta02-core/modules/amp-10100492.fpd (rev 0)
+++ trunk/gta02-core/modules/amp-10100492.fpd 2010-05-30 09:49:14 UTC (rev
5969)
@@ -0,0 +1,182 @@
+/* MACHINE-GENERATED ! */
+
+frame SIMpads {
+ table
+ { b, s, p }
+ { 2.5mm, 0.9mm, 1.27mm }
+
+ table
+ { n, name }
+ { 1, "C1" }
+ { 2, "C5" }
+ { 3, "C2" }
+ { 4, "C6" }
+ { 5, "C3" }
+ { 6, "C7" }
+ { 7, "C4" }
+ { 8, "C8" }
+
+ __0: vec @(0mm, -(8-n)*p)
+ ur: vec .(b/2, s/2)
+ ll: vec __0(-b/2, -s/2)
+ pad "$name" . ur
+}
+
+frame SDpads {
+ table
+ { b, s, p }
+ { 2.5mm, 0.7mm, 1.1mm }
+
+ loop n = 1, 8
+
+ __0: vec @(-(n-1)*p, 0mm)
+ ur: vec .(s/2, b/2)
+ ll: vec __0(-s/2, -b/2)
+ pad "P$n" ur .
+}
+
+frame GNDpad {
+ ur: vec @(w/2, h/2)
+ ll: vec @(-w/2, -h/2)
+ pad "$name" . ur
+}
+
+frame G6 {
+ table
+ { name, h, w }
+ { "G6", 1.65mm, 1.8mm }
+
+ frame GNDpad @
+}
+
+frame G5 {
+ table
+ { name, h, w }
+ { "G5", 1.7mm, 1.4mm }
+
+ frame GNDpad @
+}
+
+frame G4 {
+ table
+ { name, h, w }
+ { "G4", 1.4mm, 1.4mm }
+
+ frame GNDpad @
+}
+
+frame G3 {
+ table
+ { name, h, w }
+ { "G3", 2mm, 1.8mm }
+
+ frame GNDpad @
+}
+
+frame G2 {
+ table
+ { name, h, w }
+ { "G2", 2mm, 1.5mm }
+
+ frame GNDpad @
+}
+
+frame G1 {
+ table
+ { name, h, w }
+ { "G1", 1.9mm, 1.3mm }
+
+ frame GNDpad @
+}
+
+frame GND {
+ __3: vec @(0mm, -(2.54mm+8.89mm+3.67mm))
+ __4: vec .(2.38mm, 0mm)
+ frame G4 .
+ __5: vec __3(7.45mm, 0mm)
+ frame G5 .
+ __7: vec @(0mm, 13.32mm+0.65mm-12.5mm-2.5mm/2)
+ __2: vec .(20.5mm, -0.65mm)
+ frame G1 .
+ __6: vec .(-0.05mm, -14.42mm)
+ frame G6 .
+ __1: vec __7(12.25mm, 0mm)
+ frame G2 .
+ __0: vec __7(3.88mm, 0mm)
+ frame G3 .
+}
+
+frame hole {
+ set r = 1mm/2
+
+ __0: vec @(r, r)
+ __1: vec @(-r, -r)
+ hole . __0
+}
+
+frame outline {
+ __0: vec @(-w, -h)
+ rect . @ 5mil
+}
+
+frame holes {
+ __0: vec @(19.8mm, -12.5mm)
+ frame hole .
+ frame hole @
+}
+
+package "AMP-10100492"
+unit mm
+table
+ { h, w }
+ { 17.65mm, 27.2mm }
+
+ref: vec @(-8mm, 12.5mm/2)
+frame holes .
+frame GND .
+__0: vec .(10.6mm+7.7mm, -(12.5mm+2.5mm/2))
+frame SDpads .
+__2: vec ref(19.8mm+1.75mm, 1.38mm)
+frame outline .
+__1: vec ref(-3mm, -2.54mm)
+frame SIMpads .
+measy SIMpads.__0 >> __1 3mm
+measy __1 >> ref 3mm
+measy GND.__3 -> SIMpads.__0 6mm
+measx GND.__4 >> GND.__3 1.5mm
+measx GND.__5 >> GND.__3 2.5mm
+measx SDpads.__0 >> GND.__3 5mm
+measx GND.__6 >> GND.__3 5mm
+measx SDpads.__0 >> __0 -5mm
+measy GND.__2 >> __0 2mm
+measy GND.__2 >> GND.__6 3mm
+measy hole.__1 <- hole.__0 0.5mm
+measx ref >> GND.__0 2mm
+measx ref >> GND.__1 3mm
+measx ref >> holes.__0 4mm
+measx ref >> GND.__2 5mm
+measy ref << SDpads.ur
+measy GND.__2 << GND.__1 11.25mm
+measx outline.__0 >> __2 h+5mm
+measy outline.__0 >> __2 2.5mm
+measy ref >> __2
+measx SDpads.__0 -> SDpads.__0 -3.7mm
+measy SIMpads.__0 -> SIMpads.__0 2mm
+measx SIMpads.ll -> SIMpads.ur -1mm
+measy SIMpads.ll -> SIMpads.ur -3.1mm
+measy SDpads.ll -> SDpads.ur 0.5mm
+measx SDpads.ll -> SDpads.ur 3mm
+measy __1 >> __2 4mm
+measy holes.__0 >> ref
+measx G1/GNDpad.ll -> G1/GNDpad.ur -1mm
+measx G2/GNDpad.ll -> G2/GNDpad.ur -1mm
+measx G3/GNDpad.ll -> G3/GNDpad.ur -1mm
+measx G4/GNDpad.ll -> G4/GNDpad.ur 2mm
+measx G5/GNDpad.ll -> G5/GNDpad.ur 2.2mm
+measx G6/GNDpad.ll -> G6/GNDpad.ur -1mm
+measy G1/GNDpad.ll <- G1/GNDpad.ur 0.5mm
+measy G2/GNDpad.ll -> G2/GNDpad.ur 0.5mm
+measy G3/GNDpad.ll -> G3/GNDpad.ur 0.5mm
+measy G4/GNDpad.ll -> G4/GNDpad.ur 0.5mm
+measy G5/GNDpad.ll -> G5/GNDpad.ur 0.5mm
+measy G6/GNDpad.ll <- G6/GNDpad.ur 0.5mm
Modified: trunk/gta02-core/modules/mkloe
===================================================================
--- trunk/gta02-core/modules/mkloe 2010-05-30 09:04:26 UTC (rev 5968)
+++ trunk/gta02-core/modules/mkloe 2010-05-30 09:49:14 UTC (rev 5969)
@@ -5,7 +5,7 @@
MODS="$MODS dfbm-cs320 exc24c sc70-5 vssop8 sot23-5 tdfn34-16 mini-usb tsop-6"
MODS="$MODS sc89-6 son1408-3 fh23-39s-0.3shw fa2012 smsn16 wlcsp12-p05 sod-523"
MODS="$MODS u.fl-r-smt-1 ht210 k4m51323pe pcf50633-04-n3 bf2520 ms2v-t1s"
-MODS="$MODS tas4025a dtc123je"
+MODS="$MODS tas4025a dtc123je amp-10100492"
LIB=gta02-core.mod
Modified: trunk/gta02-core/sd-sim.sch
===================================================================
--- trunk/gta02-core/sd-sim.sch 2010-05-30 09:04:26 UTC (rev 5968)
+++ trunk/gta02-core/sd-sim.sch 2010-05-30 09:49:14 UTC (rev 5969)
@@ -1,4 +1,4 @@
-EESchema Schematic File Version 2 date Mon May 3 14:22:05 2010
+EESchema Schematic File Version 2 date Sun May 30 06:24:38 2010
LIBS:power
LIBS:device
LIBS:conn
@@ -9,7 +9,7 @@
$Descr A3 16535 11700
Sheet 5 14
Title ""
-Date "3 may 2010"
+Date "30 may 2010"
Rev ""
Comp ""
Comment1 ""
@@ -256,6 +256,7 @@
P 11100 5800
F 0 "CON7501" H 10650 6700 60 0000 C CNN
F 1 "AMP-10100492" H 10350 5150 60 0000 C CNN
+F 2 "AMP-10100492" H 11100 5800 60 0001 C CNN
1 11100 5800
1 0 0 -1
$EndComp
--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog