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. r5629 - in trunk/gta02-core: . components scripts
      (wer...@docs.openmoko.org)
   2. r5630 - trunk/gta02-core/docs (wer...@docs.openmoko.org)
   3. r5631 - trunk/gta02-core (wer...@docs.openmoko.org)
   4. r5632 - trunk/gta02-core/components (wer...@docs.openmoko.org)
   5. r5633 - trunk/eda/fped (wer...@docs.openmoko.org)
--- Begin Message ---
Author: werner
Date: 2009-09-12 17:37:21 +0200 (Sat, 12 Sep 2009)
New Revision: 5629

Modified:
   trunk/gta02-core/Makefile
   trunk/gta02-core/components/INFO
   trunk/gta02-core/scripts/Makefile
   trunk/gta02-core/scripts/mkdsv
Log:
The "dsv" system now supports multiple data sheets per component multiple
aliases per data sheet.

- scripts/mkdsv: converted "alias" to a list, so that a data sheet can use
  multiple aliases 
- scripts/mkdsv: a component can now have multiple data sheets, each with its
  own aliases
- scripts/mkdsv: added option -d to print the DSV_HOME directory
- Makefile, scripts/Makefile: added target "dsv-rebuild" to remove and then
  rebuild all the local scripts
- components/INFO: dsv-lcm now shows the LCM data sheet
- components/INFO: dsv-td028ttec1 now shows the LCM's data sheet instead of the
  connector's



Modified: trunk/gta02-core/Makefile
===================================================================
--- trunk/gta02-core/Makefile   2009-09-12 07:34:02 UTC (rev 5628)
+++ trunk/gta02-core/Makefile   2009-09-12 15:37:21 UTC (rev 5629)
@@ -1,5 +1,5 @@
 .PHONY:                all gen generate gv sch brd update upload xpdf 
bom-by-ref
-.PHONY:                dsv
+.PHONY:                dsv dsv-rebuild
 
 upload=wer...@sita.openmoko.org:public_html/gta02-core/
 COPY=rsync -e ssh --progress
@@ -48,3 +48,6 @@
 
 dsv:
                $(MAKE) -C scripts dsv
+
+dsv-rebuild:
+               $(MAKE) -C scripts dsv-rebuild

Modified: trunk/gta02-core/components/INFO
===================================================================
--- trunk/gta02-core/components/INFO    2009-09-12 07:34:02 UTC (rev 5628)
+++ trunk/gta02-core/components/INFO    2009-09-12 15:37:21 UTC (rev 5629)
@@ -2,10 +2,14 @@
 # Tags:
 #
 # S  Symbol name (must be first)
-# A  Alias (can be project-specific)
+# A  Alias (can be project-specific; multiple alias tags are possible)
 # M  package Marking
 # D  Data sheet URL
 #
+# If a component has multiple sheets, do an S-A*-D sequence for the first one,
+# then A-A*-D sequences for the rest. Only the first one will have the symbol's
+# name.
+#
 
 # NAND, single gate (SN74AUP1G00DCK)
 S: 74x1g00
@@ -192,10 +196,10 @@
 
 # LCM and its connector
 S: td028ttec1
+A: lcm
+D: 
http://www.cip.physik.uni-muenchen.de/~Wolfgang.Draxinger/stuff/openmoko/TD028TTEC1.pdf
 A: lcm-conn
 D: http://www.hirose.co.jp/cataloge_hp/e58613007.pdf
-#A: lcm
-D: 
http://www.cip.physik.uni-muenchen.de/~Wolfgang.Draxinger/stuff/openmoko/TD028TTEC1.pdf
 
 # GPS Coaxial Connector (U.FL-R-SMT-1)
 S: coax
@@ -257,4 +261,3 @@
 #S: FILTER
 #A: glamo-bead
 #D: 
http://www.inpaq.com.tw/en/specification/Specification-MCB-S&B%20Series-Updated20090331.pdf
-

