fix: resolve device listing bug after buttplug v10 upgrade

Unwrap DeviceList wrapper message before passing to parseDeviceList(),
and rename FeatureDescriptor to FeatureDescription to match Rust v10 serde output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 12:11:53 +01:00
parent 27d86fff8b
commit 82be8b8859
3 changed files with 3 additions and 3 deletions

View File

@@ -96,7 +96,7 @@ export class ButtplugClient extends EventEmitter {
const leftoverMsgs = this._sorter.ParseIncomingMessages(msgs); const leftoverMsgs = this._sorter.ParseIncomingMessages(msgs);
for (const x of leftoverMsgs) { for (const x of leftoverMsgs) {
if (x.DeviceList !== undefined) { if (x.DeviceList !== undefined) {
this.parseDeviceList(x as Messages.DeviceList); this.parseDeviceList(x.DeviceList!);
break; break;
} else if (x.ScanningFinished !== undefined) { } else if (x.ScanningFinished !== undefined) {
this._isScanning = false; this._isScanning = false;

View File

@@ -81,7 +81,7 @@ export class ButtplugClientDeviceFeature {
} }
public get featureDescriptor(): string { public get featureDescriptor(): string {
return this._feature.FeatureDescriptor; return this._feature.FeatureDescription;
} }
public get featureIndex(): number { public get featureIndex(): number {

View File

@@ -112,7 +112,7 @@ export interface ServerInfo {
} }
export interface DeviceFeature { export interface DeviceFeature {
FeatureDescriptor: string; FeatureDescription: string;
Output: { [key: string]: DeviceFeatureOutput }; Output: { [key: string]: DeviceFeatureOutput };
Input: { [key: string]: DeviceFeatureInput }; Input: { [key: string]: DeviceFeatureInput };
FeatureIndex: number; FeatureIndex: number;