|
Treehopper C# API
|
Nintendo Wii Classic Controller More...
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 |
Nintendo Wii Classic Controller
| WiiClassicController | ( | I2C | i2c | ) |
| async Task UpdateAsync | ( | ) |
Requests a reading from the sensor and updates its data properties with the gathered values.
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.
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
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.
|
getset |
| DPadStateEventHandler DPadStateChanged |
| PropertyChangedEventHandler PropertyChanged |