ckbot :: ckmodule :: AbstractServoModule :: Class AbstractServoModule
[hide private]
[frames] | no frames]

Class AbstractServoModule

source code



Abstract superclass of servo modules. These support additional functionality 
associated with position servos:

.set_pos -- sets position of the module. -- units in 100s of degrees between 
  -9000 and 9000. This is a "safe" version, which only accepts legal values
.set_pos_UNSAFE -- sets position of module, without any validity checking
.get_pos -- reads current position (may be at offset from set_pos, even without load)
.go_slack -- makes the servo go limp
.is_slack -- return True if and only if module is slack

Instance Methods [hide private]
 
__init__(self, *argv, **kwarg)
Concrete constructor.
source code
 
go_slack(self)
Makes the servo go limp
source code
 
set_pos_UNSAFE(self, val)
Sets position of the module, without any validity checking
source code
 
set_pos(self, val)
Sets position of the module, with safety checks.
source code
 
get_pos(self)
Gets the actual position of the module
source code
 
get_pos_async(self)
Asynchronously gets the actual position of the module
source code
 
is_slack(self)
Gets the actual position of the module
source code

Inherited from Module: get_od, iterattr, iterhwaddr, iterprop, reset, start, stop

Inherited from Module (private): _getAttrProperty, _getModAttrOfClp

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from Module: newFromDiscovery

Class Variables [hide private]
  POS_UPPER = 9000
  POS_LOWER = -9000

Inherited from Module: Types

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *argv, **kwarg)
(Constructor)

source code 

Concrete constructor. 

ATTRIBUTES:
  node_id -- 7 bit number to address a module uniquely
  typecode -- version number of module code 
  pna -- ProtocolNodeAdaptor -- specialized for this node_id

Overrides: object.__init__
(inherited documentation)

set_pos_UNSAFE(self, val)

source code 

Sets position of the module, without any validity checking

INPUT:
  val -- units in 100s of degrees between -9000 and 9000

set_pos(self, val)

source code 

Sets position of the module, with safety checks.

INPUT:
  val -- units in 100s of degrees between -9000 and 9000