Grupo T / Mbed OS GRUPOT
Revision:
6:af32c68ff4cf
Parent:
5:0cbf491f703d
Child:
7:27ea14e58788
--- a/main.cpp	Thu May 03 17:47:14 2018 +0000
+++ b/main.cpp	Thu May 03 18:00:40 2018 +0000
@@ -133,6 +133,7 @@
     
     int max_val;
     
+    // maior número de passos -------
     if(x_step > y_step){
         if(x_step > z_step){
             max_val = x_step;
@@ -148,17 +149,17 @@
     }
     
     for(int i = 0; i < max_val; i++){
-        if(i > x_step){
+        if(i >= x_step){
             stepX = 0;
         }
         else { stepX = 1; }
         
-        if(i > y_step){
+        if(i >= y_step){
             stepY = 0;
         }
         else { stepY = 1; }
         
-        if(i > z_step){
+        if(i >= z_step){
             stepZ = 0;
         }
         else { stepZ = 1; }