Buttplug sex toy control library
20
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: Support some Folove devices

These devices don't support the 'DeviceType;' command
and don't always advertise their LVS-* names properly either.
But they do advertise the non-standard 0xffb0 service.

authored by

blackspherefollower and committed by
qDot
9c558a0f a02e2391

+8 -7
+3
buttplug/buttplug-device-config/buttplug-device-config.json
··· 7 7 "LVS-*", 8 8 "LOVE-*" 9 9 ], 10 + "advertised-services": [ 11 + "0000ffb0-0000-1000-8000-00805f9b34fb" 12 + ], 10 13 "services": { 11 14 "0000fff0-0000-1000-8000-00805f9b34fb": { 12 15 "tx": "0000fff2-0000-1000-8000-00805f9b34fb",
+2
buttplug/buttplug-device-config/buttplug-device-config.yml
··· 138 138 names: 139 139 - LVS-* 140 140 - LOVE-* 141 + advertised-services: 142 + - 0000ffb0-0000-1000-8000-00805f9b34fb # Folove advertised service 141 143 services: 142 144 0000fff0-0000-1000-8000-00805f9b34fb: 143 145 tx: 0000fff2-0000-1000-8000-00805f9b34fb
+3 -7
buttplug/src/device/protocol/lovense.rs
··· 102 102 _ = Delay::new(Duration::from_millis(LOVENSE_COMMAND_TIMEOUT_MS)).fuse() => { 103 103 count += 1; 104 104 if count > LOVENSE_COMMAND_RETRY { 105 - return Err( 106 - ButtplugDeviceError::ProtocolSpecificError( 107 - "Lovense".to_owned(), 108 - format!("Lovense Device timed out while getting DeviceType info. ({} retries)", LOVENSE_COMMAND_RETRY), 109 - ) 110 - .into() 111 - ); 105 + warn!("Lovense Device timed out while getting DeviceType info. ({} retries)", LOVENSE_COMMAND_RETRY); 106 + let (name, attrs) = crate::device::protocol::get_protocol_features(device_impl, None, config)?; 107 + return Ok(Box::new(Self::new(&name, attrs)) as Box<dyn ButtplugProtocol>); 112 108 } 113 109 } 114 110 }