diff --git a/3d/Makefile b/3d/Makefile new file mode 100644 index 0000000..2871ba6 --- /dev/null +++ b/3d/Makefile @@ -0,0 +1,60 @@ + +NAMES = phschoen +NAMES += Sina +NAMES += Malaika +NAMES += Pauline +NAMES += Mara +NAMES += Marleen + + +BUILDDIR := ./build +REMOTES_WITH_NAME := $(NAMES:%=$(BUILDDIR)/test_%.stl) + +.PHONY: all +all: + +define scad_to_stl + $(1:%.scad=$(BUILDDIR)/%.stl) +endef + +#builddir +all: $(BUILDDIR) +$(BUILDDIR): + mkdir $@ + +$(BUILDDIR)/%: ./build + +.PHONY: clean +clean: + rm -rf $(BUILDDIR) + +define build_stl + +all:$1 +$1: $(BUILDDIR)/$1$(patsubst %,_%, $3).stl + +$(BUILDDIR)/$1$(patsubst %,_%, $3).stl : $1.scad + @echo "Generate $1" + @$(patsubst %,echo " with %";, $2) + openscad -o $$@ $$< -D "$2" +endef + + ##################################### +# actual targest + +$(eval $(call build_stl ,quad_charge_plug)) + +$(eval $(call build_stl ,stick,is_ps2_stick=0)) +$(eval $(call build_stl ,stick,is_ps2_stick=1)) + +$(foreach a,$(NAMES), $(eval $(call build_stl ,quad, name=\"$a\",$a))) + +REMOTE_REST=enable_text_engrave=0; show_switch=0; show_lcd=0; show_sticks=0; show_stm32=0; show_antenna=0; show_cc2500=0; show_batery_charger=0; show_batery=0; show_joysticks_pcb=0; show_usb_connector=0; +REMOTE_TOP :=show_top=1; show_bottom=0; show_strapholder=0; show_grip=0; $(REMOTE_REST) +REMOTE_BOTTOM:=show_top=0; show_bottom=1; show_strapholder=0; show_grip=0; $(REMOTE_REST) +REMOTE_STRAP:=show_top=0; show_bottom=0; show_strapholder=1; show_grip=0; $(REMOTE_REST) +REMOTE_GRIP:=show_top=0; show_bottom=0; show_strapholder=0; show_grip=1; $(REMOTE_REST) +$(eval $(call build_stl ,remote,$(REMOTE_TOP),top )) +$(eval $(call build_stl ,remote,$(REMOTE_BOTTOM),bottom)) +$(foreach a,$(NAMES), $(eval $(call build_stl ,remote,$(REMOTE_STRAP) name=\"$a\",strap_$a))) +$(eval $(call build_stl ,remote,$(REMOTE_GRIP),grip)) diff --git a/3d/remote.scad b/3d/remote.scad index 3dcce38..6dad54a 100644 --- a/3d/remote.scad +++ b/3d/remote.scad @@ -10,7 +10,7 @@ use ; $fn=64; show_top =0; -show_bottom =1; +show_bottom =0; show_strapholder =0; show_joysticks =0; show_grip =0; @@ -18,7 +18,7 @@ show_grip =0; enable_text_engrave =0; show_switch =0; -show_lcd =0; +show_lcd =1; show_sticks =0; show_stm32 =0; show_antenna =0; @@ -56,7 +56,7 @@ font="Go Mono:style=Bold"; font="Go Mono"; font="Arial Rounded MT Bold:style=Bold"; font_size=3.75; -font_size_name=6.5; +font_size_name=5.5; font_spaceing=1.25; @@ -218,7 +218,7 @@ module strapholder() { // name translate([0,13,5]) - text_engave(thick,font_size=font_size_name, text_="toolbox v1"); + text_engave(thick,font_size=font_size_name, text_=name); // strap holder translate([0,0,12]) { diff --git a/3d/stick.scad b/3d/stick.scad index ef54acc..1a46b63 100644 --- a/3d/stick.scad +++ b/3d/stick.scad @@ -4,10 +4,11 @@ use use +is_ps2_stick=0; // draw itself -stick(); +stick(10, is_ps2_stick); -module stick(h=10,is_ps2_shaft=1) +module stick(h=10,is_ps2_stick=0) { $fn=128; translate([0,0,15-3]) { @@ -18,7 +19,7 @@ module stick(h=10,is_ps2_shaft=1) } // stick holder with cutout translate([0,0,0]) { - stick_mount(is_ps2_shaft); + stick_mount(is_ps2_stick); } // dust protector @@ -67,11 +68,11 @@ module gabber_part() { } } -module stick_mount(is_ps2_shaft=0) { +module stick_mount(is_ps2_stick=0) { ps2_dia=4+0.4; ps2_width=3+0.4; - - + + mount_h=5; eps = 0.01; @@ -81,8 +82,8 @@ module stick_mount(is_ps2_shaft=0) { cylinder_flange_sphere($fn=32,r2=8, r1=3, h=4.5); translate([0,0,8.5]) cylinder_flange_sphere($fn=32,r2=3, r1=8, h=4.5); - - if ( is_ps2_shaft ) { + + if ( is_ps2_stick ) { cylinder(d=6.75,h=10); } else { cylinder(d=6,h=10); @@ -90,7 +91,7 @@ module stick_mount(is_ps2_shaft=0) { //cylinder(d=15,h=0.1); } translate([0,0,-eps]) - if ( is_ps2_shaft ) { + if ( is_ps2_stick) { intersection() { cube(center=true,[ps2_width,100,100]); cylinder(d=ps2_dia,h=mount_h); diff --git a/remote/include/config.h b/remote/include/config.h index dc779c3..432a837 100644 --- a/remote/include/config.h +++ b/remote/include/config.h @@ -16,7 +16,10 @@ #define _CONFIG_H_ #include -#define REMOE_OWNER "phschoen" +#define REMOE_OWNER "Marleen" +//#define REMOE_OWNER "Sina" +//#define REMOE_OWNER "Malaika" + #define DEFAULT_BIND_TIME 13 /*seconds*/