Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions crates/buttplug_server/src/device/protocol_impl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -460,6 +461,10 @@ pub fn get_default_protocol_map() -> HashMap<String, Arc<dyn ProtocolIdentifierF
&mut map,
sexverse_v5::setup::SexverseV5IdentifierFactory::default(),
);
add_to_protocol_map(
&mut map,
sexverse_v6::setup::SexverseV6IdentifierFactory::default(),
);
add_to_protocol_map(
&mut map,
simulated::setup::SimulatedProtocolIdentifierFactory::default(),
Expand Down
75 changes: 75 additions & 0 deletions crates/buttplug_server/src/device/protocol_impl/sexverse_v6.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// Buttplug Rust Source Code File - See https://buttplug.io for more info.
//
// Copyright 2016-2026 Nonpolynomial Labs LLC. All rights reserved.
//
// Licensed under the BSD 3-Clause license. See LICENSE file in the project root
// for full license information.

use std::sync::atomic::{AtomicU8, Ordering};
use uuid::{uuid, Uuid};

use crate::device::{
hardware::{HardwareCommand, HardwareWriteCmd},
protocol::{ProtocolHandler, generic_protocol_setup},
};
use buttplug_core::errors::ButtplugDeviceError;
use buttplug_server_device_config::Endpoint;

generic_protocol_setup!(SexverseV6, "sexverse-v6");

const SEXVERSE_PROTOCOL_UUID: Uuid = uuid!("f38ceb5e-84b4-4475-9119-6e48f163c4ec");

#[derive(Default)]
pub struct SexverseV6 {
vibe_speed: AtomicU8,
osc_speed: AtomicU8,
suck_speed: AtomicU8,
}

impl SexverseV6 {
fn generate_command(&self) -> Result<Vec<HardwareCommand>, 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<Vec<HardwareCommand>, 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<Vec<HardwareCommand>, 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<Vec<HardwareCommand>, ButtplugDeviceError> {
self.suck_speed.store(speed as u8, Ordering::Relaxed);
self.generate_command()
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": {
"major": 5,
"minor": 42
"minor": 52
},
"protocols": {
"activejoy": {
Expand Down Expand Up @@ -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
Expand All @@ -9586,10 +9586,10 @@
}
},
{
"id": "9b73399f-04a8-4a3b-9e65-b98e11a47f47",
"id": "9f9a3a2f-fad3-4037-8b42-b089d9be1479",
"index": 1,
"output": {
"rotate": {
"oscillate": {
"value": [
0,
255
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -21602,7 +21636,7 @@
}
}
],
"configuration": [
"configurations": [
{
"id": "d3c4665b-d5bd-4144-ac20-b40a11a839d1",
"identifier": [
Expand Down Expand Up @@ -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": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defaults:
- 100
index: 0
id: 783bc287-528c-4c58-a7ec-47a49304309e
configuration:
configurations:
- identifier:
- CB-WXW03
name: Hannibal Kona
Expand Down
Loading