Skip to content

Commit

Permalink
added stripping comment on g-code
Browse files Browse the repository at this point in the history
  • Loading branch information
swissembedded committed Jun 4, 2019
1 parent 9f64580 commit c100666
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
19 changes: 9 additions & 10 deletions app/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,27 @@
bash ~/Downloads/Anaconda3-2019.03-Linux-x86_64.sh
. install kivy
(https://anaconda.org/conda-forge/kivy)
conda install -c conda-forge kivy
conda install -c conda-forge kivy==1.10.1
. install pcb-tools

pip install pcb-tools

if not installed cario, should install cario

sudo apt-get install libcairo2-dev
#conda install -c conda-forge cairocffi
#conda install -c conda-forge cairocffi
pip install cairocffi==0.6
. install tsp-solver
pip install tsp_solver
. intall opencv
pip install opencv-contrib-python
. install printrun
- install dependencies
sudo apt install python3-serial python3-numpy cython3 python3-libxml2 python3-gi
sudo apt install python3-serial python3-numpy cython3 python3-libxml2 python3-gi
python3-dbus python3-psutil python3-cairosvg libpython3-dev python3-appdirs python3-wxgtk4.0
pip install pyserial
git clone git clone https://github.com/kliment/Printrun.git

pip install pyserial
git clone https://github.com/kliment/Printrun.git
copy the printrun subfolder inside the printrun repository to the app folder of opensolderingrobot
. install xclip xsel
- sudo apt-get install xclip xsel

4 changes: 4 additions & 0 deletions app/robotcontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,7 @@ def go_home(data):
# convert gcode into an array of single commands
def make_array(gcode):
return gcode.splitlines()

# strip off the command before sending to printer
def strip_comment(gcode):
return gcode.split(';')[0]
6 changes: 6 additions & 0 deletions app/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@
else:
print("nok home", gcode)

gcode=robotcontrol.strip_comment("G28; this is a comment")
if gcode=="G28":
print("ok strip")
else:
print("nok strip",gcode)

# create g-code for soldering
prjdata['Panel']=panel
prjdata['SolderToolpath']=soldertoolpath
Expand Down

0 comments on commit c100666

Please sign in to comment.