mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-25 20:09:21 +02:00
- 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 git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5457 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
parent
b79c252d17
commit
230de72552
14
Makefile
14
Makefile
@ -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 @@ endif
|
||||
|
||||
# ----- Rules -----------------------------------------------------------------
|
||||
|
||||
.PHONY: all dep depend clean
|
||||
.PHONY: all dep depend clean install uninstall
|
||||
|
||||
.SUFFIXES: .fig .xpm
|
||||
|
||||
@ -111,6 +113,14 @@ endif
|
||||
|
||||
# ----- 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
|
||||
|
2
delete.c
2
delete.c
@ -229,6 +229,8 @@ static void do_delete_obj(struct obj *obj)
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
7
inst.c
7
inst.c
@ -804,12 +804,13 @@ int inst_arc(struct obj *obj, struct coord center, struct coord start,
|
||||
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;
|
||||
|
2
kicad.c
2
kicad.c
@ -145,7 +145,7 @@ static void kicad_circ(FILE *file, const struct inst *inst)
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user