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
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.