Public Member Functions | Public Attributes | Static Private Attributes
wiistate.WIIState Class Reference

List of all members.

Public Member Functions

def __init__
def __repr__
def __str__
def getAccelerometerCalibration
def getGyroCalibration
def getNunchukAccelerometerCalibration
def setAccelerometerCalibration
def setGyroCalibration
def setNunchukAccelerometerCalibration
def setNunchukJoystickCalibration

Public Attributes

 acc
 accRaw
 angleRageRaw
 angleRate
 angleRateRaw
 ascTime
 battery
 buttons
 classicButtons
 classicPresent
 classicStickLeft
 classicStickRight
 IRSources
 motionPlusPresent
 nunchukAcc
 nunchukAccRaw
 nunchukButtons
 nunchukPresent
 nunchukStick
 nunchukStickRaw
 rumble
 time

Static Private Attributes

 _accCalibrationZero = None
 _gyroZeroReading = None
 _nunchukJoystickZero = None
 _nunchukZeroReading = None

Detailed Description

Holds the state of a WIIRemote-plus.

    The state is passed in and is as communicated
    by one message from the WII+ device. We unpack 
    the information and place it into individual 
    dictionaries for callers to grab.
    
    Public instance variables:
      o time             Time in fractional seconds since beginning of Epoch of when 
                           state was measured (Float).
      o ascTime          Time when state was measured (Human-readable)
      o rumble           True/False if wiimote vibration is on/off
      o angleRate        A GyroReading instance containing gyro (a.k.a. angular rate) measurement
      o acc              A WIIReading instance containing accelerometer measurement corrected by
                           the calibration information that is stored in the Wiimote
      o accRaw           A WIIReading instance containing accelerometer measurement uncorrected
      o buttons          A dictionary for which buttons are being held down. That could be
                           multiple buttons. Keys are:
                                 BTN_1, BTN_2, BTN_PLUS, BTN_MINUS, BTN_A, BTN_B,
                                 BTN_UP, BTN_DOWN, BTN_LEFT, BTN_RIGHT, BTN_HOME
                           Values are 1/0
      o IRSources        Dictionary with on/off values for which IR lights are
                         being sensed. Keys are:
                                 IR1, IR2, IR3, IR4
                         Values are 1/0
      o motionPlusPresent True if a gyro Motion+ is plugged into the Wiimote. Else False

      o nunchukPresent   True if nunchuk is plugged in. Else False
      o nunchukAccRaw    A WIIReading instance with acceleromoter measurement from the nunchuk (raw values)
      o nunchukAcc       The same, but zeroed using factory calibration
      o nunchukStickRaw  A tuple with the two axes of the joystick on the nunchuk, raw readings
      o nunchukStick     A tuple with the two axes of the joystick on the nunchuk, zeroed to be [-1, 1]
      o nunchukButtons   A dictionary for which nunchuk buttons are down. Keys are BTN_C and BTN_Z

    Public methods:
      o setAccelerometerCalibration   Bias setting for accelerometer. This triplet is used to
                                        turn raw accelerometer values into calibrated values.
      o setGyroCalibration            Bias setting for gyro. This triplet is used to
                                        turn raw gyro values into calibrated values.

Definition at line 35 of file wiistate.py.


Constructor & Destructor Documentation

def wiistate.WIIState.__init__ (   self,
  state,
  theTime,
  theRumble,
  buttonStatus 
)
Unpack the given state, normalizing if normalizers are passed in.

Definition at line 86 of file wiistate.py.


Member Function Documentation

Definition at line 421 of file wiistate.py.

def wiistate.WIIState.__str__ (   self)

Definition at line 330 of file wiistate.py.

Return current accelerometer zeroing offset as two lists of x/y/z: the 
zero-reading, and the one-reading.

Definition at line 272 of file wiistate.py.

Return current gyro zeroing offset as a list of x/y/z. 

Definition at line 292 of file wiistate.py.

Return current nunchuk accelerometer zeroing offset as two lists of x/y/z: the 
zero-reading, and the one-reading.

Definition at line 320 of file wiistate.py.

def wiistate.WIIState.setAccelerometerCalibration (   cls,
  zeroReading,
  oneReading 
)
Set the current accelerometer zeroing calibration.

Definition at line 262 of file wiistate.py.

def wiistate.WIIState.setGyroCalibration (   cls,
  zeroReading 
)
Set the x/y/z zeroing offsets for the gyro. Argument is a list

Definition at line 282 of file wiistate.py.

def wiistate.WIIState.setNunchukAccelerometerCalibration (   cls,
  zeroReading,
  oneReading 
)
Set the current nunchuk accelerometer zeroing calibration.

Definition at line 301 of file wiistate.py.

def wiistate.WIIState.setNunchukJoystickCalibration (   cls,
  readings 
)
Set the origin for the nunchuk joystick

Definition at line 311 of file wiistate.py.


Member Data Documentation

wiistate.WIIState::_accCalibrationZero = None [static, private]

Definition at line 77 of file wiistate.py.

wiistate.WIIState::_gyroZeroReading = None [static, private]

Definition at line 78 of file wiistate.py.

wiistate.WIIState::_nunchukJoystickZero = None [static, private]

Definition at line 80 of file wiistate.py.

wiistate.WIIState::_nunchukZeroReading = None [static, private]

Definition at line 79 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.

Definition at line 86 of file wiistate.py.


The documentation for this class was generated from the following file:


wiimote
Author(s): Andreas Paepcke, Melonee Wise
autogenerated on Mon Oct 6 2014 01:06:37