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:
@@ -96,7 +96,7 @@ export class ButtplugClient extends EventEmitter {
|
||||
const leftoverMsgs = this._sorter.ParseIncomingMessages(msgs);
|
||||
for (const x of leftoverMsgs) {
|
||||
if (x.DeviceList !== undefined) {
|
||||
this.parseDeviceList(x as Messages.DeviceList);
|
||||
this.parseDeviceList(x.DeviceList!);
|
||||
break;
|
||||
} else if (x.ScanningFinished !== undefined) {
|
||||
this._isScanning = false;
|
||||
|
||||
@@ -81,7 +81,7 @@ export class ButtplugClientDeviceFeature {
|
||||
}
|
||||
|
||||
public get featureDescriptor(): string {
|
||||
return this._feature.FeatureDescriptor;
|
||||
return this._feature.FeatureDescription;
|
||||
}
|
||||
|
||||
public get featureIndex(): number {
|
||||
|
||||
@@ -112,7 +112,7 @@ export interface ServerInfo {
|
||||
}
|
||||
|
||||
export interface DeviceFeature {
|
||||
FeatureDescriptor: string;
|
||||
FeatureDescription: string;
|
||||
Output: { [key: string]: DeviceFeatureOutput };
|
||||
Input: { [key: string]: DeviceFeatureInput };
|
||||
FeatureIndex: number;
|
||||
|
||||
Reference in New Issue
Block a user