r5457 - trunk/eda/fped
werner at docs.openmoko.org
werner at docs.openmoko.org
Sun Aug 16 01:25:07 CEST 2009
Author: werner
Date: 2009-08-16 01:25:05 +0200 (Sun, 16 Aug 2009)
New Revision: 5457
Modified:
trunk/eda/fped/Makefile
trunk/eda/fped/delete.c
trunk/eda/fped/inst.c
trunk/eda/fped/kicad.c
Log:
- Makefile: fixed odd indentation of "clean" target
- Makfile: added "install" and "uninstall" targets
- when deleting the currently active frame reference, reset active_ref of the
frame, so that it can be set to a new value later
- during instantiation, circles were classified as arcs
- end point of KiCad circle didn't mirror the Y axis
Modified: trunk/eda/fped/Makefile
===================================================================
--- trunk/eda/fped/Makefile 2009-08-15 22:36:39 UTC (rev 5456)
+++ trunk/eda/fped/Makefile 2009-08-15 23:25:05 UTC (rev 5457)
@@ -10,6 +10,8 @@
# (at your option) any later version.
#
+PREFIX = /usr/local
+
OBJS = fped.o expr.o coord.o obj.o delete.o inst.o util.o error.o \
unparse.o file.o dump.o kicad.o postscript.o meas.o \
cpp.o lex.yy.o y.tab.o \
@@ -67,7 +69,7 @@
# ----- Rules -----------------------------------------------------------------
-.PHONY: all dep depend clean
+.PHONY: all dep depend clean install uninstall
.SUFFIXES: .fig .xpm
@@ -111,6 +113,14 @@
# ----- Cleanup ---------------------------------------------------------------
- clean:
+clean:
rm -f $(OBJS) $(XPMS:%=icons/%)
rm -f lex.yy.c y.tab.c y.tab.h y.output .depend
+
+# ----- Install / uninstall ---------------------------------------------------
+
+install:
+ install -m 755 fped $(PREFIX)/bin/
+
+uninstall:
+ rm -f $(PREFIX)/bin/fped
Modified: trunk/eda/fped/delete.c
===================================================================
--- trunk/eda/fped/delete.c 2009-08-15 22:36:39 UTC (rev 5456)
+++ trunk/eda/fped/delete.c 2009-08-15 23:25:05 UTC (rev 5457)
@@ -229,6 +229,8 @@
del = new_deletion(dt_obj);
del->u.obj.ref = obj;
del->u.obj.prev = prev;
+ if (obj->type == ot_frame && obj->u.frame.ref->active_ref == obj)
+ obj->u.frame.ref->active_ref = NULL;
}
Modified: trunk/eda/fped/inst.c
===================================================================
--- trunk/eda/fped/inst.c 2009-08-15 22:36:39 UTC (rev 5456)
+++ trunk/eda/fped/inst.c 2009-08-15 23:25:05 UTC (rev 5457)
@@ -804,12 +804,13 @@
struct inst *inst;
double r, a1, a2;
- inst = add_inst(&arc_ops, ip_arc, center);
+ a1 = theta(center, start);
+ a2 = theta(center, end);
+ inst = add_inst(&arc_ops,
+ fmod(a1, 360) == fmod(a2, 360) ? ip_circ : ip_arc, center);
inst->obj = obj;
r = hypot(start.x-center.x, start.y-center.y);
inst->u.arc.r = r;
- a1 = theta(center, start);
- a2 = theta(center, end);
inst->u.arc.a1 = a1;
inst->u.arc.a2 = a2;
inst->u.arc.width = width;
Modified: trunk/eda/fped/kicad.c
===================================================================
--- trunk/eda/fped/kicad.c 2009-08-15 22:36:39 UTC (rev 5456)
+++ trunk/eda/fped/kicad.c 2009-08-15 23:25:05 UTC (rev 5457)
@@ -145,7 +145,7 @@
units_to_kicad(inst->base.x),
-units_to_kicad(inst->base.y),
units_to_kicad(inst->base.x),
- units_to_kicad(inst->base.y+inst->u.arc.r),
+ -units_to_kicad(inst->base.y+inst->u.arc.r),
units_to_kicad(inst->u.arc.width),
layer_silk_top);
}
More information about the commitlog
mailing list