-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
Description
Describe the bug
My JoyHub Pearlconch device supports rotation. This is reflected in its properties. However, calling device.rotate() errors out, telling me rotation is not supported. I am able to use rotation manually via IntiFace GUI. Vibration works fine.
Logging out device.rotateAttributes results in an empty array. The device object itself clearly shows the rotation function tho. Seems like the library is misinterpreting feature data, but that's just an educated guess.
Expected behavior
The device should rotate.
Additional context
Example Code (TypeScript):
import Buttplug from "buttplug";
import type { ButtplugClientDevice } from "buttplug";
const connector = new Buttplug.ButtplugBrowserWebsocketClientConnector(
"ws://127.0.0.1:12345",
);
const client = new Buttplug.ButtplugClient("ButtplugControl");
client.addListener("deviceadded", async (device: ButtplugClientDevice) => {
console.log(`+ ${device.name}`);
await device.rotate(1);
await new Promise((r) => setTimeout(r, 10000));
await device.stop();
});
await client.connect(connector);
await client.startScanning();Resulting Error:
error: Uncaught (in promise) Error: Device JoyHub Pearlconch has no Rotate capabilities
Device object, clearly showing rotate capability:
{
"_events": {},
"_eventsCount": 0,
"_deviceInfo": {
"DeviceIndex": 0,
"DeviceName": "JoyHub Pearlconch",
"DeviceMessages": {
"ScalarCmd": [
{
"FeatureDescriptor": "",
"ActuatorType": "Rotate",
"StepCount": 255,
"Index": 0
},
{
"FeatureDescriptor": "",
"ActuatorType": "Vibrate",
"StepCount": 255,
"Index": 1
}
],
"StopDeviceCmd": {}
}
},
"allowedMsgs": {}
}