Id - Servo Id Type usedpublic class DefaultServoConfig<Id> extends PropertyChangeNotifier implements ServoConfig<Id>
PROP_DEF_POSITION, PROP_ID, PROP_MAX_POSITION, PROP_MIN_POSITION, PROP_NAME| Constructor and Description |
|---|
DefaultServoConfig(Id servoId,
String name,
int minPos,
int maxPos,
int defPos)
Creates a new ServoConfig with the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDefaultPosition()
Returns the Servo default position.
|
int |
getMaxPosition()
Returns the Servo maximum position.
|
int |
getMinPosition()
Returns the Servo minimum position.
|
String |
getName()
Returns the Servo name.
|
Id |
getServoId()
Returns the Servo id.
|
void |
setDefaultPosition(Integer pos)
Sets the Servo default position.
|
void |
setMaxPosition(Integer pos)
Sets the Servo maximum position.
|
void |
setMinPosition(Integer pos)
Sets the Servo minimum position.
|
void |
setName(String name)
Sets the Servo name.
|
void |
setServoId(Id id)
Sets the Servo id.
|
addPropertyChangeListener, addPropertyChangeListener, clearAllListeners, clearListeners, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, hasListeners, removePropertyChangeListener, removePropertyChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListenerpublic DefaultServoConfig(Id servoId, String name, int minPos, int maxPos, int defPos)
servoId - The Servo's Id with respect to the ServoControllername - Servo name (used for display purposes)minPos - minimum position in absolute terms for the ServoControllermaxPos - maximum position in absolute terms for the ServoControllerdefPos - default position in absolute terms for the ServoControllerpublic Id getServoId()
getServoId in interface ServoConfig<Id>public void setServoId(Id id)
setServoId in interface ServoConfig<Id>id - new Servo idpublic String getName()
getName in interface ServoConfig<Id>public void setName(String name)
setName in interface ServoConfig<Id>name - new Servo namepublic int getMinPosition()
getMinPosition in interface ServoConfig<Id>public void setMinPosition(Integer pos)
setMinPosition in interface ServoConfig<Id>pos - new Servo minimum positionpublic int getMaxPosition()
getMaxPosition in interface ServoConfig<Id>public void setMaxPosition(Integer pos)
setMaxPosition in interface ServoConfig<Id>pos - new Servo maximum positionpublic int getDefaultPosition()
getDefaultPosition in interface ServoConfig<Id>public void setDefaultPosition(Integer pos)
setDefaultPosition in interface ServoConfig<Id>pos - new Servo default positionCopyright © 2011-2014. All Rights Reserved.