org.reprap.devices
Class NullStepperMotor
java.lang.Object
org.reprap.Device
org.reprap.devices.GenericStepperMotor
org.reprap.devices.NullStepperMotor
- All Implemented Interfaces:
- AxisMotor
public class NullStepperMotor
- extends GenericStepperMotor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NullStepperMotor
public NullStepperMotor(int motorId)
- Parameters:
motorId
-
isAvailable
public boolean isAvailable()
- Is the comms working?
- Returns:
wasAvailable
public boolean wasAvailable()
refreshPreferences
public void refreshPreferences()
- Description copied from interface:
AxisMotor
- Reload the preferences
dispose
public void dispose()
- Dispose of this object
waitTillNotBusy
public void waitTillNotBusy()
throws java.io.IOException
- Throws:
java.io.IOException
queuePoint
public boolean queuePoint(int endX,
int endY,
int movementSpeed,
int control)
throws java.io.IOException
- Add an XY point to the firmware buffer for plotting
Only works for recent firmware.
- Parameters:
endX
- endY
- movementSpeed
-
- Returns:
-
- Throws:
java.io.IOException
setSpeed
public void setSpeed(int speed)
throws java.io.IOException
- Set the motor speed (or turn it off)
- Parameters:
speed
- A value between -255 and 255.
- Throws:
ReprapException
java.io.IOException
setIdle
public void setIdle()
throws java.io.IOException
- Throws:
java.io.IOException
stepForward
public void stepForward()
throws java.io.IOException
- Throws:
java.io.IOException
stepBackward
public void stepBackward()
throws java.io.IOException
- Throws:
java.io.IOException
resetPosition
public void resetPosition()
throws java.io.IOException
- Throws:
java.io.IOException
setPosition
public void setPosition(int position)
throws java.io.IOException
- Parameters:
position
-
- Throws:
java.io.IOException
getPosition
public int getPosition()
throws java.io.IOException
- Returns:
- current position of the motor
- Throws:
java.io.IOException
seek
public void seek(int speed,
int position)
throws java.io.IOException
- Parameters:
speed
- position
-
- Throws:
java.io.IOException
seekBlocking
public void seekBlocking(int speed,
int position)
throws java.io.IOException
- Parameters:
speed
- position
-
- Throws:
java.io.IOException
getRange
public AxisMotor.Range getRange(int speed)
throws java.io.IOException
- Parameters:
speed
-
- Returns:
- range of the motor
- Throws:
java.io.IOException
InvalidPayloadException
homeReset
public void homeReset(int speed)
throws java.io.IOException
- Parameters:
speed
-
- Throws:
java.io.IOException
InvalidPayloadException
setSync
public void setSync(byte syncType)
throws java.io.IOException
- Parameters:
syncType
-
- Throws:
java.io.IOException
dda
public void dda(int speed,
int x1,
int deltaY)
throws java.io.IOException
- Parameters:
speed
- x1
- deltaY
-
- Throws:
java.io.IOException
setMaxTorque
public void setMaxTorque(int maxTorque)
throws java.io.IOException
- Parameters:
maxTorque
- An integer value 0 to 100 representing the maximum torque percentage
- Throws:
java.io.IOException