SDKC++ SDK

Haptics

Check haptics capability, set left and right strengths, and clear them before exit.

Current version · 1.0.0

Haptics

Set and clear

if (device.get_device_info().capabilities.haptics) {
    exo.start();
    auto haptics = device.haptics();
    qnbot::ExoHaptics value;
    value.left = 60;
    value.right = 40;
    haptics.set(value);
    // ...
    haptics.clear();
}

Each side is an std::optional<std::uint8_t> in 0…100, and set() requires at least one side. latest() returns the latest confirmed state. The state expires on stop, disconnect, or close and is not replayed after recovery.