Package ckbot :: Module hitec :: Class MotorModule
[hide private]
[frames] | no frames]

Class MotorModule

source code


TBD

Instance Methods [hide private]
 
__init__(self, node_id, typecode, pna, *argv, **kwarg)
Concrete constructor.
source code
 
set_speed(self, val)
Sets speed of the module, with safety checks.
source code
 
_ensure_zero_pos(self)
(private)
source code
 
set_speed_UNSAFE(self, val)
Sets speed of the module, without any validity checking
source code

Inherited from HitecModule: getEEPROM, go_slack, is_slack

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

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

Class Methods [hide private]

Inherited from ckmodule.Module: newFromDiscovery

Class Variables [hide private]
  SPEED_LOWER = -450
  SPEED_UPPER = 450
  RPM_CONVERSION = 1

Inherited from ckmodule.Module: Types

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, node_id, typecode, pna, *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_speed(self, val)

source code 

Sets speed of the module, with safety checks.

INPUT:
  val -- units in between SPEED_LOWER and SPEED_UPPER

_ensure_zero_pos(self)

source code 

(private)

Asynchronously request the zero position from the servo, and parse the response if it appeared.

set_speed_UNSAFE(self, val)

source code 

Sets speed of the module, without any validity checking

INPUT:
  val -- units in RPM  

Do not use values outside the range SPEED_LOWER to SPEED_UPPER,
otherwise the command may be ignored