Treehopper C# API
WiiClassicController Class Reference

Nintendo Wii Classic Controller More...

Inheritance diagram for WiiClassicController:
IPollable IPolledEvents IPollable

Public Member Functions

 WiiClassicController (I2C i2c)
 
async Task UpdateAsync ()
 Requests a reading from the sensor and updates its data properties with the gathered values. More...
 

Properties

Button R [get]
 
Button L [get]
 
Button ZL [get]
 
Button ZR [get]
 
Button Home [get]
 
Button Plus [get]
 
Button Minus [get]
 
Button A [get]
 
Button B [get]
 
Button X [get]
 
Button Y [get]
 
DPadState DPad [get]
 
Vector2 LeftStick [get]
 
Vector2 RightStick [get]
 
double LeftTriggerForce [get]
 
double RightTriggerForce [get]
 
bool AutoUpdateWhenPropertyRead = true [get, set]
 Gets or sets whether reading from the sensor's properties should request updates from the sensor automatically (defaults to true). More...
 
int AwaitPollingInterval = 25 [get, set]
 

Events

DPadStateEventHandler DPadStateChanged
 
PropertyChangedEventHandler PropertyChanged
 

Detailed Description

Nintendo Wii Classic Controller

Constructor & Destructor Documentation

◆ WiiClassicController()

Member Function Documentation

◆ UpdateAsync()

async Task UpdateAsync ( )

Requests a reading from the sensor and updates its data properties with the gathered values.

Returns
An awaitable Task

Note that when AutoUpdateWhenPropertyRead is true (which it is, by default), this method is implicitly called when any sensor data property is read from — there's no need to call this method unless you set AutoUpdateWhenPropertyRead to false.

Unless otherwise noted, this method updates all sensor data simultaneously, which can often lead to more efficient bus usage (as well as reducing USB chattiness).

Implements IPollable.

Property Documentation

◆ R

Button R
get

◆ L

Button L
get

◆ ZL

Button ZL
get

◆ ZR

Button ZR
get

◆ Home

Button Home
get

◆ Plus

Button Plus
get

◆ Minus

Button Minus
get

◆ A

Button A
get

◆ B

Button B
get

◆ X

Button X
get

◆ Y

Button Y
get

◆ DPad

DPadState DPad
get

◆ LeftStick

Vector2 LeftStick
get

◆ RightStick

Vector2 RightStick
get

◆ LeftTriggerForce

double LeftTriggerForce
get

◆ RightTriggerForce

double RightTriggerForce
get

◆ AutoUpdateWhenPropertyRead

bool AutoUpdateWhenPropertyRead = true
getset

Gets or sets whether reading from the sensor's properties should request updates from the sensor automatically (defaults to true).

By default, whenever you access one of the properties of this sensor, a new reading will be fetched. If this property is set to false, you must manually call the UpdateAsync() method to retrieve a new sensor reading.

◆ AwaitPollingInterval

int AwaitPollingInterval = 25
getset

Event Documentation

◆ DPadStateChanged

DPadStateEventHandler DPadStateChanged

◆ PropertyChanged

PropertyChangedEventHandler PropertyChanged

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