EvoGameController#
- class EvoGameController(ble=None, debug=False)#
BLE gamepad reader for Evo controller input.
- set_debug(enabled)#
Enable or disable debug logging.
- Returns:
None.
- isConnected()#
Check whether a controller is connected.
- Returns:
Boolean.
- latest_raw()#
Read the latest raw controller packet.
- Returns:
Raw bytes-like packet, or
Nonebefore a packet is received.
- isPressed(mask)#
Test whether a button bit mask is currently active.
- Returns:
Boolean.
- getLX()#
- getLY()#
- getRX()#
- getRY()#
Read the normalized left or right stick axis.
- Returns:
Floating-point axis value, typically from
-1.0to1.0.
- state()#
Return the current decoded controller state.
- Returns:
Dictionary containing connection state, axes, triggers and button bits.
- begin(timeout_ms=5000)#
- begin_by_name(name_pattern, match=..., timeout_ms=5000)#
- begin_by_address(addr_type, addr, timeout_ms=5000)#
Scan for and connect to a BLE controller.
- Returns:
Trueon success, otherwiseFalse.
- disconnect()#
Disconnect from the active controller if one is connected.
- Returns:
None.
- update()#
Process pending BLE state and decode the latest input packet.
- Returns:
Truewhen still connected and updated successfully, otherwiseFalse.
- calibrate()#
Calibrate stick center values from the latest raw controller packet.
- Returns:
Truewhen calibration data was available, otherwiseFalse.