Something went wrong. Try again.
Buttplug sex toy control library
Something went wrong. Try again.
1.1 kB · 51 lines
Rust
at dev
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152// Buttplug Rust Source Code File - See https://buttplug.io for more info.//// Copyright 2016-2023 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 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!(Sensee, "sensee");
#[derive(Default)]pub struct Sensee {}
impl ProtocolHandler for Sensee { fn handle_output_vibrate_cmd( &self, _feature_index: u32, feature_id: Uuid, speed: u32, ) -> Result<Vec<HardwareCommand>, ButtplugDeviceError> { Ok(vec![ HardwareWriteCmd::new( &[feature_id], Endpoint::Tx, vec![ 0x55, 0xaa, 0xf0, 0x01, 0x01, 0x0b, 0x65, 0xf7, 0x01, 0x01, speed as u8, ], false, ) .into(), ]) }}