See WheelApiOptions.
Whether a previously authorized wheel connects automatically when plugged in. Set with WheelApiOptions.autoConnect.
Current firmware release type.
Release type number, or null if no state has been received.
Current firmware version string.
Version string (e.g., "1.2.3"), or null if no state has been
received.
Device connection status.
true if connected and opened.
Last received device state.
Device state, or null if no state received yet.
Current wheel position in degrees.
Position in degrees, or null if no state has been received or
the motion range is unknown.
Current torque normalized to [-100, 100] range.
Normalized torque, or null if no state has been received.
Optionalcontext: anyOpens the browser's device picker to connect to a wheel.
true if a device was connected, false if the user closed the
picker without selecting one.
Cleans up all resources and event listeners. Must be called when the API instance is no longer needed.
A WheelApi.connect or WheelApi.tryAutoConnect call that is
still pending rejects instead of connecting; destroy() resolves once it
has finished.
Disconnects from the current device. A connection in progress finishes first.
Calls each of the listeners registered for a given event.
Return an array listing the events for which the emitter has registered listeners.
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Optionalfn: (...args: ArgumentMap<WheelEvents>[Extract<T, keyof WheelEvents>]) => voidOptionalcontext: anyOptionalonce: booleanAdd a listener for a given event.
Optionalcontext: anyAdd a one-time listener for a given event.
Optionalcontext: anyReads the current ADC extension settings from the device.
ADC settings object.
Reads all settings from the device sequentially.
Object containing all settings groups.
Reads the current effect settings from the device.
Effect settings object.
Reads the firmware license information from the device.
Firmware license object.
Reads the current GPIO extension settings from the device.
GPIO settings object.
Reads the current hardware settings from the device.
Hardware settings object.
Reboots the controller without saving settings.
Remove all listeners, or those of the specified event.
Optionalevent: keyof WheelEventsRemove the listeners of a given event.
Optionalfn: (...args: ArgumentMap<WheelEvents>[Extract<T, keyof WheelEvents>]) => voidOptionalcontext: anyOptionalonce: booleanSets the current wheel position as center.
Saves the current settings to flash and reboots the controller. Settings that only apply on save take effect after the reboot.
Sends direct force feedback control to the device.
Force feedback control values.
Sends the firmware activation key to the device. Nothing is sent if the device already reports itself as registered.
Three hexadecimal segments separated by -, for example
"0123ABCD-4567EF01-89ABCDEF".
Writes a single setting value to the device.
The setting field to write.
Index for array settings, such as the pin for
SettingField.PinMode; 0 for other settings.
The value to write.
Values are rounded to the nearest integer and clamped to the range of the field's wire type.
SettingField.ForceEnabled, SettingField.AmplifierGain, SettingField.PinMode and SettingField.ResetCenterOnZ0 only take effect, and read back with the new value, after WheelApi.saveAndReboot.
Switches the device to DFU mode for firmware updates.
StaticisChecks whether the current environment supports WebHID.
false outside browsers (for example during server-side
rendering) and in browsers without WebHID.
WebHID-based API for communicating with the wheel controller.
Example