diff --git a/crates/buttplug_server/src/device/protocol_impl/mod.rs b/crates/buttplug_server/src/device/protocol_impl/mod.rs index d1a54d2ae..68fd44825 100644 --- a/crates/buttplug_server/src/device/protocol_impl/mod.rs +++ b/crates/buttplug_server/src/device/protocol_impl/mod.rs @@ -107,6 +107,7 @@ pub mod sexverse_v2; pub mod sexverse_v3; pub mod sexverse_v4; pub mod sexverse_v5; +pub mod sexverse_v6; pub mod simulated; pub mod svakom; pub mod synchro; @@ -460,6 +461,10 @@ pub fn get_default_protocol_map() -> HashMap Result, ButtplugDeviceError> { + let vibe = self.vibe_speed.load(Ordering::Relaxed); + let osc = self.osc_speed.load(Ordering::Relaxed); + let suck = self.suck_speed.load(Ordering::Relaxed); + Ok(vec![ + HardwareWriteCmd::new( + &[SEXVERSE_PROTOCOL_UUID], + Endpoint::Tx, + vec![0xaa, 0x03, 0x03, vibe, osc, suck], + false, + ) + .into(), + ]) + } +} + +impl ProtocolHandler for SexverseV6 { + fn handle_output_vibrate_cmd( + &self, + _feature_index: u32, + _feature_id: uuid::Uuid, + speed: u32, + ) -> Result, ButtplugDeviceError> { + self.vibe_speed.store(speed as u8, Ordering::Relaxed); + self.generate_command() + } + + fn handle_output_oscillate_cmd( + &self, + _feature_index: u32, + _feature_id: uuid::Uuid, + speed: u32, + ) -> Result, ButtplugDeviceError> { + self.osc_speed.store(speed as u8, Ordering::Relaxed); + self.generate_command() + } + fn handle_output_constrict_cmd( + &self, + _feature_index: u32, + _feature_id: uuid::Uuid, + speed: u32, + ) -> Result, ButtplugDeviceError> { + self.suck_speed.store(speed as u8, Ordering::Relaxed); + self.generate_command() + } +} diff --git a/crates/buttplug_server_device_config/build-config/buttplug-device-config-v5.json b/crates/buttplug_server_device_config/build-config/buttplug-device-config-v5.json index 865f1ad6f..dd2dbb182 100644 --- a/crates/buttplug_server_device_config/build-config/buttplug-device-config-v5.json +++ b/crates/buttplug_server_device_config/build-config/buttplug-device-config-v5.json @@ -1,7 +1,7 @@ { "version": { "major": 5, - "minor": 42 + "minor": 52 }, "protocols": { "activejoy": { @@ -9574,10 +9574,10 @@ { "features": [ { - "id": "6f2e25ae-d5f0-4823-a8db-9072e8e6a0d4", + "id": "8a0b6680-b90d-4851-9d40-c2c04916a32a", "index": 0, "output": { - "oscillate": { + "rotate": { "value": [ 0, 255 @@ -9586,10 +9586,10 @@ } }, { - "id": "9b73399f-04a8-4a3b-9e65-b98e11a47f47", + "id": "9f9a3a2f-fad3-4037-8b42-b089d9be1479", "index": 1, "output": { - "rotate": { + "oscillate": { "value": [ 0, 255 @@ -15631,7 +15631,8 @@ "TKLM-C004-BT", "TKLM-C005-BT", "TKLM-N001-BT", - "TKLM-C001-BT" + "TKLM-C001-BT", + "TKLM-CZ01" ], "services": { "0000ffa0-0000-1000-8000-00805f9b34fb": { @@ -15870,6 +15871,39 @@ "TKLM-C001-BT" ], "name": "Luvmazer Rose Finger Vibe" + }, + { + "features": [ + { + "id": "f98578cf-e7b8-4179-bead-ce8b25290990", + "index": 0, + "output": { + "vibrate": { + "value": [ + 0, + 255 + ] + } + } + }, + { + "id": "e9c572c7-40cc-467a-a6be-f0931c71e479", + "index": 1, + "output": { + "vibrate": { + "value": [ + 0, + 255 + ] + } + } + } + ], + "id": "a53e908a-d157-43a1-9403-1ca1c0607318", + "identifier": [ + "TKLM-CZ01" + ], + "name": "Luvmazer Passion Tether Ring" } ], "defaults": { @@ -21602,7 +21636,7 @@ } } ], - "configuration": [ + "configurations": [ { "id": "d3c4665b-d5bd-4144-ac20-b40a11a839d1", "identifier": [ @@ -21630,6 +21664,108 @@ "name": "Sexverse Heart" } }, + "sexverse-v6": { + "communication": [ + { + "btle": { + "names": [ + "A06K01C", + "A14M01C" + ], + "services": { + "0000ffaa-0000-1000-8000-00805f9b34fb": { + "rx": "0000aa04-0000-1000-8000-00805f9b34fb", + "tx": "0000aa02-0000-1000-8000-00805f9b34fb" + } + } + } + } + ], + "configurations": [ + { + "id": "a86278b6-7502-474e-89dd-22465c8a2af3", + "identifier": [ + "A06K01C" + ], + "name": "Sexverse Aether" + }, + { + "features": [ + { + "id": "c74fb1ff-c8cc-46d8-9b7f-515787dd4d3f", + "index": 0, + "output": { + "vibrate": { + "value": [ + 0, + 100 + ] + } + } + }, + { + "id": "926d9faf-8d0a-4f0c-ae62-e9bfebb9eb59", + "index": 1, + "output": { + "oscillate": { + "value": [ + 0, + 100 + ] + } + } + }, + { + "id": "8196c72a-6c75-4811-80df-af8edf1854ef", + "index": 2, + "output": { + "constrict": { + "value": [ + 0, + 100 + ] + } + } + } + ], + "id": "7c6f7087-9d02-43e6-9b53-1b149d915893", + "identifier": [ + "A14M01C" + ], + "name": "Sexverse Sirius" + } + ], + "defaults": { + "features": [ + { + "id": "0f9477c6-1461-49da-a902-2a619cf91bc5", + "index": 0, + "output": { + "vibrate": { + "value": [ + 0, + 100 + ] + } + } + }, + { + "id": "8c2235aa-c1d2-4775-8c55-3d1461123924", + "index": 1, + "output": { + "oscillate": { + "value": [ + 0, + 100 + ] + } + } + } + ], + "id": "7d28e15e-4364-438e-9b65-b3c859f216f2", + "name": "Sexverse V6" + } + }, "simulated": { "communication": [ { diff --git a/crates/buttplug_server_device_config/device-config/protocols/joyhub.yml b/crates/buttplug_server_device_config/device-config/protocols/joyhub.yml index 67e7b501a..584940c70 100644 --- a/crates/buttplug_server_device_config/device-config/protocols/joyhub.yml +++ b/crates/buttplug_server_device_config/device-config/protocols/joyhub.yml @@ -1879,16 +1879,16 @@ configurations: - J-Mighty name: JoyHub Mighty features: - - id: 6f2e25ae-d5f0-4823-a8db-9072e8e6a0d4 + - id: 8a0b6680-b90d-4851-9d40-c2c04916a32a output: - oscillate: + rotate: value: - 0 - 255 index: 0 - - id: 9b73399f-04a8-4a3b-9e65-b98e11a47f47 + - id: 9f9a3a2f-fad3-4037-8b42-b089d9be1479 output: - rotate: + oscillate: value: - 0 - 255 diff --git a/crates/buttplug_server_device_config/device-config/protocols/luvmazer.yml b/crates/buttplug_server_device_config/device-config/protocols/luvmazer.yml index 30e104a73..51792a102 100644 --- a/crates/buttplug_server_device_config/device-config/protocols/luvmazer.yml +++ b/crates/buttplug_server_device_config/device-config/protocols/luvmazer.yml @@ -150,6 +150,25 @@ configurations: - 255 index: 2 id: 10030d9f-bb93-4c57-8a07-a53dabd0dde9 +- identifier: + - TKLM-CZ01 + name: Luvmazer Passion Tether Ring + features: + - id: f98578cf-e7b8-4179-bead-ce8b25290990 + output: + vibrate: + value: + - 0 + - 255 + index: 0 + - id: e9c572c7-40cc-467a-a6be-f0931c71e479 + output: + vibrate: + value: + - 0 + - 255 + index: 1 + id: a53e908a-d157-43a1-9403-1ca1c0607318 communication: - btle: names: @@ -160,6 +179,7 @@ communication: - TKLM-C005-BT - TKLM-N001-BT - TKLM-C001-BT + - TKLM-CZ01 services: 0000ffa0-0000-1000-8000-00805f9b34fb: tx: 0000ffa1-0000-1000-8000-00805f9b34fb diff --git a/crates/buttplug_server_device_config/device-config/protocols/sexverse-v5.yml b/crates/buttplug_server_device_config/device-config/protocols/sexverse-v5.yml index 357a80fe0..53660862d 100644 --- a/crates/buttplug_server_device_config/device-config/protocols/sexverse-v5.yml +++ b/crates/buttplug_server_device_config/device-config/protocols/sexverse-v5.yml @@ -10,7 +10,7 @@ defaults: - 100 index: 0 id: 783bc287-528c-4c58-a7ec-47a49304309e -configuration: +configurations: - identifier: - CB-WXW03 name: Hannibal Kona diff --git a/crates/buttplug_server_device_config/device-config/protocols/sexverse-v6.yml b/crates/buttplug_server_device_config/device-config/protocols/sexverse-v6.yml new file mode 100644 index 000000000..22eb98797 --- /dev/null +++ b/crates/buttplug_server_device_config/device-config/protocols/sexverse-v6.yml @@ -0,0 +1,59 @@ +--- +defaults: + name: Sexverse V6 + features: + - id: 0f9477c6-1461-49da-a902-2a619cf91bc5 + output: + vibrate: + value: + - 0 + - 100 + index: 0 + - id: 8c2235aa-c1d2-4775-8c55-3d1461123924 + output: + oscillate: + value: + - 0 + - 100 + index: 1 + id: 7d28e15e-4364-438e-9b65-b3c859f216f2 +configurations: + - identifier: + - A06K01C + name: Sexverse Aether + id: a86278b6-7502-474e-89dd-22465c8a2af3 + - identifier: + - A14M01C + name: Sexverse Sirius + features: + - id: c74fb1ff-c8cc-46d8-9b7f-515787dd4d3f + output: + vibrate: + value: + - 0 + - 100 + index: 0 + - id: 926d9faf-8d0a-4f0c-ae62-e9bfebb9eb59 + output: + oscillate: + value: + - 0 + - 100 + index: 1 + - id: 8196c72a-6c75-4811-80df-af8edf1854ef + output: + constrict: + value: + - 0 + - 100 + index: 2 + id: 7c6f7087-9d02-43e6-9b53-1b149d915893 +communication: +- btle: + names: + - A06K01C + - A14M01C + services: + 0000ffaa-0000-1000-8000-00805f9b34fb: + tx: 0000aa02-0000-1000-8000-00805f9b34fb + rx: 0000aa04-0000-1000-8000-00805f9b34fb diff --git a/crates/buttplug_server_device_config/device-config/version.yaml b/crates/buttplug_server_device_config/device-config/version.yaml index 9fea0a6bd..d38389c90 100644 --- a/crates/buttplug_server_device_config/device-config/version.yaml +++ b/crates/buttplug_server_device_config/device-config/version.yaml @@ -1,3 +1,3 @@ version: major: 5 - minor: 42 + minor: 52