<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.gitignore</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -158,8 +158,13 @@ void loop()
 		bot.enableTimerInterrupt();
 	}
 	
-	//uncomment this if you want to find out what your status is.
-/*
+	Serial.print(&quot;Current: &quot;);
+	Serial.print(bot.x.current);
+	Serial.print(&quot; &quot;);
+	Serial.print(bot.y.current);
+	Serial.print(&quot; &quot;);
+	Serial.println(bot.z.current);
+	
 	Serial.print(&quot;At min: &quot;);
 	Serial.print(bot.x.atMin());
 	Serial.print(&quot; &quot;);
@@ -188,5 +193,5 @@ void loop()
 	Serial.print(&quot; &quot;);
 	Serial.println(bot.z.can_step);
 	delay(1000);
-*/	
+
 }</diff>
      <filename>3Axis_DDA_Tester/3Axis_DDA_Tester.pde</filename>
    </modified>
    <modified>
      <diff>@@ -119,7 +119,7 @@ void CartesianBot::readState()
 
 bool CartesianBot::atTarget()
 {
-	return ((x.current == x.target) &amp;&amp; (y.current == y.target) &amp;&amp; (z.current == z.target));
+	return x.atTarget() &amp;&amp; y.atTarget() &amp;&amp; z.atTarget();
 }
 
 void CartesianBot::setupTimerInterrupt()</diff>
      <filename>library/CartesianBot/CartesianBot.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -45,6 +45,17 @@ bool LinearAxis::atMax()
 	//return digitalRead(this-&gt;max_pin);
 }
 
+/*
+* Used for all axis, depending on stepper direction
+*/
+bool LinearAxis::atTarget()
+{
+	if (this-&gt;stepper.direction == RS_FORWARD)
+		return this-&gt;current &gt;= this-&gt;target;
+	else
+		return this-&gt;current &lt;= this-&gt;target;
+}
+
 void LinearAxis::doStep()
 {
 	//gotta call readState() before you can step again!</diff>
      <filename>library/LinearAxis/LinearAxis.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -34,6 +34,7 @@ class LinearAxis {
 	void doStep();
 	bool atMin();
 	bool atMax();
+	bool atTarget();
 	
 	//various position things.
 	void setPosition(long position);</diff>
      <filename>library/LinearAxis/LinearAxis.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8c3d8cf1e4ff619a7389384f1a7d304a8f7da3c0</id>
    </parent>
  </parents>
  <author>
    <name>Alexandre Girard</name>
    <email>alx.girard@gmail.com</email>
  </author>
  <url>http://github.com/alx/reprap-arduino-firmware/commit/66df61678d3a83a4fa6097bc11610ca28d5f06da</url>
  <id>66df61678d3a83a4fa6097bc11610ca28d5f06da</id>
  <committed-date>2008-05-19T11:45:24-07:00</committed-date>
  <authored-date>2008-05-19T11:45:24-07:00</authored-date>
  <message>Add atTarget on LinearAxis, comparaison jumped with enableTimerInterrupt</message>
  <tree>e41c218f878611a5339a1186379718027ba64e4b</tree>
  <committer>
    <name>Alexandre Girard</name>
    <email>alx.girard@gmail.com</email>
  </committer>
</commit>
