   }
 
   if(currentConveyorStatus == START_ROTATING_CONVEYOR){
-    conveyorStopTime = millis() + (long)abs(conveyorRotationTime);   
+    conveyorStopTime = millis() + (long)currentConveyorCommand.duration*1000;   
     driveConveyor();
     currentConveyorStatus = ROTATING_CONVEYOR;
   }


//variable which disables all motor movement when set to TRUE.
boolean e_stop = false;



//<----------------- Excavator State machine ------------->

  // Initialize ROS stuff
  excavatorNode.initNode();
  excavatorNode.subscribe(commandSubscriber);
  excavatorNode.subscribe(conveyorSubscriber);
  excavatorNode.subscribe(setActualStepCount);
  setupExcavatorStatus();

  pinMode(DIRECTION_PIN, OUTPUT);
