SDKPython SDK

Haptics

Check device capability, set left and right strengths from 0 to 100, and clear them safely.

Current version · 1.4.0

Haptics

Set and clear

from qnbot_sdk.exo import ExoHaptics

if device.get_device_info().capabilities.haptics:
    exo.start()
    haptics = device.haptics()
    haptics.set(ExoHaptics(left=60, right=40))
    # ...
    haptics.clear()

left and right range from 0 to 100. Either side may be omitted, but set() requires at least one value. A None side is not changed by that update. haptics.latest() returns the latest confirmed state.

The retained state becomes invalid when the device stops, disconnects, or closes, so latest() returns None. The SDK does not publish a synthetic zero-valued sample and does not replay the pre-disconnect command after recovery; only a newly confirmed command creates readable state again. While the device is still connected, call clear() before normal shutdown to drive the physical outputs to zero.