Package joy :: Module mxr :: Class ServoWrapperMX
[hide private]
[frames] | no frames]

Class ServoWrapperMX

source code


Instance Methods [hide private]
 
__init__(self, servo, logger=None, **kw)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_ang2srv(self, ang)
Convert cycle angle (range 0..1) to servo position
source code
 
_srv2ang(self, srv)
Convert cycle angle (range 0..1) to servo position
source code
 
doCtrl(self)
execute an interaction of the controller update loop
source code
 
_set_servo(self)
(private) set module in servo mode
source code
 
_set_motor(self)
(private) set module in motor mode
source code
 
set_ang(self, ang) source code
 
get_ang(self) source code
 
get_v(self)
Get a velocity estimate
source code
 
_clearV(self)
Clear state of velocity estimator
source code
 
_updateV(self, ang)
Push angle measurement into velocity estimator
source code
 
_set_rpm(self, rpm)
Push an RPM setting to the motor
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, servo, logger=None, **kw)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

_ang2srv(self, ang)

source code 

Convert cycle angle (range 0..1) to servo position

Angle 0 is mapped to .posOfs, growing in direction .ori

_srv2ang(self, srv)

source code 

Convert cycle angle (range 0..1) to servo position

Angle 0 is mapped to .posOfs, growing in direction .ori

_set_servo(self)

source code 

(private) set module in servo mode

also configures the _ensure_* callbacks so that _ensure_* only sends command to motor once

_set_motor(self)

source code 

(private) set module in motor mode

also configures the _ensure_* callbacks so that _ensure_* only sends command to motor once