public synchronized void enableMotor() throws RetryException { String command = _getToolCode(); if (fiveD == false) { if (machine.currentTool().getMotorDirection() == ToolModel.MOTOR_CLOCKWISE) command += "M101"; else command += "M102"; sendCommand(command); } else { extrusionUpdater.setDirection( machine.currentTool().getMotorDirection() == 1 ? Direction.forward : Direction.reverse); extrusionUpdater.startExtruding(); } super.enableMotor(); }
public void updateManualControl() { try { extrusionUpdater.update(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
/** * ************************************************************************* Motor interface * functions * * @throws RetryException ************************************************************************ */ public void setMotorRPM(double rpm, int toolhead) throws RetryException { if (fiveD == false) { sendCommand(_getToolCode() + "M108 R" + df.format(rpm)); } else { extrusionUpdater.setFeedrate(rpm); } super.setMotorRPM(rpm, toolhead); }
public void disableMotor() throws RetryException { if (fiveD == false) { sendCommand(_getToolCode() + "M103"); } else { extrusionUpdater.stopExtruding(); } super.disableMotor(); }