Makefile: add an "upload" target for uploading the .gcode to my printer
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
__pycache__
|
||||
build/
|
||||
printer_password
|
||||
|
25
Makefile
25
Makefile
@@ -3,6 +3,12 @@ SHAREDIR=$(PREFIX)/share/models
|
||||
PRINT_NOZZLE_DIAM=0.2
|
||||
PRINT_FILA_DIAM=1.75
|
||||
|
||||
# variables for `make upload`
|
||||
PRINTER_HOST=10.78.79.180
|
||||
PRINTER_USER=bblp
|
||||
PRINTER_PASS=$(shell cat ./printer_password)
|
||||
PRINTER_AUTH=${PRINTER_USER}:${PRINTER_PASS}
|
||||
|
||||
# settings for Bambu p1p 3d printer, TPU
|
||||
# takeaways:
|
||||
# - bed-temp: 65C
|
||||
@@ -91,13 +97,6 @@ build/web-viewer/index.html: doc.in/index.html build/web-viewer/vtk.js build/web
|
||||
mkdir -p "$(@D)"
|
||||
./main.py --render-phone --export-png $@
|
||||
|
||||
readme: readme_files/pinephone_front_case_with_phone.png readme_files/pinephone_back_case_with_phone.png readme_files/pinephone_side_case_with_phone.png
|
||||
|
||||
doc: readme build/web-viewer/index.html
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
|
||||
build/case.stl: main.py src/*.py
|
||||
mkdir -p "$(@D)"
|
||||
./main.py --export-stl $@
|
||||
@@ -106,5 +105,15 @@ build/case.stl: main.py src/*.py
|
||||
mkdir -p $(shell dirname $@)
|
||||
slic3r $(SLIC3R_FLAGS) $< -o $@
|
||||
|
||||
.PHONY: all install readme doc clean
|
||||
readme: readme_files/pinephone_front_case_with_phone.png readme_files/pinephone_back_case_with_phone.png readme_files/pinephone_side_case_with_phone.png
|
||||
|
||||
doc: readme build/web-viewer/index.html
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
|
||||
upload: build/case.gcode
|
||||
lftp -e "set ssl:verify-certificate false; put $<" -u ${PRINTER_AUTH} ftps://${PRINTER_HOST}
|
||||
|
||||
.PHONY: all install readme doc clean upload
|
||||
|
||||
|
Reference in New Issue
Block a user