Modified: trunk/gta02-core/scripts/Makefile
===================================================================
--- trunk/gta02-core/scripts/Makefile   2009-09-12 07:34:02 UTC (rev 5628)
+++ trunk/gta02-core/scripts/Makefile   2009-09-12 15:37:21 UTC (rev 5629)
@@ -1,4 +1,4 @@
-.PHONY:        all dsv
+.PHONY:        all dsv dsv-rebuild
 
 all:
        @echo "make what ?" 1>&2
@@ -6,3 +6,7 @@
 
 dsv:
        ../scripts/mkdsv ../components/INFO
+
+dsv-rebuild:
+       rm `../scripts/mkdsv -d`/bin/dsv-*
+       ../scripts/mkdsv ../components/INFO

Modified: trunk/gta02-core/scripts/mkdsv
===================================================================
--- trunk/gta02-core/scripts/mkdsv      2009-09-12 07:34:02 UTC (rev 5628)
+++ trunk/gta02-core/scripts/mkdsv      2009-09-12 15:37:21 UTC (rev 5629)
@@ -33,32 +33,43 @@
     $ds_dir = "$DSV_HOME/ds/$sym";
     $url =~ /[^\/?&]*$/;
     $name = $&;
-    if (-r "$ds_dir/$name" && -x "$bin_dir/dsv-$sym") {
-       return unless defined $alias;
-       return if -x "$bin_dir/dsv-$alias";
-    }
-    &mkdir($ds_dir);
 
     local ($p) = "$ds_dir/$name";
-    if (system("wget -nv -O \"$p-tmp\" \"$url\"")) {
-       print STDERR "FAILED: $sym -> $url\n";
-    } else {
-       rename("$p-tmp", $p) || die "rename: $!\n";
+
+    if (!-r "$p") {
+       &mkdir($ds_dir);
+       if (system("wget -nv -O \"$p-tmp\" \"$url\"")) {
+           print STDERR "FAILED: $sym -> $url\n";
+       } else {
+           rename("$p-tmp", $p) || die "rename: $!\n";
+       }
     }
-    &mkbin("$bin_dir/dsv-$sym", $p);
-    &mkbin("$bin_dir/dsv-$alias", $p) if defined $alias;
+    if (!-x "$bin_dir/dsv-$sym") {
+       print STDERR "adding dsv-$sym\n";
+       &mkbin("$bin_dir/dsv-$sym", $p);
+    }
+    for (@alias) {
+       if (!-x "$bin_dir/dsv-$_") {
+           print STDERR "adding dsv-$_\n";
+           &mkbin("$bin_dir/dsv-$_", $p);
+       }
+    }
 }
 
 
 sub flush
 {
     &dl if defined($sym) && defined($url);
-    undef $sym;
-    undef $alias;
+    undef @alias;
     undef $url;
 }
 
 
+if ($ARGV[0] eq "-d") {
+       print "$DSV_HOME\n";
+       exit(0);
+}
+
 &mkdir("$DSV_HOME");
 &mkdir("$DSV_HOME/ds");
 &mkdir("$DSV_HOME/bin");
