<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
  <_name>EggBot Control</_name>
  <id>command.evilmadscientist.eggbot.rev271b1</id>
  <dependency type="extension">org.inkscape.output.svg.inkscape</dependency>
  <dependency type="executable" location="extensions">eggbot.py</dependency>
  <dependency type="executable" location="extensions">inkex.py</dependency>
  <param name="tab" type="notebook">
  
    <page name="splash" _gui-text="Plot">
      <_param name="splashpage" type="description" xml:space="preserve">
Welcome to the EggBot interface!

Press 'Apply' to begin plotting.

Or, look in the other tabs for
 configuration and other options.

Need help? Visit http://egg-bot.com/
</_param>
    </page>

    <page name='setup' _gui-text='Setup'>

      <_param name="instructions_setup" type="description" xml:space="preserve">
EggBot: Basic Setup
</_param>
      <param name="penUpPosition" type="int" min="0" max="100"
	     _gui-text="          Pen up position, 0-100%:">55</param>
      <param name="penDownPosition" type="int" min="0" max="100"
	     _gui-text="          Pen down position, 0-100%:">50</param>

      <param name="setupType" type="optiongroup" appearance=""
	     _gui-text="          Action on 'Apply': ">
	<_option value="toggle-pen"     >Toggle pen up/down</_option>
	<_option value="align-mode"     >Raise pen, turn off motors</_option>	
      </param>
      <_param name="instructions_setup3" type="description"
	      xml:space="preserve">
- Raise and lower pen to check the
  pen-up and pen-down positions.

- Raise pen and turn off stepper motors
  for aligning objects in the EggBot.
</_param>
    </page>

    <page name='timing' _gui-text='Timing'>
      <param name="penDownSpeed" type="int" min="1" max="10000"
	   _gui-text="          Speed when pen is down (steps/s):">300</param>	
      <param name="penUpSpeed" type="int" min="1" max="10000"
	   _gui-text="          Speed when pen is up (step/s):">400</param>
      <param name="ServoUpSpeed" type="int" min="1" max="1600"
	   _gui-text="          Pen raising speed (%/s):">50</param>
      <param name="penUpDelay" type="int" min="1" max="5000"
	   _gui-text="          Delay after raising pen (ms):">200</param>
      <param name="ServoDownSpeed" type="int" min="1" max="1600"
	   _gui-text="          Pen lowering speed (%/s):">20</param>
      <param name="penDownDelay" type="int" min="1" max="5000"
	   _gui-text="          Delay after lowering pen (ms):">400</param>
      <_param name="help_timing" type="description">
Note: Pressing 'Apply' will apply settings, but not plot.
</_param>
    </page>

    <page name='options' _gui-text='Options'>
      <param name="revPenMotor" type="boolean"
           _gui-text="          Reverse motion of Motor 1 (pen)">true</param>	
      <param name="revEggMotor" type="boolean"
           _gui-text="          Reverse motion of Motor 2 (egg)">true</param> 
      <param name="wraparound" type="boolean"
           _gui-text="          Egg (x) axis wraps around">true</param>
      <param name="startCentered" type="boolean"
           _gui-text="          Start with pen centered">true</param>	
      <param name="returnToHome" type="boolean"
           _gui-text="          Return home when done">true</param> 
      <param name="engraving" type="boolean"
           _gui-text="          Enable engraver, if attached">false</param>	
      <param name="smoothness" type="float"
           _gui-text="          Curve smoothing (lower for more):">.2</param>
      <_param name="help_options" type="description">
Note: Pressing 'Apply' will apply settings, but not plot.
</_param>
    </page>
	
    <page name="manual" _gui-text="Manual">
      <_param name="instructions_manual" type="description"
	      xml:space="preserve">
EggBot Manual Control

You can use this frame to send "manual" commands
to the EggBot: Walk the stepper motors, raise or
lower the pen, enable or disable the motors, or 
check the circuit board (EBB) firmware version.
</_param>

      <param name="manualType" type="optiongroup" appearance="minimal"
	     _gui-text="               Command: ">
	<_option value="none"           >- Select -</_option>
	<_option value="raise-pen"      >Raise the Pen</_option>
	<_option value="lower-pen"      >Lower the Pen</_option>
	<_option value="walk-egg-motor" >Walk Motor 2 (egg)</_option>
	<_option value="walk-pen-motor" >Walk Motor 1 (pen)</_option>
	<_option value="enable-motors"  >Enable Motors</_option>
	<_option value="disable-motors" >Disable Motors</_option>
	<_option value="enable-engraver"  >Engraver On</_option>
	<_option value="disable-engraver" >Engraver Off</_option>
	<_option value="version-check"  >Check EBB Version</_option>
      </param>

      <param name="WalkDistance" type="int" min="-32000" max="32000" 
             _gui-text="               Walk distance (steps):">5</param>
      <_param name="instructions_manual2" type="description"
	      xml:space="preserve">
Note: Walk distance can be positive or negative.

Press 'Apply' to execute the command.
</_param>
    </page>

    <page name="resume" _gui-text="Resume">
      <_param name="instructions_resume" type="description"
	      xml:space="preserve">
To pause a plot in progress, press the "PRG" 
button on the circuit board. After pausing, you
can change the EggBot settings or perform any
manual adjustments that are needed.

To resume plotting-- or to cancel and return
home --press 'Apply' with this tab selected.   

Plot progress is stored in the inkscape file;
if you need to quit inkscape and resume later, 
be sure to save the document first.
</_param>
      <param name="cancelOnly" type="boolean"
	     _gui-text="Cancel and return home only">false</param> 
    </page>		

    <page name="layers" _gui-text="Layers">
      <_param name="instructions_layer" type="description" xml:space="preserve">
Normally, we plot paths from all layers.  
You can also choose to plot a single layer 
or group of layers, for example to change
pens between plotting layers.

Pressing 'Apply' from this frame will plot
only layers whose names begin with the 
selected number, which can be up to 100.
</_param>
      <param name="layernumber" type="int" min="0" max="100"
	     _gui-text="   Plot only layers beginning with: ">1</param>
    </page>			

    <page name="Help" _gui-text="*">
      <_param name="instructions_general" type="description"
	      xml:space="preserve">
EggBot Control Inkscape extension 
Release 2.7.1, dated 2016-01-11

*EBB Firmware 1.96 or newer required for certain
 functions. 

Known issues:
* "Cancel" function does not work while plotting.
  (This is due to a known bug in Inkscape; the
   "cancel" button does not work with any
   Inkscape extension, this one included.)
</_param>
    </page>
  </param>

  <effect needs-live-preview="false" needs-document="no">
    <object-type>all</object-type>
    <effects-menu>
      <submenu _name="EggBot"/>
    </effects-menu>
  </effect>

  <script>
    <command reldir="extensions" interpreter="python">eggbot.py</command>
  </script>

</inkscape-extension>
