init: initial commit
Some checks failed
CI Checks / Building (macOS-latest, stable) (push) Has been cancelled
CI Checks / Building (true, macOS-latest, nightly) (push) Has been cancelled
CI Checks / Building (true, ubuntu-latest, nightly) (push) Has been cancelled
CI Checks / Building (true, windows-latest, nightly) (push) Has been cancelled
CI Checks / Building (ubuntu-latest, stable) (push) Has been cancelled
CI Checks / Building (windows-latest, stable) (push) Has been cancelled
CI Checks / Linting (push) Has been cancelled
CI Checks / Formatting (push) Has been cancelled
Some checks failed
CI Checks / Building (macOS-latest, stable) (push) Has been cancelled
CI Checks / Building (true, macOS-latest, nightly) (push) Has been cancelled
CI Checks / Building (true, ubuntu-latest, nightly) (push) Has been cancelled
CI Checks / Building (true, windows-latest, nightly) (push) Has been cancelled
CI Checks / Building (ubuntu-latest, stable) (push) Has been cancelled
CI Checks / Building (windows-latest, stable) (push) Has been cancelled
CI Checks / Linting (push) Has been cancelled
CI Checks / Formatting (push) Has been cancelled
This commit is contained in:
180
patches/buttplugio.diff
Normal file
180
patches/buttplugio.diff
Normal file
@@ -0,0 +1,180 @@
|
||||
diff --git a/crates/buttplug_server/src/device/protocol_impl/mod.rs b/crates/buttplug_server/src/device/protocol_impl/mod.rs
|
||||
index 4e3a275d..677eb8f6 100644
|
||||
--- a/crates/buttplug_server/src/device/protocol_impl/mod.rs
|
||||
+++ b/crates/buttplug_server/src/device/protocol_impl/mod.rs
|
||||
@@ -69,6 +69,7 @@ pub mod mizzzee_v2;
|
||||
pub mod mizzzee_v3;
|
||||
pub mod monsterpub;
|
||||
pub mod motorbunny;
|
||||
+pub mod muse2040;
|
||||
pub mod mysteryvibe;
|
||||
pub mod mysteryvibe_v2;
|
||||
pub mod nextlevelracing;
|
||||
@@ -359,6 +360,10 @@ pub fn get_default_protocol_map() -> HashMap<String, Arc<dyn ProtocolIdentifierF
|
||||
&mut map,
|
||||
motorbunny::setup::MotorbunnyIdentifierFactory::default(),
|
||||
);
|
||||
+ add_to_protocol_map(
|
||||
+ &mut map,
|
||||
+ muse2040::setup::MuSe2040IdentifierFactory::default(),
|
||||
+ );
|
||||
add_to_protocol_map(
|
||||
&mut map,
|
||||
mysteryvibe::setup::MysteryVibeIdentifierFactory::default(),
|
||||
diff --git a/crates/buttplug_server/src/device/protocol_impl/muse2040.rs b/crates/buttplug_server/src/device/protocol_impl/muse2040.rs
|
||||
new file mode 100644
|
||||
index 00000000..e267457b
|
||||
--- /dev/null
|
||||
+++ b/crates/buttplug_server/src/device/protocol_impl/muse2040.rs
|
||||
@@ -0,0 +1,39 @@
|
||||
+// Buttplug Rust Source Code File - See https://buttplug.io for more info.
|
||||
+//
|
||||
+// Source protected under Copyright 2025 girlcock (dot) wang. All rights reserved.
|
||||
+//
|
||||
+// Integration is licensed under the BSD 3-Clause license. See LICENSE file in
|
||||
+// the project root for full license information.
|
||||
+//
|
||||
+// Driver (muse2040) is licensed under LGPLv3. See LICENSE file in the muse2040
|
||||
+// project root @ https://git.girlcock.wang/may/muse2040 for full license
|
||||
+// information.
|
||||
+
|
||||
+use crate::device::{
|
||||
+ hardware::{HardwareCommand, HardwareWriteCmd},
|
||||
+ protocol::{ProtocolHandler, generic_protocol_setup},
|
||||
+};
|
||||
+use buttplug_core::errors::ButtplugDeviceError;
|
||||
+use buttplug_server_device_config::Endpoint;
|
||||
+use uuid::Uuid;
|
||||
+
|
||||
+generic_protocol_setup!(MuSe2040, "muse2040");
|
||||
+
|
||||
+#[derive(Default)]
|
||||
+pub struct MuSe2040 {}
|
||||
+
|
||||
+impl ProtocolHandler for MuSe2040 {
|
||||
+ fn handle_output_vibrate_cmd(
|
||||
+ &self,
|
||||
+ _feature_index: u32,
|
||||
+ feature_id: Uuid,
|
||||
+ speed: u32,
|
||||
+ ) -> Result<Vec<HardwareCommand>, ButtplugDeviceError> {
|
||||
+
|
||||
+ let data = ((_feature_index << 2) + speed) as u8;
|
||||
+
|
||||
+ Ok(vec![
|
||||
+ HardwareWriteCmd::new(&[feature_id], Endpoint::Tx, vec![data], true).into(),
|
||||
+ ])
|
||||
+ }
|
||||
+}
|
||||
diff --git a/crates/buttplug_server_device_config/build-config/buttplug-device-config-v4.json b/crates/buttplug_server_device_config/build-config/buttplug-device-config-v4.json
|
||||
index b4f91519..95a2e108 100644
|
||||
--- a/crates/buttplug_server_device_config/build-config/buttplug-device-config-v4.json
|
||||
+++ b/crates/buttplug_server_device_config/build-config/buttplug-device-config-v4.json
|
||||
@@ -13321,6 +13321,61 @@
|
||||
"name": "Muse Device"
|
||||
}
|
||||
},
|
||||
+ "muse2040": {
|
||||
+ "communication": [
|
||||
+ {
|
||||
+ "serial": {
|
||||
+ "baud_rate": 115200,
|
||||
+ "data_bits": 8,
|
||||
+ "parity": "N",
|
||||
+ "port": "default",
|
||||
+ "stop_bits": 1
|
||||
+ }
|
||||
+ }
|
||||
+ ],
|
||||
+ "defaults": {
|
||||
+ "features": [
|
||||
+ {
|
||||
+ "description": "Channel 0 (single-channel devices)",
|
||||
+ "id": "e9594130-280a-4ec0-aff9-c799f35321e6",
|
||||
+ "output": {
|
||||
+ "vibrate": {
|
||||
+ "value": [
|
||||
+ 0,
|
||||
+ 3
|
||||
+ ]
|
||||
+ }
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ "description": "Channel 1",
|
||||
+ "id": "12c1a484-8aae-48e2-a041-099d59f86ef6",
|
||||
+ "output": {
|
||||
+ "vibrate": {
|
||||
+ "value": [
|
||||
+ 0,
|
||||
+ 3
|
||||
+ ]
|
||||
+ }
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ "description": "Channel 2",
|
||||
+ "id": "4d541da0-f607-43b4-a4ab-90e52c3677c3",
|
||||
+ "output": {
|
||||
+ "vibrate": {
|
||||
+ "value": [
|
||||
+ 0,
|
||||
+ 3
|
||||
+ ]
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ ],
|
||||
+ "id": "eed7545b-3016-494a-b611-77941455dfed",
|
||||
+ "name": "Love Spouse/MuSe Device (muse2040)"
|
||||
+ }
|
||||
+ },
|
||||
"mysteryvibe": {
|
||||
"communication": [
|
||||
{
|
||||
diff --git a/crates/buttplug_server_device_config/device-config-v4/protocols/muse2040.yml b/crates/buttplug_server_device_config/device-config-v4/protocols/muse2040.yml
|
||||
new file mode 100644
|
||||
index 00000000..1fc4523e
|
||||
--- /dev/null
|
||||
+++ b/crates/buttplug_server_device_config/device-config-v4/protocols/muse2040.yml
|
||||
@@ -0,0 +1,39 @@
|
||||
+# Integration is licensed under the BSD 3-Clause license. See LICENSE file in
|
||||
+# the project root for full license information.
|
||||
+#
|
||||
+# Driver (muse2040) is licensed under LGPLv3. See LICENSE file in the muse2040
|
||||
+# project root @ https://git.girlcock.wang/may/muse2040 for full license
|
||||
+# information.
|
||||
+
|
||||
+defaults:
|
||||
+ name: Love Spouse/MuSe Device (muse2040)
|
||||
+ features:
|
||||
+ - description: Channel 0 (single-channel devices)
|
||||
+ id: e9594130-280a-4ec0-aff9-c799f35321e6
|
||||
+ output:
|
||||
+ vibrate:
|
||||
+ value:
|
||||
+ - 0
|
||||
+ - 3
|
||||
+ - description: Channel 1
|
||||
+ id: 12c1a484-8aae-48e2-a041-099d59f86ef6
|
||||
+ output:
|
||||
+ vibrate:
|
||||
+ value:
|
||||
+ - 0
|
||||
+ - 3
|
||||
+ - description: Channel 2
|
||||
+ id: 4d541da0-f607-43b4-a4ab-90e52c3677c3
|
||||
+ output:
|
||||
+ vibrate:
|
||||
+ value:
|
||||
+ - 0
|
||||
+ - 3
|
||||
+ id: eed7545b-3016-494a-b611-77941455dfed
|
||||
+communication:
|
||||
+ - serial:
|
||||
+ port: default
|
||||
+ baud_rate: 115200
|
||||
+ data_bits: 8
|
||||
+ parity: 'N'
|
||||
+ stop_bits: 1
|
||||
\ No newline at end of file
|
||||
Reference in New Issue
Block a user