@@ -70,9 +81,11 @@
        &flush if defined $sym;
        $sym = $1;
     } elsif (/^A:\s+(\S+)\s*$/) {
-       $alias = $1;
+       push(@alias, $1);
     } elsif (/^D:\s+(.*?)\s*$/) {
        $url = $1 unless defined $url;
+       die unless defined $sym;
+       &flush;
     } elsif (/^M:\s+(.*?)\s*$/) {
        # ignore
     } else {




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-09-12 17:40:05 +0200 (Sat, 12 Sep 2009)
New Revision: 5630

Modified:
   trunk/gta02-core/docs/GETTING-STARTED
Log:
- added that one should run "make dsv-rebuild" if data sheets are renamed.



Modified: trunk/gta02-core/docs/GETTING-STARTED
===================================================================
--- trunk/gta02-core/docs/GETTING-STARTED       2009-09-12 15:37:21 UTC (rev 
5629)
+++ trunk/gta02-core/docs/GETTING-STARTED       2009-09-12 15:40:05 UTC (rev 
5630)
@@ -108,6 +108,10 @@
   data sheets with commands like dsv-sc32442, dsv-cpu, etc. See
   $DSV_HOME/bin/ and components/INFO for the complete collection.
 
+  If a data sheet or one of its aliases is renamed, run
+
+  DSV_HOME=/home/moko/dsv make dsv-rebuild
+
 - Things to see and do:
 
   - (re)view and edit components (schematics symbols)




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-09-12 17:48:57 +0200 (Sat, 12 Sep 2009)
New Revision: 5631

Modified:
   trunk/gta02-core/Makefile
Log:
- Makefile: let make do the and-ing of the steps in "make update"
- Makefile: "make update" now also runs "make dsv", provided that the data
  sheet directory exists



Modified: trunk/gta02-core/Makefile
===================================================================
--- trunk/gta02-core/Makefile   2009-09-12 15:40:05 UTC (rev 5630)
+++ trunk/gta02-core/Makefile   2009-09-12 15:48:57 UTC (rev 5631)
@@ -20,9 +20,10 @@
                $(MAKE) -C modules gen
 
 update:
-               svn update && \
-                   make -C components loe && \
-                   make -C modules loe
+               svn update
+               make -C components loe
+               make -C modules loe
+               [ ! -d "`scripts/mkdsv -d`" ] || make dsv
 
 gv:
                gv gta02-core-all.ps.gz




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-09-12 18:02:07 +0200 (Sat, 12 Sep 2009)
New Revision: 5632

Modified:
   trunk/gta02-core/components/INFO
Log:
- components/INFO: added a bunch of Telit modem documents



Modified: trunk/gta02-core/components/INFO
===================================================================
--- trunk/gta02-core/components/INFO    2009-09-12 15:48:57 UTC (rev 5631)
+++ trunk/gta02-core/components/INFO    2009-09-12 16:02:07 UTC (rev 5632)
@@ -88,6 +88,16 @@
 A: gsm
 A: telit-gsm
 D: http://www.telit.com/module/infopool/download.php?id=1666
+A: telit-sim-holder
+D: http://www.telit.com/module/infopool/download.php?id=590
+A: telit-at
+D: http://www.telit.com/module/infopool/download.php?id=542
+A: telit-sw
+D: http://www.telit.com/module/infopool/download.php?id=522
+A: telit-audio
+D: http://www.telit.com/module/infopool/download.php?id=900
+A: ge864
+D: http://www.telit.com/module/infopool/download.php?id=550
 
 # WLAN Socket
 S: gta02_wlan_s




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-09-13 01:15:15 +0200 (Sun, 13 Sep 2009)
New Revision: 5633

Modified:
   trunk/eda/fped/gui.c
   trunk/eda/fped/gui.h
   trunk/eda/fped/gui_status.c
   trunk/eda/fped/gui_status.h
   trunk/eda/fped/gui_style.h
   trunk/eda/fped/gui_util.c
   trunk/eda/fped/gui_util.h
   trunk/eda/fped/inst.c
   trunk/eda/fped/obj.h
Log:
- gui_util.c: make container clean-out globally available as vacate_widget
- gui_status.c: the x entry are is now a vbox with variable content
- the pad type is now shown in the x entry area and can be changed by clicking
  on it



Modified: trunk/eda/fped/gui.c
===================================================================
--- trunk/eda/fped/gui.c        2009-09-12 16:02:07 UTC (rev 5632)
+++ trunk/eda/fped/gui.c        2009-09-12 23:15:15 UTC (rev 5633)
@@ -261,6 +261,16 @@
 }
 
 
