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
| Function | HID++ fn | Signature | Returns |
|---|---|---|---|
get_capabilities | 0 | () | HapticCapabilities |
get_configuration | 1 | () | HapticConfiguration |
set_configuration | 2 | (enabled: bool, intensity: HapticIntensity) | () |
play | 4 | (waveform: HapticWaveform) | () |
All are async and return Result<…, Hidpp20Error>.
Types
HapticCapabilities
| Field | Type | Description |
|---|---|---|
unknown_prefix | [u8; 4] | Bytes whose meaning has not yet been verified. |
waveforms | SupportedWaveforms | Supported waveform mask. |
SupportedWaveforms
A bitflags mask; unknown bits are retained so newer firmware doesn't silently lose capability information.
| Flag | Bit | Description |
|---|---|---|
DAMP_STATE_CHANGE | 1 | A damp state-change pulse, used after activating a ring action. |
SUBTLE_COLLISION | 4 | A subtle collision pulse, used when the highlighted ring slot changes. |
HapticWaveform
| Variant | Value | Description |
|---|---|---|
DampStateChange | 1 | Confirmation pulse used when an action runs. |
SubtleCollision | 4 | Light boundary pulse used for hover transitions. |
HapticConfiguration
| Field | Type | Description |
|---|---|---|
enabled | bool | Whether firmware haptic playback is enabled. |
intensity | HapticIntensity | Current intensity percentage. |
level_count | u8 | Number of discrete levels advertised by the firmware. |
level_step | u8 | Percentage step between discrete levels. |
HapticIntensity
A validated 0–100 percentage: HapticIntensity::new(value) returns None
above HapticIntensity::MAX (100), so an out-of-range intensity can never
reach the wire.
Wire format
| Function | Request | Response |
|---|---|---|
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?;
}