alos make sure stepticker handles ablock with no steps on any motor
authorJim Morris <morris@wolfman.com>
Mon, 27 Jun 2016 06:39:50 +0000 (23:39 -0700)
committerJim Morris <morris@wolfman.com>
Mon, 27 Jun 2016 06:39:50 +0000 (23:39 -0700)
src/libs/StepTicker.cpp
src/modules/robot/Conveyor.cpp

index b135c76..f768a5c 100644 (file)
@@ -262,6 +262,11 @@ bool StepTicker::start_next_block()
     if(ok) {
         SET_STEPTICKER_DEBUG_PIN(1);
         return true;
+
+    }else{
+        // this is an edge condition that should never happen, but we need to discard this block if it ever does
+        // basically it is a block that has zero steps for all motors
+        THECONVEYOR->block_finished();
     }
 
     return false;
index 8af3dd1..db9015c 100644 (file)
@@ -110,7 +110,7 @@ void Conveyor::on_idle(void*)
         } else {
             // Cleanly delete block
             Block* block = queue.tail_ref();
-            block->debug();
+            //block->debug();
             block->clear();
             queue.consume_tail();
         }