+void change_world_reselect(void)
+{
+       struct obj *selected_obj;
+
+       selected_obj = selected_inst->obj;
+       change_world();
+       inst_select_obj(selected_obj);
+}
+
+
 static void make_screen(GtkWidget *window)
 {
        GtkWidget *vbox;
@@ -309,6 +319,7 @@
        gui_cleanup_style();
        gui_cleanup_tools();
        cleanup_tool_bar();
+       cleanup_status_area();
 
        return 0;
 }

Modified: trunk/eda/fped/gui.h
===================================================================
--- trunk/eda/fped/gui.h        2009-09-12 16:02:07 UTC (rev 5632)
+++ trunk/eda/fped/gui.h        2009-09-12 23:15:15 UTC (rev 5633)
@@ -27,6 +27,9 @@
 /* update everything after a model change */
 void change_world(void);
 
+/* like change_world, but select the object again */
+void change_world_reselect(void);
+
 int gui_init(int *argc, char ***argv);
 int gui_main(void);
 

Modified: trunk/eda/fped/gui_status.c
===================================================================
--- trunk/eda/fped/gui_status.c 2009-09-12 16:02:07 UTC (rev 5632)
+++ trunk/eda/fped/gui_status.c 2009-09-12 23:15:15 UTC (rev 5633)
@@ -23,6 +23,7 @@
 #include "coord.h"
 #include "error.h"
 #include "unparse.h"
+#include "obj.h"
 #include "gui_util.h"
 #include "gui_style.h"
 #include "gui_canvas.h"
@@ -56,7 +57,7 @@
 
 static GtkWidget *status_name, *status_entry;
 static GtkWidget *status_type_x, *status_type_y, *status_type_entry;
-static GtkWidget *status_entry_x, *status_entry_y;
+static GtkWidget *status_box_x, *status_entry_y;
 static GtkWidget *status_x, *status_y;
 static GtkWidget *status_r, *status_angle;
 static GtkWidget *status_sys_x, *status_sys_y;
@@ -64,7 +65,11 @@
 static GtkWidget *status_zoom, *status_grid, *status_unit;
 static GtkWidget *status_msg;
 
+/* The x entry area serves multiple purposes */
 
+static GtkWidget *status_entry_x;
+
+
 static void set_label(GtkWidget *label, const char *fmt, va_list ap)
 {
        char *s;
@@ -159,9 +164,74 @@
 }
 
 
