OpenLogi
功能(Features)

0x19b0 · hapticFeedback

设备触感马达控制——能力、开关与强度,以及播放指定波形;MX Master 4 的 Actions Ring 即用于此。

控制设备的触感马达:它能播放哪些波形、触感是否启用、强度多大,以及立即播放某个波形。

OpenLogi 在 MX Master 4 上用它实现 Actions Ring 的反馈:高亮格位变化时是轻微的一下,动作执行时则更结实一点。

罗技并未在公开的 HID++ 规格中发布该功能。这里的函数与载荷布局是对照 Solaar 与一台 MX Master 4 交叉验证得到的;新增内容必须以硬件验证为准,而不能靠猜测。

规格: 逆向所得 —— x19b0 hapticFeedback用于: Actions Ring 的悬停与激活反馈。

Function reference

The HapticFeedbackFeature wrapper (0x19b0) exposes:

Methods

FunctionHID++ fnSignatureReturns
get_capabilities0()HapticCapabilities
get_configuration1()HapticConfiguration
set_configuration2(enabled: bool, intensity: HapticIntensity)()
play4(waveform: HapticWaveform)()

All are async and return Result<…, Hidpp20Error>.

Types

HapticCapabilities

FieldTypeDescription
unknown_prefix[u8; 4]Bytes whose meaning has not yet been verified.
waveformsSupportedWaveformsSupported waveform mask.

SupportedWaveforms

A bitflags mask; unknown bits are retained so newer firmware doesn't silently lose capability information.

FlagBitDescription
DAMP_STATE_CHANGE1A damp state-change pulse, used after activating a ring action.
SUBTLE_COLLISION4A subtle collision pulse, used when the highlighted ring slot changes.

HapticWaveform

VariantValueDescription
DampStateChange1Confirmation pulse used when an action runs.
SubtleCollision4Light boundary pulse used for hover transitions.

HapticConfiguration

FieldTypeDescription
enabledboolWhether firmware haptic playback is enabled.
intensityHapticIntensityCurrent intensity percentage.
level_countu8Number of discrete levels advertised by the firmware.
level_stepu8Percentage step between discrete levels.

HapticIntensity

A validated 0100 percentage: HapticIntensity::new(value) returns None above HapticIntensity::MAX (100), so an out-of-range intensity can never reach the wire.

Wire format

FunctionRequestResponse
0 get_capabilities[0x00, 0x00, 0x00]bytes 0–3 unverified prefix; bytes 4–7 big-endian u32 waveform mask
1 get_configuration[0x00, 0x00, 0x00]byte 0 enabled (0/1); byte 1 intensity percent; byte 2 high nibble = level step, low nibble = level count
2 set_configuration[enabled, intensity, 0x00]
4 play[waveform, 0x00, 0x00]

An enabled byte other than 0/1, or an intensity above 100, fails as Hidpp20Error::UnsupportedResponse rather than being coerced.

Usage (Rust)

use hidpp::{
    device::Device,
    feature::haptic_feedback::{HapticFeedbackFeature, HapticIntensity, HapticWaveform},
};

// device: &mut Device, already created via Device::new(channel, index)
device.enumerate_features().await?;

if let Some(feat) = device.get_feature::<HapticFeedbackFeature>() {
    let caps = feat.get_capabilities().await?;
    println!("waveforms: {:?}", caps.waveforms);

    if let Some(intensity) = HapticIntensity::new(60) {
        feat.set_configuration(true, intensity).await?;
    }
    feat.play(HapticWaveform::SubtleCollision).await?;
}

本页目录