Public Member Functions | Public Attributes | Static Private Attributes
wiimote.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 wiimote.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.

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 wiimote.wiistate.WIIState.setAccelerometerCalibration (   cls,
  zeroReading,
  oneReading 
)
Set the current accelerometer zeroing calibration.

Definition at line 262 of file wiistate.py.

def wiimote.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 wiimote.wiistate.WIIState.setNunchukAccelerometerCalibration (   cls,
  zeroReading,
  oneReading 
)
Set the current nunchuk accelerometer zeroing calibration.

Definition at line 301 of file wiistate.py.

Set the origin for the nunchuk joystick

Definition at line 311 of file wiistate.py.


Member Data Documentation

Definition at line 77 of file wiistate.py.

Definition at line 78 of file wiistate.py.

Definition at line 80 of file wiistate.py.

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, Mark Horn
autogenerated on Sun Jul 9 2017 02:34:58