-/* ----- helper functions -------------------------------------------------- */
+/* ----- pad type display and change --------------------------------------- */
 
 
+static enum pad_type *curr_pad_type;
+static GtkWidget *pad_type;
+
+
+static void show_pad_type(void)
+{
+       const char *s;
+
+       switch (*curr_pad_type) {
+       case pt_normal:
+               s = "normal";
+               break;
+       case pt_bare:
+               s = "bare";
+               break;
+       case pt_paste:
+               s = "paste";
+               break;
+       case pt_mask:
+               s = "mask";
+               break;
+       default:
+               abort();
+       }
+       gtk_label_set_text(GTK_LABEL(pad_type), s);
+}
+
+
+static gboolean pad_type_button_press_event(GtkWidget *widget,
+    GdkEventButton *event, gpointer data)
+{
+       switch (event->button) {
+       case 1:
+               *curr_pad_type = (*curr_pad_type+1) % pt_n;
+               show_pad_type();
+               break;
+       }
+       /*
+        * We can't just redraw() here, because changing the pad type may also
+        * affect the visual stacking. So we change the world and hope we end
+        * up selecting the same pad afterwards.
+        */
+       change_world_reselect();
+       return TRUE;
+}
+
+
+void edit_pad_type(enum pad_type *type)
+{
+       vacate_widget(status_box_x);
+       curr_pad_type = type;
+       pad_type = label_in_box_new(NULL);
+       gtk_container_add(GTK_CONTAINER(status_box_x), box_of_label(pad_type));
+       label_in_box_bg(pad_type, COLOR_SELECTOR);
+       g_signal_connect(G_OBJECT(box_of_label(pad_type)),
+           "button_press_event", G_CALLBACK(pad_type_button_press_event),
+           NULL);
+       show_pad_type();
+       gtk_widget_show_all(status_box_x);
+}
+
+
+/* ----- edit helper functions --------------------------------------------- */
+
+
 static void reset_edit(GtkWidget *widget)
 {
        struct edit_ops *ops;
@@ -532,6 +602,9 @@
 
 void edit_x(struct expr **expr)
 {
+       vacate_widget(status_box_x);
+       gtk_container_add(GTK_CONTAINER(status_box_x), status_entry_x);
+       gtk_widget_show(status_box_x);
        edit_any_expr(status_entry_x, expr);
 }
 
@@ -695,7 +768,7 @@
 void edit_nothing(void)
 {
        gtk_widget_hide(status_entry);
-       gtk_widget_hide(status_entry_x);
+       gtk_widget_hide(status_box_x);
        gtk_widget_hide(status_entry_y);
        open_edits = NULL;
        last_edit = NULL;
@@ -772,6 +845,17 @@
 /* ----- setup ------------------------------------------------------------- */
 
 
+static GtkWidget *add_vbox(GtkWidget *tab, int col, int row)
+{
+       GtkWidget *vbox;
+
+       vbox = gtk_vbox_new(FALSE, 0);
+       gtk_table_attach_defaults(GTK_TABLE(tab), vbox,
+           col, col+1, row, row+1);
+       return vbox;
+}
+
+
 static GtkWidget *add_label_basic(GtkWidget *tab, int col, int row)
 {
        GtkWidget *label;
@@ -796,14 +880,12 @@
 }
 
 
-static GtkWidget *add_entry(GtkWidget *tab, int col, int row)
+static GtkWidget *make_entry(void)
 {
        GtkWidget *entry;
 
        entry = gtk_entry_new();
        gtk_entry_set_has_frame(GTK_ENTRY(entry), FALSE);
-       gtk_table_attach_defaults(GTK_TABLE(tab), entry,
-           col, col+1, row, row+1);
 
        g_signal_connect(G_OBJECT(entry), "changed",
            G_CALLBACK(changed), entry);
@@ -814,6 +896,17 @@
 }
 
 
+static GtkWidget *add_entry(GtkWidget *tab, int col, int row)
+{
+       GtkWidget *entry;
+
+       entry = make_entry();
+       gtk_table_attach_defaults(GTK_TABLE(tab), entry,
+           col, col+1, row, row+1);
+       return entry;
+}
+
+
 void make_status_area(GtkWidget *vbox)
 {
        GtkWidget *tab, *sep;
@@ -830,10 +923,12 @@
        /* x / y */
 
        status_x = add_label(tab, 1, 0);
-       status_entry_x = add_entry(tab, 2, 0);
+       status_box_x = add_vbox(tab, 2, 0);
        status_y = add_label(tab, 1, 1);
        status_entry_y = add_entry(tab, 2, 1);
 
+       status_entry_x = gtk_widget_ref(make_entry());
+       
        /* name and input */
 
        status_name = add_label(tab, 1, 2);
@@ -864,7 +959,7 @@
 
        /* unit selection */
 
-       label_in_box_bg(status_unit, COLOR_UNIT_SELECTOR);
+       label_in_box_bg(status_unit, COLOR_SELECTOR);
        show_curr_unit();
        g_signal_connect(G_OBJECT(box_of_label(status_unit)),
            "button_press_event", G_CALLBACK(unit_button_press_event), NULL);
@@ -877,3 +972,9 @@
        context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(status_msg),
            "messages");
 }
+
+
+void cleanup_status_area(void)
+{
+       gtk_widget_unref(status_entry_x);
+}

Modified: trunk/eda/fped/gui_status.h
===================================================================
--- trunk/eda/fped/gui_status.h 2009-09-12 16:02:07 UTC (rev 5632)
+++ trunk/eda/fped/gui_status.h 2009-09-12 23:15:15 UTC (rev 5633)
@@ -31,6 +31,8 @@
 extern enum curr_unit curr_unit;
 
 
+void edit_pad_type(enum pad_type *type);
+
 void edit_unique(const char **s, int (*validate)(const char *s, void *ctx),
     void *ctx);
 void edit_unique_null(const char **s, int (*validate)(const char *s, void 
*ctx),
@@ -86,6 +88,7 @@
 
 void status_begin_reporting(void);
 
-void make_status_area(GtkWidget *vbox) ;
+void make_status_area(GtkWidget *vbox);
+void cleanup_status_area(void);
 
 #endif /* !GUI_STATUS_H */

Modified: trunk/eda/fped/gui_style.h
===================================================================
--- trunk/eda/fped/gui_style.h  2009-09-12 16:02:07 UTC (rev 5632)
+++ trunk/eda/fped/gui_style.h  2009-09-12 23:15:15 UTC (rev 5633)
@@ -96,7 +96,7 @@
 #define        COLOR_ITEM_SELECTED     COLOR_FRAME_SELECTED
 #define        COLOR_ITEM_ERROR        "red"
 
-#define        COLOR_UNIT_SELECTOR     "white"
+#define        COLOR_SELECTOR          "white"
 
 
 /* ----- canvas drawing styles --------------------------------------------- */

Modified: trunk/eda/fped/gui_util.c
===================================================================
--- trunk/eda/fped/gui_util.c   2009-09-12 16:02:07 UTC (rev 5632)
+++ trunk/eda/fped/gui_util.c   2009-09-12 23:15:15 UTC (rev 5633)
@@ -190,9 +190,15 @@
 }
 
 
+void vacate_widget(GtkWidget *widget)
+{
+       gtk_container_foreach(GTK_CONTAINER(widget), remove_child, widget);
+}
+
+
 void set_image(GtkWidget *widget, GtkWidget *image)
 {
-       gtk_container_foreach(GTK_CONTAINER(widget), remove_child, widget);
+       vacate_widget(widget);
        gtk_container_add(GTK_CONTAINER(widget), image);
        gtk_widget_show_all(widget);
 }

Modified: trunk/eda/fped/gui_util.h
===================================================================
--- trunk/eda/fped/gui_util.h   2009-09-12 16:02:07 UTC (rev 5632)
+++ trunk/eda/fped/gui_util.h   2009-09-12 23:15:15 UTC (rev 5633)
@@ -57,6 +57,8 @@
 void label_in_box_fg(GtkWidget *box, const char *color);
 void label_in_box_bg(GtkWidget *box, const char *color);
 
+void vacate_widget(GtkWidget *widget);
+
 GtkWidget *make_image(GdkDrawable *drawable, char **xpm);
 void set_image(GtkWidget *widget, GtkWidget *image);
 GtkWidget *tool_button(GtkWidget *bar, GdkDrawable *drawable, char **xpm,

Modified: trunk/eda/fped/inst.c
===================================================================
--- trunk/eda/fped/inst.c       2009-09-12 16:02:07 UTC (rev 5632)
+++ trunk/eda/fped/inst.c       2009-09-12 23:15:15 UTC (rev 5633)
@@ -742,6 +742,7 @@
 
 static void obj_pad_edit(struct obj *obj)
 {
+       edit_pad_type(&obj->u.pad.type);
        edit_name(&obj->u.pad.name, validate_pad_name, NULL);
 }
 

Modified: trunk/eda/fped/obj.h
===================================================================
--- trunk/eda/fped/obj.h        2009-09-12 16:02:07 UTC (rev 5632)
+++ trunk/eda/fped/obj.h        2009-09-12 23:15:15 UTC (rev 5633)
@@ -144,6 +144,7 @@
        pt_bare,        /* only copper (and finish) */
        pt_paste,       /* only solder paste */
        pt_mask,        /* only solder mask */
+       pt_n
 };
 
 struct frame_ref {




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to