diff --git a/app/readme.txt b/app/readme.txt index ca5a5c0..a1bc72d 100644 --- a/app/readme.txt +++ b/app/readme.txt @@ -8,15 +8,15 @@ 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 @@ -24,12 +24,11 @@ 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 - \ No newline at end of file diff --git a/app/robotcontrol.py b/app/robotcontrol.py index 88b6a66..c3cf8f7 100644 --- a/app/robotcontrol.py +++ b/app/robotcontrol.py @@ -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] diff --git a/app/test.py b/app/test.py index 278552c..82546f3 100644 --- a/app/test.py +++ b/app/test.py @@ -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