Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions inkscape_driver/eggbot.inx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Need help?
Visit http://wiki.evilmadscientist.com/eggbot

</label>
<param indent="1" name="commandLog" type="path"
gui-text="Log commands to the following file:"></param>
</page>

<page name='setup' gui-text='Setup'>
Expand Down
9 changes: 9 additions & 0 deletions inkscape_driver/eggbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ def __init__(self):
action="store", type="inkbool",
dest="revEggMotor", default=False,
help="Reverse motion of egg motor.")
self.OptionParser.add_option("--commandLog",
action="store", type="string",
dest="commandLog", default="",
help="Log file for drawing commands.")

self.allLayers = None
self.plotCurrentLayer = None
Expand Down Expand Up @@ -202,6 +206,8 @@ def effect(self):
self.serialPort = ebb_serial.openPort()
if self.serialPort is None:
inkex.errormsg(gettext.gettext("Failed to connect to EggBot. :("))
if len(self.options.commandLog) > 0:
ebb_serial.startLogging(self.options.commandLog)

if self.options.tab == "splash":
self.allLayers = True
Expand Down Expand Up @@ -252,6 +258,9 @@ def effect(self):
ebb_motion.doTimedPause(self.serialPort, 10) # Pause a moment for underway commands to finish...
ebb_serial.closePort(self.serialPort)

if len(self.options.commandLog) > 0:
ebb_serial.stopLogging()

self.svgDataRead = False
self.UpdateSVGEggbotData(self.svg)
return
Expand Down